aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorDaniel Borkmann <[email protected]>2015-09-02 12:00:36 +0000
committerDavid S. Miller <[email protected]>2015-09-02 18:29:29 +0000
commitb382c08656000c12a146723a153b85b13a855b49 (patch)
tree1a9404a05caebe9bebf9404027d580264be29ee7 /drivers/net/xen-netback/interface.c
parentflow_dissector: Use 'const' where possible. (diff)
downloadkernel-b382c08656000c12a146723a153b85b13a855b49.tar.gz
kernel-b382c08656000c12a146723a153b85b13a855b49.zip
sock, diag: fix panic in sock_diag_put_filterinfo
diag socket's sock_diag_put_filterinfo() dumps classic BPF programs upon request to user space (ss -0 -b). However, native eBPF programs attached to sockets (SO_ATTACH_BPF) cannot be dumped with this method: Their orig_prog is always NULL. However, sock_diag_put_filterinfo() unconditionally tries to access its filter length resp. wants to copy the filter insns from there. Internal cBPF to eBPF transformations attached to sockets don't have this issue, as orig_prog state is kept. It's currently only used by packet sockets. If we would want to add native eBPF support in the future, this needs to be done through a different attribute than PACKET_DIAG_FILTER to not confuse possible user space disassemblers that work on diag data. Fixes: 89aa075832b0 ("net: sock: allow eBPF programs to be attached to sockets") Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Nicolas Dichtel <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions