Star64_linux/net/core
Alexei Starovoitov ff936a04e5 bpf: fix cb access in socket filter programs
eBPF socket filter programs may see junk in 'u32 cb[5]' area,
since it could have been used by protocol layers earlier.

For socket filter programs used in af_packet we need to clean
20 bytes of skb->cb area if it could be used by the program.
For programs attached to TCP/UDP sockets we need to save/restore
these 20 bytes, since it's used by protocol layers.

Remove SK_RUN_FILTER macro, since it's no longer used.

Long term we may move this bpf cb area to per-cpu scratch, but that
requires addition of new 'per-cpu load/store' instructions,
so not suitable as a short term fix.

Fixes: d691f9e8d4 ("bpf: allow programs to write to certain skb fields")
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-11 04:40:05 -07:00
..
datagram.c net: Fix skb_set_peeked use-after-free bug 2015-08-06 21:55:47 -07:00
dev.c net: use sk_fullsock() in __netdev_pick_tx() 2015-10-05 02:45:25 -07:00
dev_addr_lists.c
dev_ioctl.c
drop_monitor.c
dst.c dst: Pass net into dst->output 2015-10-08 04:27:03 -07:00
ethtool.c
fib_rules.c fib_rules: fix fib rule dumps across multiple skbs 2015-09-24 15:21:54 -07:00
filter.c bpf: fix cb access in socket filter programs 2015-10-11 04:40:05 -07:00
flow.c flow: Move __get_hash_from_flowi{4,6} into flow_dissector.c 2015-09-01 17:00:24 -07:00
flow_dissector.c flow_dissector: Use 'const' where possible. 2015-09-01 21:19:17 -07:00
gen_estimator.c
gen_stats.c
link_watch.c
lwtunnel.c dst: Pass net into dst->output 2015-10-08 04:27:03 -07:00
Makefile
neighbour.c net: Add support for filtering neigh dump by device index 2015-10-07 04:12:02 -07:00
net-procfs.c
net-sysfs.c switchdev: rename SWITCHDEV_ATTR_* enum values to SWITCHDEV_ATTR_ID_* 2015-10-03 04:49:37 -07:00
net-sysfs.h
net-traces.c net: FIB tracepoints 2015-08-29 13:05:16 -07:00
net_namespace.c
netclassid_cgroup.c
netevent.c
netpoll.c netpoll: Drop budget parameter from NAPI polling call hierarchy 2015-09-29 14:57:16 -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 tcp: restore fastopen operations 2015-10-05 03:19:06 -07:00
rtnetlink.c net/core: lockdep_rtnl_is_held can be boolean 2015-10-09 07:49:06 -07:00
scm.c
secure_seq.c
skbuff.c skbuff: Fix skb checksum partial check. 2015-09-29 16:48:46 -07:00
sock.c tcp/dccp: add SLAB_DESTROY_BY_RCU flag for request sockets 2015-10-03 13:25:20 -07:00
sock_diag.c net/core: make sock_diag.c explicitly non-modular 2015-10-09 07:52:27 -07:00
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c net: move net_get_random_once to lib 2015-10-08 05:26:35 -07:00