android_kernel_xiaomi_sm8450/net
Sven Eckelmann 72e4a5a28e batman-adv: Hold rtnl lock during MTU update via netlink
commit 987aae75fc1041072941ffb622b45ce2359a99b9 upstream.

The automatic recalculation of the maximum allowed MTU is usually triggered
by code sections which are already rtnl lock protected by callers outside
of batman-adv. But when the fragmentation setting is changed via
batman-adv's own batadv genl family, then the rtnl lock is not yet taken.

But dev_set_mtu requires that the caller holds the rtnl lock because it
uses netdevice notifiers. And this code will then fail the check for this
lock:

  RTNL: assertion failed at net/core/dev.c (1953)

Cc: stable@vger.kernel.org
Reported-by: syzbot+f8812454d9b3ac00d282@syzkaller.appspotmail.com
Fixes: c6a953cce8d0 ("batman-adv: Trigger events for auto adjusted MTU")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230821-batadv-missing-mtu-rtnl-lock-v1-1-1c5a7bfe861e@narfation.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:23:16 +02:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv batman-adv: Hold rtnl lock during MTU update via netlink 2023-08-30 16:23:16 +02:00
bluetooth Bluetooth: L2CAP: Fix use-after-free 2023-08-26 15:26:45 +02:00
bpf
bpfilter
bridge bridge: Add extack warning when enabling STP in netns. 2023-07-27 08:44:39 +02:00
caif
can can: bcm: Fix UAF in bcm_proc_show() 2023-07-27 08:44:35 +02:00
ceph libceph, rbd: ignore addr->type while comparing in some cases 2023-08-30 16:23:11 +02:00
core rtnetlink: Reject negative ifindexes in RTM_NEWLINK 2023-08-30 16:23:14 +02:00
dcb net: dcb: choose correct policy to parse DCB_ATTR_BCN 2023-08-11 11:57:50 +02:00
dccp dccp: annotate data-races in dccp_poll() 2023-08-30 16:23:12 +02:00
decnet
dns_resolver
dsa net: dsa: tag_sja1105: fix MAC DA patching from meta frames 2023-07-27 08:44:10 +02:00
ethernet
ethtool
hsr
ieee802154
ife
ipv4 net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled 2023-08-26 15:26:56 +02:00
ipv6 ip6_vti: fix slab-use-after-free in decode_session6 2023-08-26 15:26:52 +02:00
iucv
kcm
key net: af_key: fix sadb_x_filter validation 2023-08-26 15:26:51 +02:00
l2tp
l3mdev
lapb
llc llc: Don't drop packet from non-root netns. 2023-07-27 08:44:40 +02:00
mac80211
mac802154
mpls
mptcp
ncsi
netfilter netfilter: nf_tables: fix out of memory error handling 2023-08-30 16:23:13 +02:00
netlabel
netlink
netrom
nfc
nsh
openvswitch
packet net/packet: annotate data-races around tp->status 2023-08-16 18:21:01 +02:00
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched net/sched: fix a qdisc modification with ambiguous command request 2023-08-30 16:23:13 +02:00
sctp sock: annotate data-races around prot->memory_pressure 2023-08-30 16:23:12 +02:00
smc
strparser
sunrpc xprtrdma: Remap Receive buffers after a reconnect 2023-08-30 16:23:09 +02:00
switchdev
tipc tipc: stop tipc crypto on failure in tipc_node_create 2023-08-11 11:57:37 +02:00
tls
unix af_unix: Fix null-ptr-deref in unix_stream_sendpage(). 2023-08-26 15:26:56 +02:00
vmw_vsock
wimax
wireless wifi: cfg80211: Fix return value in scan logic 2023-08-11 11:57:47 +02:00
x25
xdp
xfrm xfrm: add forgotten nla_policy for XFRMA_MTIMER_THRESH 2023-08-26 15:26:52 +02:00
compat.c
devres.c
Kconfig
Makefile
socket.c
sysctl_net.c