diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-24 10:18:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-24 10:18:15 -0700 |
commit | 5c36498d06b9b00393c2f35edbf16b28194375fa (patch) | |
tree | f9170a1fc6a234b2c069359a2d4ad68001f79a53 /security/selinux | |
parent | abf2050f51fdca0fd146388f83cddd95a57a008d (diff) | |
parent | f89722faa31466ff41aed21bdeb9cf34c2312858 (diff) | |
download | lwn-5c36498d06b9b00393c2f35edbf16b28194375fa.tar.gz lwn-5c36498d06b9b00393c2f35edbf16b28194375fa.zip |
Merge tag 'lsm-pr-20240923' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
Pull LSM fixes from Paul Moore:
- Add a missing security_mmap_file() check to the remap_file_pages()
syscall
- Properly reference the SELinux and Smack LSM blobs in the
security_watch_key() LSM hook
- Fix a random IPE selftest crash caused by a missing list terminator
in the test
* tag 'lsm-pr-20240923' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
ipe: Add missing terminator to list of unit tests
selinux,smack: properly reference the LSM blob in security_watch_key()
mm: call the security_mmap_file() LSM hook in remap_file_pages()
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index bd3293021488..94c523140125 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -6735,7 +6735,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer) #ifdef CONFIG_KEY_NOTIFICATIONS static int selinux_watch_key(struct key *key) { - struct key_security_struct *ksec = key->security; + struct key_security_struct *ksec = selinux_key(key); u32 sid = current_sid(); return avc_has_perm(sid, ksec->sid, SECCLASS_KEY, KEY__VIEW, NULL); |