CVE-2025-39904

Source
https://cve.org/CVERecord?id=CVE-2025-39904
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39904.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-39904
Downstream
Published
2025-10-01T07:44:27.739Z
Modified
2026-04-02T12:48:12.311413Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
arm64: kexec: initialize kexec_buf struct in load_other_segments()
Details

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

arm64: kexec: initialize kexecbuf struct in loadother_segments()

Patch series "kexec: Fix invalid field access".

The kexecbuf structure was previously declared without initialization. commit bf454ec31add ("kexecfile: 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 kexecbuf structure was previously declared without initialization. commit bf454ec31add ("kexecfile: 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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39904.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
bf454ec31add6790f6cdc88328e38901fcbbade6
Fixed
340cc9a3bd30b25edaf6a9708d41b5f2c10a054a
Fixed
04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39904.json"