Skip to main content
← All vulnerabilities
CVE-2026-72013

riscv: Prevent NULL pointer dereference in machine_kexec_prepare()

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 5.15.212, 5.18, 5.19
None on Exploit-DB, Metasploit or GitHub

Summary

In the Linux kernel, the following vulnerability has been resolved: riscv: Prevent NULL pointer dereference in machine_kexec_prepare() A NULL pointer dereference issue is noticed in riscv's machine_kexec_prepare(), where image->segment[i].buf might be NULL and copied unchecked. The NULL buf comes from ima_add_kexec_buffer(), where kbuf is added by kexec_add_buffer(), but kbuf.buffer is NULL, then it is copied without a check in machine_kexec_prepare(): kexec_file_load -> kimage_file_alloc_init() -> kimage_file_prepare_segments() -> ima_add_kexec_buffer() -> kexec_add_buffer() -> machine_kexec_prepare() -> memcpy() Address this by adding a check before the data copy attempt.

Timeline

  1. CVE published
  2. Record last updated

Affected versions

  • Linux Linux

    From 5.15.47 · fixed in 5.15.212; From 5.17.15 · fixed in 5.18; From 5.18.4 · fixed in 5.19

  • Linux Linux

    5.19

References 7

git.kernel.org