# CVE-2024-46853: spi: nxp-fspi: fix the KASAN report out-of-bounds bug

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.35% (percentile 21, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2024-09-27T12:42:45.989Z
- **Modified:** 2026-06-17T07:56:05.110Z

## Who should check

- Anyone running Linux \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< aa05db44db5f409f6d91c27b5737efb49fb45d9f; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 609260542cf86b459c57618b8cdec8020394b7ad; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 491f9646f7ac31af5fca71be1a3e5eb8aa7663ad; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 09af8b0ba70072be831f3ec459f4063d570f9e24; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< af9ca9ca3e44f48b2a191e100d452fbf850c3d87; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< d1a1dfcec77c57b1181da93d11a3db1bc4eefa97; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 2a8787c1cdc7be24fdd8953ecd1a8743a1006235
- Anyone running Linux 5.1

## Description

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

spi: nxp-fspi: fix the KASAN report out-of-bounds bug

Change the memcpy length to fix the out-of-bounds issue when writing the
data that is not 4 byte aligned to TX FIFO.

To reproduce the issue, write 3 bytes data to NOR chip.

dd if=3b of=/dev/mtd0
\[   36.926103\] ==================================================================
\[   36.933409\] BUG: KASAN: slab-out-of-bounds in nxp\_fspi\_exec\_op+0x26ec/0x2838
\[   36.940514\] Read of size 4 at addr ffff00081037c2a0 by task dd/455
\[   36.946721\]
\[   36.948235\] CPU: 3 UID: 0 PID: 455 Comm: dd Not tainted 6.11.0-rc5-gc7b0e37c8434 \#1070
\[   36.956185\] Hardware name: Freescale i.MX8QM MEK (DT)
\[   36.961260\] Call trace:
\[   36.963723\]  dump\_backtrace+0x90/0xe8
\[   36.967414\]  show\_stack+0x18/0x24
\[   36.970749\]  dump\_stack\_lvl+0x78/0x90
\[   36.974451\]  print\_report+0x114/0x5cc
\[   36.978151\]  kasan\_report+0xa4/0xf0
\[   36.981670\]  \_\_asan\_report\_load\_n\_noabort+0x1c/0x28
\[   36.986587\]  nxp\_fspi\_exec\_op+0x26ec/0x2838
\[   36.990800\]  spi\_mem\_exec\_op+0x8ec/0xd30
\[   36.994762\]  spi\_mem\_no\_dirmap\_read+0x190/0x1e0
\[   36.999323\]  spi\_mem\_dirmap\_write+0x238/0x32c
\[   37.003710\]  spi\_nor\_write\_data+0x220/0x374
\[   37.007932\]  spi\_nor\_write+0x110/0x2e8
\[   37.011711\]  mtd\_write\_oob\_std+0x154/0x1f0
\[   37.015838\]  mtd\_write\_oob+0x104/0x1d0
\[   37.019617\]  mtd\_write+0xb8/0x12c
\[   37.022953\]  mtdchar\_write+0x224/0x47c
\[   37.026732\]  vfs\_write+0x1e4/0x8c8
\[   37.030163\]  ksys\_write+0xec/0x1d0
\[   37.033586\]  \_\_arm64\_sys\_write+0x6c/0x9c
\[   37.037539\]  invoke\_syscall+0x6c/0x258
\[   37.041327\]  el0\_svc\_common.constprop.0+0x160/0x22c
\[   37.046244\]  do\_el0\_svc+0x44/0x5c
\[   37.049589\]  el0\_svc+0x38/0x78
\[   37.052681\]  el0t\_64\_sync\_handler+0x13c/0x158
\[   37.057077\]  el0t\_64\_sync+0x190/0x194
\[   37.060775\]
\[   37.062274\] Allocated by task 455:
\[   37.065701\]  kasan\_save\_stack+0x2c/0x54
\[   37.069570\]  kasan\_save\_track+0x20/0x3c
\[   37.073438\]  kasan\_save\_alloc\_info+0x40/0x54
\[   37.077736\]  \_\_kasan\_kmalloc+0xa0/0xb8
\[   37.081515\]  \_\_kmalloc\_noprof+0x158/0x2f8
\[   37.085563\]  mtd\_kmalloc\_up\_to+0x120/0x154
\[   37.089690\]  mtdchar\_write+0x130/0x47c
\[   37.093469\]  vfs\_write+0x1e4/0x8c8
\[   37.096901\]  ksys\_write+0xec/0x1d0
\[   37.100332\]  \_\_arm64\_sys\_write+0x6c/0x9c
\[   37.104287\]  invoke\_syscall+0x6c/0x258
\[   37.108064\]  el0\_svc\_common.constprop.0+0x160/0x22c
\[   37.112972\]  do\_el0\_svc+0x44/0x5c
\[   37.116319\]  el0\_svc+0x38/0x78
\[   37.119401\]  el0t\_64\_sync\_handler+0x13c/0x158
\[   37.123788\]  el0t\_64\_sync+0x190/0x194
\[   37.127474\]
\[   37.128977\] The buggy address belongs to the object at ffff00081037c2a0
\[   37.128977\]  which belongs to the cache kmalloc-8 of size 8
\[   37.141177\] The buggy address is located 0 bytes inside of
\[   37.141177\]  allocated 3-byte region \[ffff00081037c2a0, ffff00081037c2a3)
\[   37.153465\]
\[   37.154971\] The buggy address belongs to the physical page:
\[   37.160559\] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x89037c
\[   37.168596\] flags: 0xbfffe0000000000(node=0\|zone=2\|lastcpupid=0x1ffff)
\[   37.175149\] page\_type: 0xfdffffff(slab)
\[   37.179021\] raw: 0bfffe0000000000 ffff000800002500 dead000000000122 0000000000000000
\[   37.186788\] raw: 0000000000000000 0000000080800080 00000001fdffffff 0000000000000000
\[   37.194553\] page dumped because: kasan: bad access detected
\[   37.200144\]
\[   37.201647\] Memory state around the buggy address:
\[   37.206460\]  ffff00081037c180: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
\[   37.213701\]  ffff00081037c200: fa fc fc fc 05 fc fc fc 03 fc fc fc 02 fc fc fc
\[   37.220946\] \>ffff00081037c280: 06 fc fc fc 03 fc fc fc fc fc fc fc fc fc fc fc
\[   37.228186\]                                ^
\[   37.232473\]  ffff00081037c300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
\[   37.239718\]  ffff00081037c380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
\[   37.246962\] ==============================================================
---truncated---

## Affected and fixed versions

- Linux: \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< aa05db44db5f409f6d91c27b5737efb49fb45d9f; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 609260542cf86b459c57618b8cdec8020394b7ad; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 491f9646f7ac31af5fca71be1a3e5eb8aa7663ad; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 09af8b0ba70072be831f3ec459f4063d570f9e24; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< af9ca9ca3e44f48b2a191e100d452fbf850c3d87; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< d1a1dfcec77c57b1181da93d11a3db1bc4eefa97; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 2a8787c1cdc7be24fdd8953ecd1a8743a1006235 (cvelist)
- Linux: 5.1 (cvelist)

## Mitigation

- Upgrade Linux to 2a8787c1cdc7be24fdd8953ecd1a8743a1006235 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-46853. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46853.md
Affected: Linux >= a5356aef6a907c2e2aed0caaa2b88b6021394471, < aa05db44db5f409f6d91c27b5737efb49fb45d9f; >= a5356aef6a907c2e2aed0caaa2b88b6021394471, < 609260542cf86b459c57618b8cdec8020394b7ad; >= a5356aef6a907c2e2aed0caaa2b88b6021394471, < 491f9646f7ac31af5fca71be1a3e5eb8aa7663ad; >= a5356aef6a907c2e2aed0ca…
Fixed in: Linux 609260542cf86b459c57618b8cdec8020394b7ad, Linux 491f9646f7ac31af5fca71be1a3e5eb8aa7663ad, Linux 09af8b0ba70072be831f3ec459f4063d570f9e24, Linux 2a8787c1cdc7be24fdd8953ecd1a8743a1006235

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-46853 being exploited?

There is no confirmed exploitation: CVE-2024-46853 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-46853?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-46853?

Linux \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< aa05db44db5f409f6d91c27b5737efb49fb45d9f; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 609260542cf86b459c57618b8cdec8020394b7ad; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 491f9646f7ac31af5fca71be1a3e5eb8aa7663ad; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 09af8b0ba70072be831f3ec459f4063d570f9e24; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< af9ca9ca3e44f48b2a191e100d452fbf850c3d87; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< d1a1dfcec77c57b1181da93d11a3db1bc4eefa97; \>= a5356aef6a907c2e2aed0caaa2b88b6021394471, \< 2a8787c1cdc7be24fdd8953ecd1a8743a1006235; Linux 5.1.

### Is there a fix for CVE-2024-46853?

Yes. Fixed in Linux 609260542cf86b459c57618b8cdec8020394b7ad, Linux 491f9646f7ac31af5fca71be1a3e5eb8aa7663ad, Linux 09af8b0ba70072be831f3ec459f4063d570f9e24, Linux 2a8787c1cdc7be24fdd8953ecd1a8743a1006235. Upgrade Linux to 2a8787c1cdc7be24fdd8953ecd1a8743a1006235 or later.

### How do I check if I'm affected by CVE-2024-46853?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/aa05db44db5f409f6d91c27b5737efb49fb45d9f>
- patch: <https://git.kernel.org/stable/c/609260542cf86b459c57618b8cdec8020394b7ad>
- patch: <https://git.kernel.org/stable/c/491f9646f7ac31af5fca71be1a3e5eb8aa7663ad>
- patch: <https://git.kernel.org/stable/c/09af8b0ba70072be831f3ec459f4063d570f9e24>
- patch: <https://git.kernel.org/stable/c/af9ca9ca3e44f48b2a191e100d452fbf850c3d87>
- patch: <https://git.kernel.org/stable/c/d1a1dfcec77c57b1181da93d11a3db1bc4eefa97>
- patch: <https://git.kernel.org/stable/c/2a8787c1cdc7be24fdd8953ecd1a8743a1006235>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-46853>

HTML: <https://flawdb.com/CVE-2024-46853> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-46853>
