Linux Kernel SPI-NOR Shift-Out-Of-Bounds Vulnerability in Erase Type Handling

Vulnerability

A shift-out-of-bounds vulnerability has been identified in the Linux kernel's SPI-NOR flash memory handling. This issue arises in the 'spi_nor_set_erase_type' function, where the function is used to mask out an erase type. The vulnerability, detected by Undefined Behavior Sanitizer (UBSAN), occurs because the shift exponent exceeds the limits of a 32-bit integer, leading to out-of-bounds memory access. The problem is exacerbated by incorrect handling of erase types when the erase size is zero, and the assumption that the opcode '0xFF' is unused. The vulnerability affects the Linux kernel's stable releases.

Impact

Exploitation of this vulnerability causes a shift-out-of-bounds error, which can lead to undefined behavior such as memory corruption.

Reproduction

The vulnerability can be reproduced by using the 'spi_nor_set_erase_type' function to mask out an erase type when the erase size is zero. This triggers a shift-out-of-bounds error, as the function attempts to use an invalid shift exponent.

Remediation

Users can upgrade to the latest version of the Linux kernel, where this vulnerability has been addressed.

Added: Dec 30, 2025, 2:18 PM
Updated: Dec 30, 2025, 2:18 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
5.7
remediation
7.7
relevance
1.7
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.