linux-stable/security/selinux
Mickaël Salaün 86dc969314 selinux: fix lsm_get_self_attr()
selinux_getselfattr() doesn't properly initialize the string pointer
it passes to selinux_lsm_getattr() which can cause a problem when an
attribute hasn't been explicitly set; selinux_lsm_getattr() returns
0/success, but does not set or initialize the string label/attribute.
Failure to properly initialize the string causes problems later in
selinux_getselfattr() when the function attempts to kfree() the
string.

Cc: Casey Schaufler <casey@schaufler-ca.com>
Fixes: 762c934317 ("SELinux: Add selfattr hooks")
Suggested-by: Paul Moore <paul@paul-moore.com>
[PM: description changes as discussed in the thread]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2024-02-23 17:16:33 -05:00
..
include selinux: fix style issues in security/selinux/include/initial_sid_to_string.h 2023-12-22 18:09:31 -05:00
ss selinux: introduce an initial SID for early boot processes 2023-11-21 18:39:59 -05:00
.gitignore
avc.c
hooks.c selinux: fix lsm_get_self_attr() 2024-02-23 17:16:33 -05:00
ibpkey.c
ima.c
Kconfig selinux: improve debug configuration 2023-09-13 13:46:57 -04:00
Makefile selinux: improve debug configuration 2023-09-13 13:46:57 -04:00
netif.c
netlabel.c selinux: prevent KMSAN warning in selinux_inet_conn_request() 2023-08-15 18:23:22 -04:00
netlink.c
netnode.c
netport.c
nlmsgtab.c selinux: use unsigned iterator in nlmsgtab code 2023-08-09 19:07:49 -04:00
selinuxfs.c selinux: saner handling of policy reloads 2023-11-16 12:45:33 -05:00
status.c
xfrm.c