Maciej Żenczykowski
3c0569d770
ANDROID: net: bpf: permit redirect from ingress L3 to egress L2 devices at near max mtu
...
__bpf_skb_max_len(skb) is used from:
bpf_skb_adjust_room
__bpf_skb_change_tail
__bpf_skb_change_head
but in the case of forwarding we're likely calling these functions
during receive processing on ingress and bpf_redirect()'ing at
a later point in time to egress on another interface, thus these
mtu checks are for the wrong device (input instead of output).
This is particularly problematic if we're receiving on an L3 1500 mtu
cellular interface, trying to add an L2 header and forwarding to
an L3 mtu 1500 mtu wifi/ethernet device (which is thus L2 1514).
The mtu check prevents us from adding the 14 byte ethernet header prior
to forwarding the packet.
After the packet has already been redirected, we'd need to add
an additional 2nd ebpf program on the target device's egress tc hook,
but then we'd also see non-redirected traffic and have no easy
way to tell apart normal egress with ethernet header packets
from forwarded ethernet headerless packets.
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Link: https://patchwork.ozlabs.org/project/netdev/patch/20200507023606.111650-1-zenczykowski@gmail.com/
But note that a more thorough solution will be pursued.
Bug: 149816401
Change-Id: If55a144d7822e23bce85f65897bca7de4e0f9b24
2020-05-29 23:48:39 +00:00
..
datagram.c
net: add READ_ONCE() annotation in __skb_wait_for_more_packets()
2019-11-10 11:27:49 +01:00
dev.c
This is the 4.19.124 stable release
2020-05-20 11:37:46 +02:00
dev_addr_lists.c
net: change the comment of dev_mc_init
2018-04-19 12:58:20 -04:00
dev_ioctl.c
net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc
2018-07-24 11:36:15 -07:00
devlink.c
devlink: validate length of region addr/len
2020-03-18 07:14:18 +01:00
drop_monitor.c
drop_monitor: work around gcc-10 stringop-overflow warning
2020-05-20 08:18:33 +02:00
dst.c
netfilter: nf_tables: add tunnel support
2018-08-03 21:12:12 +02:00
dst_cache.c
net: core: dst_cache_set_ip6: Rename 'addr' parameter to 'saddr' for consistency
2018-03-05 12:52:45 -05:00
ethtool.c
ethtool: reduce stack usage with clang
2020-01-17 19:46:55 +01:00
failover.c
failover: allow name change on IFF_UP slave interfaces
2019-04-27 09:36:30 +02:00
fib_notifier.c
net: Fix fib notifer to return errno
2018-03-29 14:10:30 -04:00
fib_rules.c
net: fib_rules: Correctly set table field when table number exceeds 8 bits
2020-03-05 16:42:15 +01:00
filter.c
ANDROID: net: bpf: permit redirect from ingress L3 to egress L2 devices at near max mtu
2020-05-29 23:48:39 +00:00
flow_dissector.c
net: dsa: fix flow dissection on Tx path
2019-12-21 10:57:11 +01:00
gen_estimator.c
net: core: protect rate estimator statistics pointer with lock
2018-08-11 12:37:10 -07:00
gen_stats.c
net: sched: put back q.qlen into a single location
2019-03-10 07:17:16 +01:00
gro_cells.c
gro_cells: make sure device is up in gro_cells_receive()
2019-03-19 13:12:38 +01:00
hwbm.c
net: hwbm: Fix unbalanced spinlock in error case
2016-05-25 12:35:09 -07:00
link_watch.c
net: link_watch: mark bonding link events urgent
2018-01-23 19:43:30 -05:00
lwt_bpf.c
bpf: in __bpf_redirect_no_mac pull mac only if present
2019-01-22 21:40:35 +01:00
lwtunnel.c
ipv6: sr: define core operations for seg6local lightweight tunnel
2017-08-07 14:16:22 -07:00
Makefile
net: Introduce generic failover module
2018-05-28 22:59:54 -04:00
neighbour.c
net: neigh: use long type to store jiffies delta
2020-01-27 14:51:21 +01:00
net-procfs.c
proc: introduce proc_create_net{,_data}
2018-05-16 07:24:30 +02:00
net-sysfs.c
net-sysfs: Call dev_hold always in rx_queue_add_kobject
2020-01-29 16:43:17 +01:00
net-sysfs.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
net-traces.c
ANDROID: Unconditionally create bridge tracepoints
2020-03-04 07:57:47 +00:00
net_namespace.c
net/net_namespace: Check the return value of register_pernet_subsys()
2019-12-05 09:20:51 +01:00
netclassid_cgroup.c
cgroup, netclassid: remove double cond_resched
2020-05-10 10:30:12 +02:00
netevent.c
netpoll.c
net: fix skb use after free in netpoll
2019-09-10 10:33:38 +01:00
netprio_cgroup.c
netprio_cgroup: Fix unlimited memory leak of v2 cgroups
2020-05-20 08:18:38 +02:00
page_pool.c
net/page_pool: Fix inconsistent lock state warning
2018-07-19 23:23:01 -07:00
pktgen.c
pktgen: do not sleep with the thread lock held.
2019-06-11 12:20:49 +02:00
ptp_classifier.c
request_sock.c
ipv4: Namespaceify tcp_max_syn_backlog knob
2016-12-29 11:38:31 -05:00
rtnetlink.c
net: rtnetlink: validate IFLA_MTU attribute in rtnl_create_link()
2020-01-29 16:43:16 +01:00
scm.c
sched/headers: Prepare for new header dependencies before moving code to <linux/sched/user.h>
2017-03-02 08:42:29 +01:00
secure_seq.c
infiniband: i40iw, nes: don't use wall time for TCP sequence numbers
2018-07-11 12:10:19 -06:00
skbuff.c
ANDROID: GKI: net, skbuff: export symbols needed by vendor drivers
2020-04-10 02:38:59 +00:00
sock.c
This is the 4.19.111 stable release
2020-03-18 08:19:47 +01:00
sock_diag.c
net: sock_diag: Fix spectre v1 gadget in __sock_diag_cmd()
2018-08-14 10:01:24 -07:00
sock_reuseport.c
udp: correct reuseport selection with connected sockets
2019-09-21 07:16:43 +02:00
stream.c
tcp: make sure EPOLLOUT wont be missed
2019-09-06 10:22:07 +02:00
sysctl_net_core.c
net, sysctl: Fix compiler warning when only cBPF is present
2020-01-04 19:13:20 +01:00
timestamping.c
tso.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
utils.c
net: Fix skb->csum update in inet_proto_csum_replace16().
2020-02-05 14:43:53 +00:00
xdp.c
net/xdp: Fix suspicious RCU usage warning
2018-08-16 21:55:21 +02:00