]> git.baikalelectronics.ru Git - kernel.git/commit
cls_cgroup: get sk_classid only from full sockets
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Mon, 18 Apr 2016 11:37:10 +0000 (14:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2016 00:09:25 +0000 (20:09 -0400)
commit1f7c190022d6b8f65fb20085d251a4a8ce63255d
treef3d9a2a3469383ce8a93fb1e5fb9f1b487b55dd7
parent79d9b6b4359b4e9e566fdd9bca40268ca263db37
cls_cgroup: get sk_classid only from full sockets

skb->sk could point to timewait or request socket which has no sk_classid.
Detected as "BUG: KASAN: slab-out-of-bounds in cls_cgroup_classify".

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/cls_cgroup.h