CVE-2025-21845: mtd: spi-nor: sst: Fix SST write failure

Published Mar 12, 2025
·
Updated

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

mtd: spi-nor: sst: Fix SST write failure

'commit 18bcb4aa54ea ("mtd: spi-nor: sst: Factor out common write operation to sstnorwritedata()")' introduced a bug where only one byte of data is written, regardless of the number of bytes passed to sstnorwritedata(), causing a kernel crash during the write operation. Ensure the correct number of bytes are written as passed to sstnorwritedata().

Call trace: [ 57.400180] ------------[ cut here ]------------ [ 57.404842] While writing 2 byte written 1 bytes [ 57.409493] WARNING: CPU: 0 PID: 737 at drivers/mtd/spi-nor/sst.c:187 sstnorwritedata+0x6c/0x74 [ 57.418464] Modules linked in: [ 57.421517] CPU: 0 UID: 0 PID: 737 Comm: mtddebug Not tainted 6.12.0-g5ad04afd91f9 #30 [ 57.429517] Hardware name: Xilinx Versal A2197 Processor board revA - x-prc-02 revA (DT) [ 57.437600] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 57.444557] pc : sstnorwritedata+0x6c/0x74 [ 57.448911] lr : sstnorwritedata+0x6c/0x74 [ 57.453264] sp : ffff80008232bb40 [ 57.456570] x29: ffff80008232bb40 x28: 0000000000010000 x27: 0000000000000001 [ 57.463708] x26: 000000000000ffff x25: 0000000000000000 x24: 0000000000000000 [ 57.470843] x23: 0000000000010000 x22: ffff80008232bbf0 x21: ffff000816230000 [ 57.477978] x20: ffff0008056c0080 x19: 0000000000000002 x18: 0000000000000006 [ 57.485112] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80008232b580 [ 57.492246] x14: 0000000000000000 x13: ffff8000816d1530 x12: 00000000000004a4 [ 57.499380] x11: 000000000000018c x10: ffff8000816fd530 x9 : ffff8000816d1530 [ 57.506515] x8 : 00000000fffff7ff x7 : ffff8000816fd530 x6 : 0000000000000001 [ 57.513649] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 [ 57.520782] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0008049b0000 [ 57.527916] Call trace: [ 57.530354] sstnorwritedata+0x6c/0x74 [ 57.534361] sstnorwrite+0xb4/0x18c [ 57.538019] mtdwriteoobstd+0x7c/0x88 [ 57.541941] mtdwriteoob+0x70/0xbc [ 57.545511] mtdwrite+0x68/0xa8 [ 57.548733] mtdcharwrite+0x10c/0x290 [ 57.552477] vfswrite+0xb4/0x3a8 [ 57.555791] ksyswrite+0x74/0x10c [ 57.559189] arm64syswrite+0x1c/0x28 [ 57.563109] invokesyscall+0x54/0x11c [ 57.566856] el0svccommon.constprop.0+0xc0/0xe0 [ 57.571557] doel0svc+0x1c/0x28 [ 57.574868] el0svc+0x30/0xcc [ 57.577921] el0t64synchandler+0x120/0x12c [ 57.582276] el0t64sync+0x190/0x194 [ 57.585933] ---[ end trace 0000000000000000 ]---

[pratyush@kernel.org: add Cc stable tag]

Affected Software

6 affected components
Linux Linux kernel>=6.12<6.12.17
Linux Linux kernel>=6.13<6.13.5
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2
Linux Linux kernel=6.14-rc3
Linux Kernel

Event History

Mar 12, 2025
CVE Published
via MITRE·09:42 AM
Data Sourced
via MITRE·09:42 AM
Description
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-21845?

CVE-2025-21845 has been classified with a moderate severity level due to its impact on data integrity during write operations.

2

How do I fix CVE-2025-21845?

To fix CVE-2025-21845, update your Linux kernel to a version that includes the relevant patches addressing the SST write failure.

3

What software is affected by CVE-2025-21845?

CVE-2025-21845 affects the Linux kernel, specifically components dealing with MTD and SPI-NOR flash memory.

4

What is the nature of the vulnerability in CVE-2025-21845?

CVE-2025-21845 is a coding bug that causes only one byte of data to be written instead of the intended amount during certain operations.

5

When was CVE-2025-21845 reported?

CVE-2025-21845 was identified following the introduction of a bug in a Linux kernel commit related to SPI-NOR write operations.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203