CVE-2026-99332 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
HID: core: Fix out-of-bounds left shift by 32 in s32ton()
Syzbot reported an out-of-bounds shift (32-bit integer shifted left by 32) in the s32ton() routine in the HID core. This routine converts a signed 32-bit integer to a signed n-bit integer, and it caps the value of n at 32. But when n == 32 there's no need to do anything; it can simply return the input value. This will avoid calculating (1 << n) when n is 32, which was the cause of the invalid shift.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/22/2026
The Linux kernel’s Human Interface Device subsystem contains a critical implementation flaw within the s32ton() function located in the HID core component. This vulnerability manifests as an out-of-bounds left bitwise shift operation involving a 32-bit integer shifted by exactly thirty-two positions. The root cause lies in the logic used to convert signed thirty-two-bit integers into smaller signed n-bit representations. While the routine correctly caps the target bit width at thirty-two, it fails to handle this boundary condition appropriately before performing arithmetic operations that assume valid shift ranges for standard 32-bit types.
In C programming standards and most hardware architectures, shifting a 32-bit integer by its own bit-width is undefined behavior. Specifically, left-shifting a signed integer by an amount greater than or equal to the width of the type results in unpredictable outcomes depending on the compiler implementation and target architecture. In this specific case, the code attempts to calculate one shifted left by n bits where n equals thirty-two. This operation triggers the out-of-bounds shift error reported by Syzbot, a fuzzing tool designed to expose such kernel-level defects through automated testing of edge cases in input handling routines.
The technical flaw stems from a lack of explicit boundary checking prior to executing bitwise arithmetic that depends on variable shift amounts. When n is equal to thirty-two, the value already fits within the target signed 32-bit integer format without requiring any transformation or truncation logic. However, the existing implementation proceeds to evaluate expressions involving shifts regardless of whether conversion is actually necessary. This oversight leads directly to undefined behavior which can result in data corruption, kernel panics, or potentially exploitable conditions if an attacker can influence the value passed as n through malicious HID device reports.
From a security perspective, this vulnerability aligns with CWE-783: Operator Precedence Logic Error and CWE-190: Integer Overflow or Wraparound depending on how the undefined behavior is interpreted by different compilers. It also relates to improper input validation regarding bit-width constraints in data conversion routines. The ATT&CK framework does not directly map this specific kernel bug to a tactical technique, but it falls under the broader category of exploitation via software vulnerabilities that affect system stability and integrity. Attackers with physical access or those able to inject malformed HID reports could potentially trigger this condition to cause denial of service against the host system by inducing an oops or panic in the kernel space.
The operational impact of this vulnerability primarily centers on system reliability rather than direct privilege escalation, although undefined behavior can sometimes be leveraged for more severe exploits depending on surrounding memory layout and compiler optimizations. A successful trigger could lead to a crash of the HID subsystem or the entire kernel if error handling is insufficiently robust. This affects all systems relying on Linux kernels with affected versions where user-space applications interact with USB or Bluetooth input devices that send crafted usage reports specifying invalid bit widths during descriptor parsing or value translation phases.
Mitigation strategies involve applying the upstream kernel patch that resolves this issue by adding a conditional check for n equal to thirty-two before any shift operations are performed. When n is determined to be thirty-two, the function should immediately return the input signed 32-bit integer without modification since no conversion is required. This simple logical adjustment eliminates the undefined behavior entirely. System administrators and developers must ensure that kernel updates incorporating this fix are deployed promptly across all affected distributions. Additionally, fuzzing efforts using tools like Syzbot remain essential for identifying similar edge-case errors in other parts of the HID stack or related subsystems to maintain overall system resilience against malformed input attacks.