linux-yocto/net
Jakub Kicinski a215b57239 netlink: make sure we allow at least one dump skb
Commit under Fixes tightened up the memory accounting for Netlink
sockets. Looks like the accounting is too strict for some existing
use cases, Marek reported issues with nl80211 / WiFi iw CLI.

To reduce number of iterations Netlink dumps try to allocate
messages based on the size of the buffer passed to previous
recvmsg() calls. If user space uses a larger buffer in recvmsg()
than sk_rcvbuf we will allocate an skb we won't be able to queue.

Make sure we always allow at least one skb to be queued.
Same workaround is already present in netlink_attachskb().
Alternative would be to cap the allocation size to
  rcvbuf - rmem_alloc
but as I said, the workaround is already present in other places.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/9794af18-4905-46c6-b12c-365ea2f05858@samsung.com
Fixes: ae8f160e7e ("netlink: Fix wraparounds of sk->sk_rmem_alloc.")
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250711001121.3649033-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-07-11 07:31:47 -07:00
..
6lowpan
9p netfs: Fix the request's work item to not require a ref 2025-05-21 14:35:20 +02:00
802 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
8021q
appletalk net: appletalk: Fix device refcount leak in atrtr_create() 2025-07-10 18:01:08 -07:00
atm atm: clip: Fix NULL pointer dereference in vcc_sendmsg() 2025-07-09 19:09:36 -07:00
ax25 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
batman-adv treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bluetooth Bluetooth: hci_event: Fix not marking Broadcast Sink BIS as connected 2025-07-03 11:37:43 -04:00
bpf
bridge bridge: mcast: Fix use-after-free during router port configuration 2025-06-23 18:19:10 -07:00
caif
can treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ceph
core net: selftests: fix TCP packet checksum 2025-06-26 10:50:49 +02:00
dcb
devlink
dns_resolver
dsa net: dsa: tag_brcm: legacy: fix pskb_may_pull length 2025-05-30 19:20:18 -07:00
ethernet
ethtool Including fixes from bluetooth and wireless. 2025-06-12 09:50:36 -07:00
handshake
hsr treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ieee802154 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ife
ipv4 tcp: refine sk_rcvbuf increase for ooo packets 2025-07-09 19:24:10 -07:00
ipv6 gre: Fix IPv6 multicast route creation. 2025-07-10 18:10:47 -07:00
iucv
kcm
key
l2tp
l3mdev
lapb treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
llc treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mac80211 wifi: mac80211: add the virtual monitor after reconfig complete 2025-07-10 13:27:14 +02:00
mac802154
mctp net: mctp: use nlmsg_payload() for netlink message data extraction 2025-05-26 17:38:27 +02:00
mpls mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu(). 2025-06-17 18:21:59 -07:00
mptcp treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ncsi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
netfilter treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
netlabel calipso: unlock rcu before returning -EAFNOSUPPORT 2025-06-05 08:03:38 -07:00
netlink netlink: make sure we allow at least one dump skb 2025-07-11 07:31:47 -07:00
netrom treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
nfc NFC: nci: uart: Set tty->disc_data only in success path 2025-06-19 08:33:54 -07:00
nsh
openvswitch openvswitch: Allocate struct ovs_pcpu_storage dynamically 2025-06-17 14:47:46 +02:00
packet treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
phonet
psample
qrtr
rds replace strncpy with strscpy_pad 2025-05-26 22:28:44 +02:00
rfkill
rose rose: fix dangling neighbour pointers in rose_rt_device_down() 2025-07-01 19:28:48 -07:00
rxrpc rxrpc: Fix oops due to non-existence of prealloc backlog struct 2025-07-09 19:41:44 -07:00
sched net/sched: sch_qfq: Fix null-deref in agg_dequeue 2025-07-10 11:08:35 +02:00
sctp treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
shaper
smc
strparser
sunrpc sunrpc: fix loop in gss seqno cache 2025-06-23 11:01:15 -04:00
switchdev
tipc tipc: Fix use-after-free in tipc_conn_close(). 2025-07-07 18:38:24 -07:00
tls bpf-next-6.16 2025-05-28 15:52:42 -07:00
unix af_unix: Don't set -ECONNRESET for consumed OOB skb. 2025-06-24 10:10:07 +02:00
vmw_vsock vsock: Fix IOCTL_VM_SOCKETS_GET_LOCAL_CID to check also transport_local 2025-07-08 08:39:49 -07:00
wireless wifi: prevent A-MSDU attacks in mesh networks 2025-07-07 10:54:13 +02:00
x25 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
xdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-22 09:42:41 -07:00
xfrm treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
compat.c
devres.c
Kconfig net: Kconfig NET_DEVMEM selects GENERIC_ALLOCATOR 2025-05-27 17:31:42 -07:00
Kconfig.debug
Makefile
socket.c
sysctl_net.c