Defined in 1 files as a function:
Referenced in 8 files:
- include/linux/lsm_hook_defs.h, line 423
- security/keys/key.c
- security/keys/keyctl.c
- security/keys/keyring.c, line 1175
- security/keys/request_key.c, line 348
- security/security.c, line 5174
- security/selinux/hooks.c, line 7767
- security/smack/smack_lsm.c, line 5281
Smatch caller information:
security/keys/request_key.c construct_get_dest_keyring() -> key_permission()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | key_ref | 4097-18446744073709547521 |
| PARAM_VALUE | 1 | need_perm | 3 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &idmap->idmap_mutex | ||
| HALF_LOCKED2 | global &key_types_sem |
security/keys/keyctl.c keyctl_keyring_search() -> key_permission()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | key_ref | 0-ptr_max |
| PARAM_VALUE | 1 | need_perm | 5 |
| DATA_SOURCE | 0 | key_ref | r keyring_search |
| LOCK2 | global &key_types_sem |
security/keys/keyctl.c keyctl_read_key() -> key_permission()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | key_ref | 0,4096-ptr_max |
| PARAM_VALUE | 1 | need_perm | 2 |
| BUF_SIZE | 0 | key_ref | (-1)-s32max |
| BUF_SIZE | 0 | key_ref | (-1)-s32max |
| DATA_SOURCE | 0 | key_ref | r lookup_user_key |
security/keys/key.c __key_create_or_update() -> key_permission()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | need_perm | 3 |
| BUF_SIZE | 0 | key_ref | (-1)-s32max |
| BUF_SIZE | 0 | key_ref | (-1)-s32max |
| DATA_SOURCE | 0 | key_ref | $0 |
| STR_LEN | 0 | key_ref | (-1),3-4,7,9-10 |
| STR_LEN | 0 | key_ref | (-1),3-4,7,9-10 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &keyring->sem | ||
| LOCK2 | global &key_types_sem | ||
| TYPE_LOCK | (struct key)->sem |
security/keys/key.c __key_update() -> key_permission()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | key_ref | 1-u64max |
| PARAM_VALUE | 1 | need_perm | 3 |
| DATA_SOURCE | 0 | key_ref | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | global &key_types_sem | ||
| HALF_LOCKED2 | &buffer->mutex | ||
| HALF_LOCKED2 | &frag->frag_sem |
security/keys/key.c key_update() -> key_permission()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | key_ref | 0,4096-ptr_max |
| PARAM_VALUE | 1 | need_perm | 3 |
| BUF_SIZE | 0 | key_ref | (-1)-s32max |
| BUF_SIZE | 0 | key_ref | (-1)-s32max |
| DATA_SOURCE | 0 | key_ref | $0 |
security/keys/keyring.c find_keyring_by_name() -> key_permission()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | key_ref | 4096-ptr_max |
| PARAM_VALUE | 1 | need_perm | 4 |
| RX_PATH | |||
| LOCK2 | global &key_session_mutex | ||
| LOCK2 | global &keyring_name_lock |