From: Alexei Starovoitov Date: Thu, 11 Dec 2014 04:14:55 +0000 (-0800) Subject: net: sock: fix access via invalid file descriptor X-Git-Tag: omap-for-v3.20/drop-legacy-3517~122^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=198bf1b046e370a7d3987b195cff5f1efebec3ac;p=pandora-kernel.git net: sock: fix access via invalid file descriptor 0day robot reported the following crash: [ 21.233581] BUG: unable to handle kernel NULL pointer dereference at 0000000000000007 [ 21.234709] IP: [] sk_attach_bpf+0x39/0xc2 It's due to bpf_prog_get() returning ERR_PTR. Check it properly. Reported-by: Fengguang Wu Fixes: 89aa075832b0 ("net: sock: allow eBPF programs to be attached to sockets") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller --- Reading git-diff-tree failed