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

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
..
include ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:47:16 +02:00
ss ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:47:16 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
avc.c selinux: fix potential counting error in avc_add_xperms_decision() 2024-08-29 17:30:15 +02:00
hooks.c selinux,smack: don't bypass permissions check in inode_setsecctx hook 2024-10-17 15:21:15 +02:00
ibpkey.c selinux: various sparse fixes 2022-02-01 19:08:28 -05:00
ima.c selinux/stable-5.18 PR 20220321 2022-03-21 20:47:54 -07:00
Kconfig Documentation,selinux: deprecate setting checkreqprot to 1 2020-02-10 10:49:01 -05:00
Makefile selinux: don't use make's grouped targets feature yet 2023-06-09 10:34:24 +02:00
netif.c selinux: remove unused global variables 2021-01-12 09:49:01 -05:00
netlabel.c security: pass asoc to sctp_assoc_request and sctp_sk_clone 2021-11-03 11:09:20 +00:00
netlink.c selinux: mark some global variables __ro_after_init 2021-01-12 10:08:55 -05:00
netnode.c selinux: various sparse fixes 2022-02-01 19:08:28 -05:00
netport.c selinux: various sparse fixes 2022-02-01 19:08:28 -05:00
nlmsgtab.c selinux: resolve checkpatch errors 2022-05-03 13:59:15 -04:00
selinuxfs.c selinux: improve error checking in sel_write_load() 2024-11-01 01:56:07 +01:00
status.c selinux: move status variables out of selinux_ss 2020-02-10 10:49:01 -05:00
xfrm.c selinux: use correct type for context length 2022-02-18 10:45:54 -05:00