LoongArch: Fix missing NULL checks for kstrdup()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s LoongArch early-boot code lacks a NULL check when allocating memory to parse the CPU model from the device tree. If that allocation fails, the kernel may oops. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel on LoongArch systems should check their kernel version; affected versions are not specified.