kernel_samsung_a53x/security/selinux
Paul Moore 49c852ee24 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-23 23:22:01 +01:00
..
include ima: Avoid blocking in RCU read-side critical section 2024-11-19 14:19:42 +01:00
ss ima: Avoid blocking in RCU read-side critical section 2024-11-19 14:19:42 +01:00
avc.c selinux: fix potential counting error in avc_add_xperms_decision() 2024-11-23 23:20:42 +01:00
hooks.c selinux,smack: don't bypass permissions check in inode_setsecctx hook 2024-11-23 23:21:29 +01:00
ibpkey.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig selinux: Remove audit dependency 2024-11-19 17:53:57 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netlabel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netnode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nlmsgtab.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
selinuxfs.c selinux: improve error checking in sel_write_load() 2024-11-23 23:22:01 +01:00
status.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vendor_hooks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00