# CVE-2025-39904: arm64: kexec: initialize kexec_buf struct in load_other_segments()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 3% of CVEs (2026-12-01)
- Published: 2025-10-01T07:44:27.739Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-908
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from bf454ec31add6790f6cdc88328e38901fcbbade6 before 340cc9a3bd30b25edaf6a9708d41b5f2c10a054a; from bf454ec31add6790f6cdc88328e38901fcbbade6 before 04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507; 6.16 (not affected: before 6.16; from 6.16.8 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 6.16 before 6.16.8; 6.17

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/340cc9a3bd30b25edaf6a9708d41b5f2c10a054a> (patch)
- <https://git.kernel.org/stable/c/04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507> (patch)

## Sources

- CVE List: [CVE-2025-39904](https://www.cve.org/CVERecord?id=CVE-2025-39904), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-39904](https://nvd.nist.gov/vuln/detail/CVE-2025-39904), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-39904 · Whole record: https://cve.day/CVE-2025-39904.json · Rebuilt by cve.day 2026-11-25T22:59:05.385Z
