Go to file
Jakub Kicinski 17e83b78bf netlink: make sure we allow at least one dump skb
commit a215b5723922f8099078478122f02100e489cb80 upstream.

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: ae8f160e7eb2 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c31ee1695b6d88042d7bd6b2a77babb70f941451)
2025-07-22 16:16:43 +08:00
.github/workflows CI: Add patch check by using build kernel sw8a 2025-07-11 02:39:50 +08:00
Documentation x86/bugs: Add a Transient Scheduler Attacks mitigation 2025-07-14 10:42:19 +08:00
LICENSES LICENSES: add 0BSD license text 2025-01-18 13:07:45 +08:00
arch x86/mm: Disable hugetlb page table sharing on 32-bit 2025-07-22 16:16:43 +08:00
block scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer 2025-05-26 10:36:22 +08:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2025-05-09 22:54:46 +08:00
crypto crypto: xts - Only add ecb if it is not already there 2025-06-20 14:38:41 +08:00
deepin deepin: OWNERS: Update OWNERS 2025-05-29 18:26:52 +08:00
drivers pwm: mediatek: Ensure to disable clocks in error path 2025-07-22 16:16:43 +08:00
fs erofs: fix to add missing tracepoint in erofs_read_folio() 2025-07-22 16:16:43 +08:00
include mm: fix the inaccurate memory statistics issue for users 2025-07-22 16:16:42 +08:00
init sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP 2025-05-09 23:02:50 +08:00
io_uring io_uring: fix task leak issue in io_wq_create() 2025-07-03 11:32:06 +08:00
ipc ipc: fix to protect IPCS lookups using RCU 2025-07-03 11:31:56 +08:00
kernel perf: Revert to requiring CAP_SYS_ADMIN for uprobes 2025-07-22 16:16:37 +08:00
lib maple_tree: fix mt_destroy_walk() on root leaf node 2025-07-22 16:16:42 +08:00
mm mm/vmalloc: leave lazy MMU mode on PTE mapping error 2025-07-22 16:16:43 +08:00
net netlink: make sure we allow at least one dump skb 2025-07-22 16:16:43 +08:00
rust rust: module: place cleanup_module() in .exit.text section 2025-07-09 09:49:55 +08:00
samples samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora 2025-06-10 10:34:50 +08:00
scripts scripts/gdb: fix interrupts.py after maple tree conversion 2025-07-22 16:16:42 +08:00
security selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len 2025-07-03 11:32:08 +08:00
sound ASoC: cs35l56: probe() should fail if the device ID is not recognized 2025-07-22 16:16:37 +08:00
tools x86/rdrand: Disable RDSEED on AMD Cyan Skillfish 2025-07-22 16:16:43 +08:00
usr kbuild: hdrcheck: fix cross build with clang 2025-03-18 15:26:16 +08:00
virt KVM: Discard zero mask with function kvm_dirty_ring_reset 2025-06-06 14:45:06 +08:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore Remove *.orig pattern from .gitignore 2024-12-10 20:42:03 +08:00
.mailmap 20 hotfixes. 12 are cc:stable and the remainder address post-6.5 issues 2023-10-24 09:52:16 -10:00
.rustfmt.toml rust: add `.rustfmt.toml` 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS fs: Remove NTFS classic 2024-12-10 20:39:15 +08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS selftests: ifs: verify test interfaces are created by the driver 2025-07-01 11:32:36 +08:00
Makefile Linux 6.6.98 2025-07-16 20:42:49 +08:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.