linux/net
Pablo Neira Ayuso 76ef74d4a3 netfilter: nft_payload: incorrect arithmetics when fetching VLAN header bits
commit 696e1a48b1 upstream.

If the offset + length goes over the ethernet + vlan header, then the
length is adjusted to copy the bytes that are within the boundaries of
the vlan_ethhdr scratchpad area. The remaining bytes beyond ethernet +
vlan header are copied directly from the skbuff data area.

Fix incorrect arithmetic operator: subtract, not add, the size of the
vlan header in case of double-tagged packets to adjust the length
accordingly to address CVE-2023-0179.

Reported-by: Davide Ornaghi <d.ornaghi97@gmail.com>
Fixes: f6ae9f120d ("netfilter: nft_payload: add C-VLAN support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-18 11:58:09 +01:00
..
6lowpan
9p 9p/client: fix data race on req->status 2023-01-12 12:02:36 +01:00
802 mrp: introduce active flags to prevent UAF when applicant uninit 2022-12-31 13:33:02 +01:00
8021q
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: Add quirk to disable MWS Transport Configuration 2022-12-31 13:33:05 +01:00
bpf
bpfilter
bridge
caif caif: fix memory leak in cfctrl_linkup_request() 2023-01-12 12:02:33 +01:00
can
ceph
core bpf: pull before calling skb_postpull_rcsum() 2023-01-12 12:01:57 +01:00
dcb
dccp
dns_resolver
dsa
ethernet
ethtool ethtool: avoiding integer overflow in ethtool_phys_id() 2022-12-31 13:33:03 +01:00
hsr
ieee802154
ife
ipv4 net/ulp: prevent ULP without clone op from entering the LISTEN status 2023-01-12 12:02:33 +01:00
ipv6 ipv6/sit: use DEV_STATS_INC() to avoid data-races 2022-12-31 13:33:02 +01:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mctp
mpls
mptcp mptcp: fix lockdep false positive 2023-01-12 12:01:58 +01:00
ncsi
netfilter netfilter: nft_payload: incorrect arithmetics when fetching VLAN header bits 2023-01-18 11:58:09 +01:00
netlabel
netlink
netrom
nfc nfc: Fix potential resource leaks 2023-01-12 12:02:03 +01:00
nsh
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched net: sched: disallow noqueue for qdisc classes 2023-01-14 10:33:43 +01:00
sctp
smc
strparser
sunrpc Revert "SUNRPC: Use RMW bitops in single-threaded hot paths" 2023-01-14 10:33:42 +01:00
switchdev
tipc
tls
unix
vmw_vsock
wireless
x25
xdp
xfrm
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c
sysctl_net.c