summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2026-09-10 16:48:33 +0200
committerPaul Moore <paul@paul-moore.com>2026-09-14 16:41:53 -0400
commiteb221044db2d687be7253cd203df4ee648232c3b (patch)
tree25fd3ff839b210ad47c4350c1c57cc2adcc97d8b /include/uapi/linux
parent7dfacee94c9cac9e62149791f91ce7777d6d870e (diff)
downloadlinux-next-eb221044db2d687be7253cd203df4ee648232c3b.tar.gz
linux-next-eb221044db2d687be7253cd203df4ee648232c3b.zip
lsm: Preserve full ioctl commands in audit records
Ioctl commands are unsigned int values, with their encoded direction and size in the upper 16 bits. However, struct lsm_ioctlop_audit keeps only a u16, and the common audit formatter uses %hx. This logs 0xc00ffeee as 0xfeee and makes distinct commands with matching low 16 bits indistinguishable. Change cmd to unsigned int and use %x. Pass the full command through ioctl_has_perm() as well. Its driver and xperm values remain u8 values derived from the same low 16 bits, so SELinux enforcement does not change. Commands that fit in 16 bits keep the same audit text. Cc: Jeff Vander Stoep <jeffv@google.com> Cc: Paul Moore <paul@paul-moore.com> Fixes: 671a2781ff01 ("security: add ioctl specific auditing to lsm_audit") Signed-off-by: Mickaël Salaün <mic@digikod.net> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions