linux/net
Sebastian Andrzej Siewior b062caf4f7 xfrm: Linearize the skb after offloading if needed.
[ Upstream commit f015b900bc ]

With offloading enabled, esp_xmit() gets invoked very late, from within
validate_xmit_xfrm() which is after validate_xmit_skb() validates and
linearizes the skb if the underlying device does not support fragments.

esp_output_tail() may add a fragment to the skb while adding the auth
tag/ IV. Devices without the proper support will then send skb->data
points to with the correct length so the packet will have garbage at the
end. A pcap sniffer will claim that the proper data has been sent since
it parses the skb properly.

It is not affected with INET_ESP_OFFLOAD disabled.

Linearize the skb after offloading if the sending hardware requires it.
It was tested on v4, v6 has been adopted.

Fixes: 7785bba299 ("esp: Add a software GRO codepath")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-28 11:12:29 +02:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv batman-adv: Broken sync while rescheduling delayed work 2023-06-14 11:15:23 +02:00
bluetooth Bluetooth: fix debugfs registration 2023-06-14 11:15:28 +02:00
bpf
bpfilter
bridge
caif
can can: j1939: avoid possible use-after-free when j1939_can_rx_register fails 2023-06-14 11:15:26 +02:00
ceph
core neighbour: delete neigh_lookup_nodev as not used 2023-06-21 16:01:03 +02:00
dcb
dccp
dns_resolver
dsa
ethernet
ethtool
hsr
ieee802154
ife
ipv4 xfrm: Linearize the skb after offloading if needed. 2023-06-28 11:12:29 +02:00
ipv6 xfrm: Linearize the skb after offloading if needed. 2023-06-28 11:12:29 +02:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211 wifi: mac80211: take lock before setting vif links 2023-06-21 16:00:59 +02:00
mac802154
mctp
mpls
mptcp mptcp: consolidate fallback and non fallback state machine 2023-06-28 11:12:24 +02:00
ncsi
netfilter netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE 2023-06-21 16:00:58 +02:00
netlabel
netlink
netrom
nfc
nsh
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched net/sched: act_api: add specific EXT_WARN_MSG for tc action 2023-06-21 16:01:02 +02:00
sctp sctp: fix an error code in sctp_sf_eat_auth() 2023-06-21 16:01:00 +02:00
smc
strparser
sunrpc
switchdev
tipc net: tipc: resize nlattr array to correct size 2023-06-21 16:01:02 +02:00
tls
unix
vmw_vsock
wireless wifi: cfg80211: fix link del callback to call correct handler 2023-06-21 16:00:59 +02:00
x25
xdp
xfrm xfrm: Ensure policies always checked on XFRM-I input path 2023-06-28 11:12:28 +02:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c
sysctl_net.c