linux/net/core
Daniel Borkmann b382c08656 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: 89aa075832 ("net: sock: allow eBPF programs to be attached to sockets")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-02 11:29:29 -07:00
..
datagram.c
dev_addr_lists.c
dev_ioctl.c
dev.c net: fix IFF_NO_QUEUE for drivers using alloc_netdev 2015-08-27 17:14:29 -07:00
drop_monitor.c
dst.c tun_dst: Remove opts_size 2015-08-31 21:23:42 -07:00
ethtool.c
fib_rules.c
filter.c ip_tunnels: record IP version in tunnel info 2015-08-29 13:07:54 -07:00
flow_dissector.c flow_dissector: Use 'const' where possible. 2015-09-01 21:19:17 -07:00
flow.c flow: Move __get_hash_from_flowi{4,6} into flow_dissector.c 2015-09-01 17:00:24 -07:00
gen_estimator.c
gen_stats.c
link_watch.c
lwtunnel.c lwt: Add cfg argument to build_state 2015-08-24 10:34:40 -07:00
Makefile
neighbour.c
net_namespace.c
net-procfs.c
net-sysfs.c net: allow sleeping when modifying store_rps_map 2015-08-13 21:40:57 -07:00
net-sysfs.h
net-traces.c net: FIB tracepoints 2015-08-29 13:05:16 -07:00
netclassid_cgroup.c
netevent.c
netpoll.c netpoll: warn on netpoll_send_udp users who haven't disabled irqs 2015-08-28 16:24:54 -07:00
netprio_cgroup.c
pktgen.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-13 16:23:11 -07:00
ptp_classifier.c
request_sock.c inet: fix races with reqsk timers 2015-08-10 21:17:29 -07:00
rtnetlink.c tcp: use dctcp if enabled on the route to the initiator 2015-08-31 12:34:00 -07:00
scm.c
secure_seq.c
skbuff.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-27 21:45:31 -07:00
sock_diag.c sock, diag: fix panic in sock_diag_put_filterinfo 2015-09-02 11:29:29 -07:00
sock.c sock: fix kernel doc error 2015-08-27 17:12:41 -07:00
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c net: Add inet_proto_csum_replace_by_diff utility function 2015-08-17 21:33:06 -07:00