net/sched: cls_u32: validate offshift to prevent shift-out-of-bounds
A public exploit exists; no exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel aef96eead2860cbfa371e4471d4f04412213b958, Kernel 006a4598da9a6b02e0ddc3ca5042b97224774364, Kernel 313cb9ffc4101a885d791facf4b5ea3d5e06144d and 8 more.
In the Linux kernel, the following vulnerability has been resolved: net/sched: cls_u32: validate offshift to prevent shift-out-of-bounds u32_change() copies the user-provided tc_u32_sel.offshift (unsigned char, 0-255) into the kernel knode object without bounds validation. When a packet later hits u32_classify() with TC_U32_VAROFFSET set, it evaluates `ntohs(offmask & *data) >> offshift` where the left operand is a 16-bit value promoted to a 32-bit int. Any offshift >= 32 is undefined behavior per C11 6.5.7p3, triggerable by an unprivileged user via user/network namespaces. UBSAN: shift-out-of-bounds in net/sched/cls_u32.c:236:43 shift exponent 32 is too large for 32-bit type int Fix this by rejecting offshift >= 16 during filter creation in u32_change().
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <aef96eead2860cbfa371e4471d4f04412213b958, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <006a4598da9a6b02e0ddc3ca5042b97224774364, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <313cb9ffc4101a885d791facf4b5ea3d5e06144d, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <724c8edbacf1259988829cb9967f751222121d8a, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <7fd5b2287e5cf33e114fb7f0cef781a546039757, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <9990cac513e8b191de2ee589051ea7ebf3cee940, =2.6.12 | aef96eead2860cbfa371e4471d4f04412213b958, 006a4598da9a6b02e0ddc3ca5042b97224774364, 313cb9ffc4101a885d791facf4b5ea3d5e06144d, 724c8edbacf1259988829cb9967f751222121d8a, 7fd5b2287e5cf33e114fb7f0cef781a546039757, 9990cac513e8b191de2ee589051ea7ebf3cee940 |
| linux-kernel: Kernel | >=6.13.0 <6.18.57, >=6.19.0 <7.1.8, >=6.2.0 <6.6.160, >=6.7.0 <6.12.114, >=2.6.12 <6.1.191 | 6.18.57, 7.1.8, 6.6.160, 6.12.114, 6.1.191 |
Exploit evidence
1 public sources
Coverage
News and research mentioning this CVE
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket