]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lsm: use 32-bit compatible data types in LSM syscalls
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 14 Mar 2024 15:31:26 +0000 (11:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:32:22 +0000 (15:32 +0200)
commitf6ab9235a4cee6030a96e2cb7122d0b9726e8e9c
tree783c87b1b7a1b6acde38f5a0ba6fd9793afa066a
parent3fd977ac6fe76abee57a12407fdc309c7c4a5951
lsm: use 32-bit compatible data types in LSM syscalls

[ Upstream commit a5a858f622a0aff5cdb5e271442cd01b2a01467f ]

Change the size parameters in lsm_list_modules(), lsm_set_self_attr()
and lsm_get_self_attr() from size_t to u32. This avoids the need to
have different interfaces for 32 and 64 bit systems.

Cc: stable@vger.kernel.org
Fixes: a04a1198088a ("LSM: syscalls for current process attributes")
Fixes: ad4aff9ec25f ("LSM: Create lsm_list_modules system call")
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reported-and-reviewed-by: Dmitry V. Levin <ldv@strace.io>
[PM: subject and metadata tweaks, syscall.h fixes]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
12 files changed:
include/linux/lsm_hook_defs.h
include/linux/security.h
include/linux/syscalls.h
security/apparmor/lsm.c
security/lsm_syscalls.c
security/security.c
security/selinux/hooks.c
security/smack/smack_lsm.c
tools/testing/selftests/lsm/common.h
tools/testing/selftests/lsm/lsm_get_self_attr_test.c
tools/testing/selftests/lsm/lsm_list_modules_test.c
tools/testing/selftests/lsm/lsm_set_self_attr_test.c