CVE-2025-21845: Vulnerability in Linux Linux
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 `sst_nor_write_data()`")' introduced a bug where only one byte of data is written, regardless of the number of bytes passed to sst_nor_write_data(), causing a kernel crash during the write operation. Ensure the correct number of bytes are written as passed to sst_nor_write_data(). 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 sst_nor_write_data+0x6c/0x74 [ 57.418464] Modules linked in: [ 57.421517] CPU: 0 UID: 0 PID: 737 Comm: mtd_debug 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 : sst_nor_write_data+0x6c/0x74 [ 57.448911] lr : sst_nor_write_data+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] sst_nor_write_data+0x6c/0x74 [ 57.534361] sst_nor_write+0xb4/0x18c [ 57.538019] mtd_write_oob_std+0x7c/0x88 [ 57.541941] mtd_write_oob+0x70/0xbc [ 57.545511] mtd_write+0x68/0xa8 [ 57.548733] mtdchar_write+0x10c/0x290 [ 57.552477] vfs_write+0xb4/0x3a8 [ 57.555791] ksys_write+0x74/0x10c [ 57.559189] __arm64_sys_write+0x1c/0x28 [ 57.563109] invoke_syscall+0x54/0x11c [ 57.566856] el0_svc_common.constprop.0+0xc0/0xe0 [ 57.571557] do_el0_svc+0x1c/0x28 [ 57.574868] el0_svc+0x30/0xcc [ 57.577921] el0t_64_sync_handler+0x120/0x12c [ 57.582276] el0t_64_sync+0x190/0x194 [ 57.585933] ---[ end trace 0000000000000000 ]--- [pratyush@kernel.org: add Cc stable tag]
AI Analysis
Technical Summary
CVE-2025-21845 is a vulnerability identified in the Linux kernel specifically within the Memory Technology Device (MTD) subsystem's SPI-NOR flash driver for SST devices. The issue originated from a recent commit (18bcb4aa54ea) that refactored the write operation into a common function called sst_nor_write_data(). However, this change introduced a bug where the function incorrectly writes only one byte of data regardless of the intended number of bytes. This discrepancy leads to a kernel crash during write operations to SST SPI-NOR flash devices. The kernel panic and crash are triggered because the driver attempts to write fewer bytes than requested, causing inconsistencies and triggering warnings in the kernel logs. The provided call trace shows the failure occurring in sst_nor_write_data(), propagating through mtd_write_oob_std(), mtd_write_oob(), mtd_write(), and ultimately to the system call interface. This vulnerability affects Linux kernel versions containing the faulty commit and impacts systems using SST SPI-NOR flash memory devices. While the vulnerability does not appear to be exploited in the wild yet, it poses a risk of denial of service (DoS) due to kernel crashes during normal write operations. The issue is particularly relevant for embedded systems, industrial devices, and other hardware platforms relying on SST SPI-NOR flash chips managed by the Linux MTD subsystem. No CVSS score has been assigned yet, and no public patches or exploits are currently reported, but the vulnerability is published and recognized by the Linux project.
Potential Impact
For European organizations, the primary impact of CVE-2025-21845 is the risk of system instability and denial of service on devices running vulnerable Linux kernels with SST SPI-NOR flash memory. This can affect critical infrastructure, industrial control systems, telecommunications equipment, and embedded devices commonly used in sectors such as manufacturing, energy, transportation, and IoT deployments. A kernel crash can lead to unexpected downtime, data loss, or interruption of services, which may have cascading effects on operational continuity and safety. Since the vulnerability requires write access to the SPI-NOR flash, exploitation may be limited to local users or processes with sufficient privileges, but in multi-tenant or remotely managed environments, this could be leveraged to disrupt services. European organizations with embedded Linux devices or custom hardware platforms using SST SPI-NOR flash should be particularly vigilant. The impact on confidentiality and integrity is minimal as the vulnerability primarily causes availability issues. However, availability disruptions in critical systems can have severe economic and safety consequences.
Mitigation Recommendations
To mitigate CVE-2025-21845, European organizations should: 1) Identify all Linux systems using SST SPI-NOR flash devices managed by the MTD subsystem, especially embedded and industrial devices. 2) Apply the latest Linux kernel updates or patches that fix the sst_nor_write_data() function to ensure the correct number of bytes are written during flash operations. 3) If immediate patching is not feasible, restrict write operations to the affected devices by limiting access to privileged users and services. 4) Implement monitoring for kernel warnings or crashes related to the SPI-NOR driver to detect potential exploitation or instability early. 5) For custom or embedded Linux distributions, coordinate with vendors or maintainers to backport the fix promptly. 6) Conduct thorough testing of firmware and kernel updates in controlled environments before deployment to avoid regressions. 7) Consider hardware inventory audits to identify devices using SST SPI-NOR flash and evaluate their exposure. 8) Employ robust backup and recovery procedures to minimize downtime impact in case of crashes. These steps go beyond generic advice by focusing on device-specific identification, access control, monitoring, and vendor coordination.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Sweden, Finland
CVE-2025-21845: Vulnerability in Linux Linux
Description
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 `sst_nor_write_data()`")' introduced a bug where only one byte of data is written, regardless of the number of bytes passed to sst_nor_write_data(), causing a kernel crash during the write operation. Ensure the correct number of bytes are written as passed to sst_nor_write_data(). 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 sst_nor_write_data+0x6c/0x74 [ 57.418464] Modules linked in: [ 57.421517] CPU: 0 UID: 0 PID: 737 Comm: mtd_debug 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 : sst_nor_write_data+0x6c/0x74 [ 57.448911] lr : sst_nor_write_data+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] sst_nor_write_data+0x6c/0x74 [ 57.534361] sst_nor_write+0xb4/0x18c [ 57.538019] mtd_write_oob_std+0x7c/0x88 [ 57.541941] mtd_write_oob+0x70/0xbc [ 57.545511] mtd_write+0x68/0xa8 [ 57.548733] mtdchar_write+0x10c/0x290 [ 57.552477] vfs_write+0xb4/0x3a8 [ 57.555791] ksys_write+0x74/0x10c [ 57.559189] __arm64_sys_write+0x1c/0x28 [ 57.563109] invoke_syscall+0x54/0x11c [ 57.566856] el0_svc_common.constprop.0+0xc0/0xe0 [ 57.571557] do_el0_svc+0x1c/0x28 [ 57.574868] el0_svc+0x30/0xcc [ 57.577921] el0t_64_sync_handler+0x120/0x12c [ 57.582276] el0t_64_sync+0x190/0x194 [ 57.585933] ---[ end trace 0000000000000000 ]--- [pratyush@kernel.org: add Cc stable tag]
AI-Powered Analysis
Technical Analysis
CVE-2025-21845 is a vulnerability identified in the Linux kernel specifically within the Memory Technology Device (MTD) subsystem's SPI-NOR flash driver for SST devices. The issue originated from a recent commit (18bcb4aa54ea) that refactored the write operation into a common function called sst_nor_write_data(). However, this change introduced a bug where the function incorrectly writes only one byte of data regardless of the intended number of bytes. This discrepancy leads to a kernel crash during write operations to SST SPI-NOR flash devices. The kernel panic and crash are triggered because the driver attempts to write fewer bytes than requested, causing inconsistencies and triggering warnings in the kernel logs. The provided call trace shows the failure occurring in sst_nor_write_data(), propagating through mtd_write_oob_std(), mtd_write_oob(), mtd_write(), and ultimately to the system call interface. This vulnerability affects Linux kernel versions containing the faulty commit and impacts systems using SST SPI-NOR flash memory devices. While the vulnerability does not appear to be exploited in the wild yet, it poses a risk of denial of service (DoS) due to kernel crashes during normal write operations. The issue is particularly relevant for embedded systems, industrial devices, and other hardware platforms relying on SST SPI-NOR flash chips managed by the Linux MTD subsystem. No CVSS score has been assigned yet, and no public patches or exploits are currently reported, but the vulnerability is published and recognized by the Linux project.
Potential Impact
For European organizations, the primary impact of CVE-2025-21845 is the risk of system instability and denial of service on devices running vulnerable Linux kernels with SST SPI-NOR flash memory. This can affect critical infrastructure, industrial control systems, telecommunications equipment, and embedded devices commonly used in sectors such as manufacturing, energy, transportation, and IoT deployments. A kernel crash can lead to unexpected downtime, data loss, or interruption of services, which may have cascading effects on operational continuity and safety. Since the vulnerability requires write access to the SPI-NOR flash, exploitation may be limited to local users or processes with sufficient privileges, but in multi-tenant or remotely managed environments, this could be leveraged to disrupt services. European organizations with embedded Linux devices or custom hardware platforms using SST SPI-NOR flash should be particularly vigilant. The impact on confidentiality and integrity is minimal as the vulnerability primarily causes availability issues. However, availability disruptions in critical systems can have severe economic and safety consequences.
Mitigation Recommendations
To mitigate CVE-2025-21845, European organizations should: 1) Identify all Linux systems using SST SPI-NOR flash devices managed by the MTD subsystem, especially embedded and industrial devices. 2) Apply the latest Linux kernel updates or patches that fix the sst_nor_write_data() function to ensure the correct number of bytes are written during flash operations. 3) If immediate patching is not feasible, restrict write operations to the affected devices by limiting access to privileged users and services. 4) Implement monitoring for kernel warnings or crashes related to the SPI-NOR driver to detect potential exploitation or instability early. 5) For custom or embedded Linux distributions, coordinate with vendors or maintainers to backport the fix promptly. 6) Conduct thorough testing of firmware and kernel updates in controlled environments before deployment to avoid regressions. 7) Consider hardware inventory audits to identify devices using SST SPI-NOR flash and evaluate their exposure. 8) Employ robust backup and recovery procedures to minimize downtime impact in case of crashes. These steps go beyond generic advice by focusing on device-specific identification, access control, monitoring, and vendor coordination.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-29T08:45:45.778Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9832c4522896dcbe89a4
Added to database: 5/21/2025, 9:09:06 AM
Last enriched: 6/30/2025, 9:43:42 AM
Last updated: 8/9/2025, 1:08:27 AM
Views: 14
Related Threats
CVE-2025-9026: OS Command Injection in D-Link DIR-860L
MediumCVE-2025-9025: SQL Injection in code-projects Simple Cafe Ordering System
MediumCVE-2025-9024: SQL Injection in PHPGurukul Beauty Parlour Management System
MediumCVE-2025-9023: Buffer Overflow in Tenda AC7
HighCVE-2025-8905: CWE-94 Improper Control of Generation of Code ('Code Injection') in inpersttion Inpersttion For Theme
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.