CVE-2026-31559

LoongArch: Fix missing NULL checks for kstrdup()

Published Apr 24, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

LoongArch: Fix missing NULL checks for kstrdup()

1. Replace "of_find_node_by_path("/")" with "of_root" to avoid multiple
calls to "of_node_put()".

2. Fix a potential kernel oops during early boot when memory allocation
fails while parsing CPU model from device tree.

Analysis

AI-generated

Technical impact

The Linux kernel’s early boot routine contains a flaw where a string duplication function (kstrdup()) is called without verifying that the result of a memory allocation is not NULL. If a memory allocation fails while parsing the CPU model from the device tree, the kernel dereferences a NULL pointer, leading to an oops and system crash. The weakness is classified as CWE‑476: NULL pointer dereference, which results in a denial‑of‑service by crashing the kernel during boot.

Affected Systems

Affected systems include all Linux kernel releases prior to the fix, namely versions up to 6.17 and the 7.0 release candidates rc1 through rc7. Any system running an unpatched kernel and an unmodified or potentially exploitable device tree is susceptible.

Risk and Exploitability

The vulnerability has a CVSS score of 5.5 and an EPSS score of less than 1 %. It is not listed in CISA’s KEV catalog. The likely attack vector requires local access or the ability to alter the device tree, inferred from the description that the fault occurs during early boot while parsing the device tree. Given the narrow exposure window and low exploitation probability, the overall risk is moderate, but a kernel crash remains a severe outcome.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that contains commit 3a28daa9b7d7c2ddf2c722e9e95d7e0928bf0cd1, which adds NULL checks to kstrdup() during early boot.
  • If an immediate kernel upgrade is not feasible, manually apply the patch from the commit to your current kernel source and rebuild the kernel, ensuring the NULL check is present before rebooting.
  • Review custom or third‑party drivers that call kstrdup() during boot and patch or disable them until the kernel fix is applied.

Generated by OpenCVE AI on April 28, 2026 at 20:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6238-1 linux security update
History
Type Values Removed Values Added
CPEs cpe:2.3:o:linux:linux_kernel:6.17:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: LoongArch: Fix missing NULL checks for kstrdup() 1. Replace "of_find_node_by_path("/")" with "of_root" to avoid multiple calls to "of_node_put()". 2. Fix a potential kernel oops during early boot when memory allocation fails while parsing CPU model from device tree.
Title LoongArch: Fix missing NULL checks for kstrdup()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
May 23, 2026, 4:05 PM
Reserved
Mar 9, 2026, 3:48 PM
Status
Analyzed
Published
Apr 24, 2026, 3:16 PM
Modified
Nov 11, 2026, 11:10 PM
Severity
Public date
Apr 24, 2026, 12:00 AM