linux-stable/security/smack
Dan Carpenter c325854ad8 smackfs: Prevent underflow in smk_set_cipso()
[ Upstream commit 3ad49d37cf ]

There is a upper bound to "catlen" but no lower bound to prevent
negatives.  I don't see that this necessarily causes a problem but we
may as well be safe.

Fixes: e114e47377 ("Smack: Simplified Mandatory Access Control Kernel")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:48:16 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
smack.h smack: cleanup obsolete mount option flags 2022-09-27 10:33:03 -07:00
smack_access.c smack: Replace kzalloc + strncpy with kstrndup 2022-08-01 11:26:09 -07:00
smack_lsm.c vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing 2023-09-13 09:47:57 +02:00
smack_netfilter.c smack: remove duplicated hook function 2021-10-12 08:23:52 -07:00
smackfs.c smackfs: Prevent underflow in smk_set_cipso() 2023-09-13 09:48:16 +02:00