# CVE-2025-39904: arm64: kexec: initialize kexec\_buf struct in load\_other\_segments()

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-908
- **Published:** 2025-10-01T07:44:27.739Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= bf454ec31add6790f6cdc88328e38901fcbbade6, \< 340cc9a3bd30b25edaf6a9708d41b5f2c10a054a; \>= bf454ec31add6790f6cdc88328e38901fcbbade6, \< 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507
- Anyone running Linux 6.16

## Description

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

arm64: kexec: initialize kexec\_buf struct in load\_other\_segments()

Patch series "kexec: Fix invalid field access".

The kexec\_buf structure was previously declared without initialization. 
commit bf454ec31add ("kexec\_file: allow to place kexec\_buf randomly")
added a field that is always read but not consistently populated by all
architectures.  This un-initialized field will contain garbage.

This is also triggering a UBSAN warning when the uninitialized data was
accessed:

	------------\[ cut here \]------------
	UBSAN: invalid-load in ./include/linux/kexec.h:210:10
	load of value 252 is not a valid value for type '\_Bool'

Zero-initializing kexec\_buf at declaration ensures all fields are cleanly
set, preventing future instances of uninitialized memory being used.

An initial fix was already landed for arm64\[0\], and this patchset fixes
the problem on the remaining arm64 code and on riscv, as raised by Mark.

Discussions about this problem could be found at\[1\]\[2\].


This patch (of 3):

The kexec\_buf structure was previously declared without initialization.
commit bf454ec31add ("kexec\_file: allow to place kexec\_buf randomly")
added a field that is always read but not consistently populated by all
architectures. This un-initialized field will contain garbage.

This is also triggering a UBSAN warning when the uninitialized data was
accessed:

	------------\[ cut here \]------------
	UBSAN: invalid-load in ./include/linux/kexec.h:210:10
	load of value 252 is not a valid value for type '\_Bool'

Zero-initializing kexec\_buf at declaration ensures all fields are
cleanly set, preventing future instances of uninitialized memory being
used.

## Affected and fixed versions

- Linux: \>= bf454ec31add6790f6cdc88328e38901fcbbade6, \< 340cc9a3bd30b25edaf6a9708d41b5f2c10a054a; \>= bf454ec31add6790f6cdc88328e38901fcbbade6, \< 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507 (cvelist)
- Linux: 6.16 (cvelist)

## Mitigation

- Upgrade Linux to 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-39904.md
Affected: Linux >= bf454ec31add6790f6cdc88328e38901fcbbade6, < 340cc9a3bd30b25edaf6a9708d41b5f2c10a054a; >= bf454ec31add6790f6cdc88328e38901fcbbade6, < 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507; Linux 6.16
Fixed in: Linux 340cc9a3bd30b25edaf6a9708d41b5f2c10a054a, Linux 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507

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-2025-39904 being exploited?

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

### How serious is CVE-2025-39904?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-39904?

Linux \>= bf454ec31add6790f6cdc88328e38901fcbbade6, \< 340cc9a3bd30b25edaf6a9708d41b5f2c10a054a; \>= bf454ec31add6790f6cdc88328e38901fcbbade6, \< 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507; Linux 6.16.

### Is there a fix for CVE-2025-39904?

Yes. Fixed in Linux 340cc9a3bd30b25edaf6a9708d41b5f2c10a054a, Linux 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507. Upgrade Linux to 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507 or later.

### How do I check if I'm affected by CVE-2025-39904?

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/340cc9a3bd30b25edaf6a9708d41b5f2c10a054a>
- patch: <https://git.kernel.org/stable/c/04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507>

## 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-2025-39904>

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