linux-stable/security
Colin Ian King 04db2eb668 apparmor: fix unsigned len comparison with less than zero
[ Upstream commit 00e0590dba ]

The sanity check in macro update_for_len checks to see if len
is less than zero, however, len is a size_t so it can never be
less than zero, so this sanity check is a no-op.  Fix this by
making len a ssize_t so the comparison will work and add ulen
that is a size_t copy of len so that the min() macro won't
throw warnings about comparing different types.

Addresses-Coverity: ("Macro compares unsigned to 0")
Fixes: f1bd904175 ("apparmor: add the base fns() for domain labels")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-04 13:59:51 +01:00
..
apparmor apparmor: fix unsigned len comparison with less than zero 2020-01-04 13:59:51 +01:00
integrity ima: always return negative code for error 2019-10-11 18:18:37 +02:00
keys keys: Fix missing null pointer check in request_key_auth_describe() 2019-09-21 07:15:45 +02:00
loadpin
selinux selinux: fix memory leak in policydb_init() 2019-08-06 19:05:26 +02:00
smack smack: use GFP_NOFS while holding inode_smack::smk_lock 2019-10-07 18:55:22 +02:00
tomoyo
yama Yama: Check for pid death before checking ancestry 2019-01-23 08:09:48 +01:00
commoncap.c
device_cgroup.c device_cgroup: fix RCU imbalance in error case 2019-04-27 09:35:40 +02:00
inode.c securityfs: fix use-after-free on symlink traversal 2019-05-25 18:25:34 +02:00
Kconfig
lsm_audit.c missing barriers in some of unix_sock ->addr and ->path accesses 2019-03-19 13:13:24 +01:00
Makefile
min_addr.c
security.c LSM: Check for NULL cred-security on free 2019-01-23 08:09:50 +01:00