Menu

Star on GitHub · 3.2k

CVE-2023-54295

In the Linux kernel, the following vulnerability has been resolved: mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type spi_nor_set_erase_type() was used either to set or to mask out…

Published Dec 30, 2025EPSS 0.20%

Overview

CVE-2023-54295 is a known-severity vulnerability. It was published on December 30, 2025.

Technical description

In the Linux kernel, the following vulnerability has been resolved:

mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type

spi_nor_set_erase_type() was used either to set or to mask out an erase

type. When we used it to mask out an erase type a shift-out-of-bounds

was hit:

UBSAN: shift-out-of-bounds in drivers/mtd/spi-nor/core.c:2237:24

shift exponent 4294967295 is too large for 32-bit type 'int'

The setting of the size_{shift, mask} and of the opcode are unnecessary

when the erase size is zero, as throughout the code just the erase size

is considered to determine whether an erase type is supported or not.

Setting the opcode to 0xFF was wrong too as nobody guarantees that 0xFF

is an unused opcode. Thus when masking out an erase type, just set the

erase size to zero. This will fix the shift-out-of-bounds.

[ta: refine changes, new commit message, fix compilation error]

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2023-54295?

CVE-2023-54295 is a known-severity vulnerability. It was published on December 30, 2025.

How severe is CVE-2023-54295?

CVSS score information is not yet available for this vulnerability. Check back as the CVE record is updated by NVD analysts.

How do I fix or remediate CVE-2023-54295?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2023-54295?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2023-54295 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.