linux/net
Johannes Berg 31ce5da48a wifi: mac80211: fix MBSSID parsing use-after-free
Commit ff05d4b45d upstream.
This is a different version of the commit, changed to store
the non-transmitted profile in the elems, and freeing it in
the few places where it's relevant, since that is only the
case when the last argument for parsing (the non-tx BSSID)
is non-NULL.

When we parse a multi-BSSID element, we might point some
element pointers into the allocated nontransmitted_profile.
However, we free this before returning, causing UAF when the
relevant pointers in the parsed elements are accessed.

Fix this by not allocating the scratch buffer separately but
as part of the returned structure instead, that way, there
are no lifetime issues with it.

The scratch buffer introduction as part of the returned data
here is taken from MLO feature work done by Ilan.

This fixes CVE-2022-42719.

Fixes: 5023b14cf4 ("mac80211: support profile split between elements")
Co-developed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-17 17:26:07 +02:00
..
6lowpan
9p net/9p: Initialize the iounit field during fid creation 2022-08-21 15:16:26 +02:00
802
8021q net: make free_netdev() more lenient with unregistering devices 2022-07-29 17:19:07 +02:00
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: L2CAP: Fix build errors in some archs 2022-09-05 10:28:55 +02:00
bpf bpf: Don't redirect packets with invalid pkt_len 2022-09-05 10:28:56 +02:00
bpfilter
bridge netfilter: ebtables: fix memory leak when blob is malformed 2022-09-28 11:10:36 +02:00
caif
can can: j1939: j1939_session_destroy(): fix memory leak of skbs 2022-08-25 11:38:23 +02:00
ceph
core net: socket: remove register_gifconf 2022-09-28 11:10:35 +02:00
dcb
dccp dccp: put dccp_qpolicy_full() and dccp_qpolicy_push() in the same lock 2022-08-21 15:15:52 +02:00
decnet net: Fix data-races around sysctl_[rw]mem(_offset)?. 2022-08-31 17:15:19 +02:00
dns_resolver
dsa
ethernet
ethtool
hsr
ieee802154 net/ieee802154: fix uninit value bug in dgram_sendmsg 2022-10-15 07:55:52 +02:00
ife
ipv4 net: socket: remove register_gifconf 2022-09-28 11:10:35 +02:00
ipv6 ipv6: sr: fix out-of-bounds read when setting HMAC data. 2022-09-15 11:32:05 +02:00
iucv
kcm kcm: fix strp_init() order and cleanup 2022-09-08 11:11:37 +02:00
key af_key: Do not call xfrm_probe_algs in parallel 2022-08-31 17:15:15 +02:00
l2tp
l3mdev
lapb
llc
mac80211 wifi: mac80211: fix MBSSID parsing use-after-free 2022-10-17 17:26:07 +02:00
mac802154 net: mac802154: Fix a condition in the receive path 2022-09-08 11:11:40 +02:00
mpls net: Use u64_stats_fetch_begin_irq() for stats fetch. 2022-09-08 11:11:40 +02:00
mptcp net: Fix data-races around sysctl_[rw]mem(_offset)?. 2022-08-31 17:15:19 +02:00
ncsi
netfilter netfilter: nf_tables: fix percpu memory leak at nf_tables_addchain() 2022-09-28 11:10:35 +02:00
netlabel
netlink net: genl: fix error path memory leak in policy dumping 2022-08-25 11:38:07 +02:00
netrom
nfc
nsh
openvswitch net: openvswitch: fix parsing of nw_proto for IPv6 fragments 2022-06-29 08:59:45 +02:00
packet net/af_packet: check len when min_header_len equals to 0 2022-09-05 10:28:59 +02:00
phonet
psample
qrtr qrtr: Convert qrtr_ports from IDR to XArray 2022-08-25 11:38:23 +02:00
rds rds: add missing barrier to release_refill 2022-08-25 11:37:49 +02:00
rfkill
rose rose: check NULL rose_loopback_neigh->loopback 2022-08-31 17:15:16 +02:00
rxrpc rxrpc: Fix calc of resend age 2022-09-23 14:16:59 +02:00
sched net: sched: act_ct: fix possible refcount leak in tcf_ct_init() 2022-10-05 10:38:42 +02:00
sctp sctp: leave the err path free in sctp_stream_init to sctp_stream_free 2022-08-03 12:00:49 +02:00
smc net/smc: Stop the CLC flow if no link to map buffers on 2022-09-28 11:10:36 +02:00
strparser
sunrpc SUNRPC: RPC level errors should set task->tk_rpc_status 2022-08-31 17:15:15 +02:00
switchdev
tipc tipc: fix shift wrapping bug in map_get() 2022-09-15 11:32:05 +02:00
tls net/tls: Remove the context from the list in tls_device_down 2022-08-03 12:00:46 +02:00
unix
vmw_vsock vsock: Set socket state back to SS_UNCONNECTED in vsock_connect_timeout() 2022-08-25 11:37:59 +02:00
wimax
wireless wifi: cfg80211: update hidden BSSes to avoid WARN_ON 2022-10-15 07:55:56 +02:00
x25
xdp xsk: Inherit need_wakeup flag for shared sockets 2022-10-15 07:55:51 +02:00
xfrm net: Fix data-races around netdev_max_backlog. 2022-08-31 17:15:19 +02:00
compat.c
devres.c
Kconfig
Makefile
socket.c net: Fix a data-race around sysctl_somaxconn. 2022-08-31 17:15:21 +02:00
sysctl_net.c