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)
commit2309236c13feae619572324efd3e910e66ef6bd0
treef3d9a2a3469383ce8a93fb1e5fb9f1b487b55dd7
parent851b10d60879539bec8acecb35ed361393399282
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