CVE-2026-139167 in Linux
Summary
by MITRE • 11/30/2026
In the Linux kernel, the following vulnerability has been resolved:
net-sysfs: reject a one-entry RPS flow table
store_rps_dev_flow_table_cnt() accepts rps_flow_cnt == 1. For count == 1 the round-up loop leaves mask == 0, which is stored as log == 0 in the tag (tag_ptr |= ilog2(mask) + 1). get_rps_cpu() then calls rfs_slot() -> hash_32(hash, rps_tag_to_log(tag_ptr)) with log == 0:
include/linux/hash.h:68 return __hash_32(val) >> (32 - bits); /* bits == 0 -> shift by 32 */
The shift by 32 is undefined and yields the full 32-bit hash, which is used to index the one-entry rps_dev_flow[] table unchecked:
UBSAN: shift-out-of-bounds in ./include/linux/hash.h:68:24 shift exponent 32 is too large for 32-bit type 'unsigned int' __ubsan_handle_shift_out_of_bounds+0x11c/0x208 get_rps_cpu+0x12fc/0x1344 netif_rx_internal+0x1e0/0x4d4
rps_dev_flow[] is then read (rflow->cpu) and written (last_qtail) out of
bounds on the packet path. Require at least two entries.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/30/2026
The Linux kernel contains a critical vulnerability within the network subsystem, specifically in the Receive Packet Steering implementation found in net-sysfs. This flaw arises from an insufficient validation check when configuring the RPS flow table size via the store_rps_dev_flow_table_cnt function. The code currently accepts a request for exactly one entry in the flow table without rejecting it as invalid. When the count is set to one, the internal logic attempts to calculate a bitmask by rounding up the power of two required to cover that count. However, this calculation results in a mask value of zero because the algorithm fails to account for the minimum requirement of having at least two slots to properly initialize the hash table structure. This erroneous zero mask is then converted into a logarithmic tag value stored as log equal to zero within the tag_ptr variable.
The operational impact of this configuration error manifests during packet processing when get_rps_cpu attempts to determine which CPU should handle an incoming network packet. The function calls rfs_slot, which in turn invokes hash_32 with the previously calculated log parameter set to zero. According to standard hashing implementations such as those defined in include/linux/hash.h, a shift amount of zero bits results in a right-shift operation where the exponent is effectively thirty-two for a thirty-two-bit unsigned integer type. In C programming standards and many compiler architectures, shifting by an amount greater than or equal to the width of the operand constitutes undefined behavior. While some compilers may optimize this specific case to return the original value unchanged, others may produce unpredictable results depending on architecture-specific instruction sets.
This undefined behavior leads directly to a severe out-of-bounds memory access vulnerability. Because the hash function returns an arbitrary thirty-two-bit integer rather than a valid index constrained by the table size, the kernel proceeds to use this unbounded value as an array index for rps_dev_flow. Since the actual allocated table contains only one entry, any non-zero result from the hash calculation will cause reads and writes outside the bounds of the allocated memory region. This manifests in user space logs as a UBSAN shift-out-of-bounds error, indicating that the exponent thirty-two is too large for the thirty-bit type involved. More critically, on the packet path, this allows an attacker to trigger arbitrary read or write operations through crafted network traffic if they can influence the hash input values, potentially leading to kernel panic, information disclosure, or privilege escalation depending on what memory locations are accessed and modified during these out-of-bounds accesses.
From a classification perspective, this vulnerability aligns with CWE-190 Integer Overflow resulting in undefined behavior due to improper handling of edge cases in arithmetic operations, as well as CWE-787 Out-of-bounds Write when the hash result leads to memory corruption. In terms of attack vectors, it relates to ATT&CK technique T1499 Endpoint Denial of Service if triggered repeatedly to crash the system, or potentially T1059 Command and Control if exploited for code execution via kernel exploitation techniques such as ROP chains leveraging the arbitrary write primitive. The root cause is fundamentally a lack of input validation regarding minimum resource allocation requirements before proceeding with hash table initialization logic.
To mitigate this vulnerability, it is essential to enforce strict bounds checking on configuration parameters that determine data structure sizes within the network stack. Specifically, the store_rps_dev_flow_table_cnt function must be updated to reject any request for an RPS flow table size of one or less. By requiring a minimum of two entries, the system ensures that the bitmask calculation yields a non-zero value, thereby preventing the logarithmic tag from becoming zero and avoiding the subsequent undefined shift operation in the hash function. This fix should be applied as part of a kernel patch update to ensure network processing paths remain robust against malformed configuration states triggered by local or remote actors with appropriate permissions to modify sysfs entries related to RPS settings.