android_kernel_samsung_a7y1.../security
Jia-Ju Bai 43aad77c9d security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()
[ Upstream commit 3f4287e7d98a2954f20bf96c567fdffcd2b63eb9 ]

In smack_socket_sock_rcv_skb(), there is an if statement
on line 3920 to check whether skb is NULL:
    if (skb && skb->secmark != 0)

This check indicates skb can be NULL in some cases.

But on lines 3931 and 3932, skb is used:
    ad.a.u.net->netif = skb->skb_iif;
    ipv6_skb_to_auditdata(skb, &ad.a, NULL);

Thus, possible null-pointer dereferences may occur when skb is NULL.

To fix these possible bugs, an if statement is added to check skb.

These bugs are found by a static analysis tool STCheck written by us.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 07:43:44 +02:00
..
apparmor apparmor: enforce nullbyte at end of tag string 2020-04-06 19:16:20 +02:00
defex_lsm Revert "security: defex: set Defex to Permissive status" 2020-04-06 19:40:02 +05:30
dsms A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
integrity A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
keys keys: Fix missing null pointer check in request_key_auth_describe() 2020-04-06 21:37:05 +02:00
mstdrv A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
proca A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
samsung A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sdp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
selinux selinux: fix memory leak in policydb_init() 2020-04-06 20:27:38 +02:00
smack security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb() 2020-04-07 07:43:44 +02:00
tima_uevent A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tomoyo A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tz_iccc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
yama A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
commoncap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
device_cgroup.c device_cgroup: fix RCU imbalance in error case 2020-04-06 15:57:12 +02:00
inode.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lsm_audit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
min_addr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
security.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30