mirror-linux/Documentation
Jakub Kicinski 8d5806c600 net: shaper: reject handle IDs exceeding internal bit-width
net_shaper_parse_handle() reads the user-supplied handle ID via
nla_get_u32(), accepting the full u32 range. However, the xarray key
is built by net_shaper_handle_to_index() using
FIELD_PREP(NET_SHAPER_ID_MASK, handle->id), where NET_SHAPER_ID_MASK
is GENMASK(25, 0) - only 26 bits wide. FIELD_PREP silently masks off
the upper bits at runtime. A user-supplied NODE id like 0x04000123
becomes id 0x123.

Additionally, a user-supplied id equal to NET_SHAPER_ID_UNSPEC
(0x03FFFFFF, which is NET_SHAPER_ID_MASK itself) would collide with
the sentinel used internally by the group operation to signal
"allocate a new NODE id".

Reject user-supplied IDs >= NET_SHAPER_ID_MASK (i.e., >= 0x03FFFFFF)
in the policy.

Fixes: 4b623f9f0f ("net-shapers: implement NL get operation")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260510192904.3987113-9-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-05-12 16:15:00 +02:00
..
ABI Char/Misc/IIO/and others driver updates for 7.1-rc1 2026-04-24 13:23:50 -07:00
PCI pci-v7.1-changes 2026-04-15 14:41:21 -07:00
RCU
accel
accounting
admin-guide cgroup: Fixes for v7.1-rc2 2026-05-05 15:43:32 -07:00
arch s390 updates for 7.1 merge window 2026-04-22 11:13:45 -07:00
block Documentation: ublk: address review comments for SHMEM_ZC docs 2026-04-09 19:10:44 -06:00
bpf docs/bpf: add missing fsession attach type to docs 2026-04-12 12:42:38 -07:00
cdrom
core-api mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
cpu-freq
crypto Crypto library fix and documentation update for 7.1 2026-04-21 11:46:22 -07:00
dev-tools mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
devicetree mailbox: updates for v7.1 2026-04-27 15:21:18 -07:00
doc-guide
driver-api We've finally gotten rid of the struct clk_ops::round_rate() code after months 2026-04-21 08:33:26 -07:00
edac
fault-injection
fb
features RISC-V updates for v7.1 2026-04-24 10:00:37 -07:00
filesystems \n 2026-04-27 16:45:39 -07:00
firmware-guide
firmware_class
fpga
gpu DRM Rust changes for v7.1-rc1 2026-04-01 07:32:05 +10:00
hid Docs: hid: intel-ish-hid: make long URL usable 2026-04-09 08:40:41 -06:00
hwmon hwmon: add support for MCP998X 2026-04-11 00:02:13 -07:00
i2c
iio
images
infiniband
input
kbuild Modules changes for v7.1-rc1 2026-04-14 17:16:38 -07:00
kernel-hacking
leds
litmus-tests
livepatch
locking
maintainer
mhi
misc-devices
mm mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
netlabel
netlink net: shaper: reject handle IDs exceeding internal bit-width 2026-05-12 16:15:00 +02:00
networking Delete some obsolete networking code 2026-04-24 09:41:58 -07:00
nvdimm
nvme
pcmcia
peci
power
process SPDX change for 7.1-rc1 2026-04-24 13:30:54 -07:00
rust docs: rust: general-information: use real example 2026-04-07 10:00:25 +02:00
scheduler sched_ext: Changes for v7.1 2026-04-15 10:54:24 -07:00
scsi
security ipe/stable-7.1 PR 20260413 2026-04-15 15:19:45 -07:00
sound
sphinx
sphinx-includes
sphinx-static
spi
staging net: remove ax25 and amateur radio (hamradio) subsystem 2026-04-23 10:24:02 -07:00
sunrpc/xdr
target
tee
timers
tools RTLA patches for v7.1: 2026-04-15 17:48:24 -07:00
trace Runtime Verification updates for 7.1: 2026-04-15 17:15:18 -07:00
translations Delete some obsolete networking code 2026-04-24 09:41:58 -07:00
usb
userspace-api dma-mapping updates for Linux 7.0: 2026-04-17 11:12:42 -07:00
virt - ESA nesting support 2026-04-13 19:01:15 +02:00
w1
watchdog
wmi platform/wmi: Replace .no_notify_data with .min_event_size 2026-04-13 14:11:27 +03:00
.gitignore
.renames.txt drivers: net: smsc: smc91c92: Remove this driver 2026-04-23 15:57:06 -07:00
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
atomic_bitops.txt
atomic_t.txt
conf.py
docutils.conf
index.rst
memory-barriers.txt
subsystem-apis.rst net: remove ISDN subsystem and Bluetooth CMTP 2026-04-23 10:24:02 -07:00