linux-rockchip/security
Paul Moore 8251093971 selinux: improve error checking in sel_write_load()
[ Upstream commit 42c773238037c90b3302bf37a57ae3b5c3f6004a ]

Move our existing input sanity checking to the top of sel_write_load()
and add a check to ensure the buffer size is non-zero.

Move a local variable initialization from the declaration to before it
is used.

Minor style adjustments.

Reported-by: Sam Sun <samsun1006219@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
[cascardo: keep fsi initialization at its declaration point as it is used earlier]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-01 01:56:07 +01:00
..
apparmor apparmor: fix possible NULL pointer dereference 2024-09-08 07:53:07 +02:00
bpf bpf: lsm: Set bpf_lsm_blob_sizes.lbs_task to 0 2024-10-17 15:21:27 +02:00
integrity ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:47:16 +02:00
keys task_work: s/task_work_cancel()/task_work_cancel_func()/ 2024-08-03 08:49:33 +02:00
landlock landlock: Don't lose track of restrictions on cred_transfer 2024-08-03 08:49:29 +02:00
loadpin LoadPin: Ignore the "contents" argument of the LSM hooks 2022-12-31 13:33:07 +01:00
lockdown
safesetid
selinux selinux: improve error checking in sel_write_load() 2024-11-01 01:56:07 +01:00
smack selinux,smack: don't bypass permissions check in inode_setsecctx hook 2024-10-17 15:21:15 +02:00
tomoyo tomoyo: fallback to realpath if symlink's pathname does not exist 2024-10-17 15:22:00 +02:00
yama
commoncap.c
device_cgroup.c device_cgroup: Roll back to original exceptions after copy failure 2023-01-07 11:11:56 +01:00
inode.c
Kconfig proc: add config & param to block forcing mem writes 2024-10-17 15:21:39 +02:00
Kconfig.hardening randstruct: disable Clang 15 support 2023-02-25 11:25:43 +01:00
lsm_audit.c
Makefile
min_addr.c
security.c ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:47:16 +02:00