# CVE-2023-52506: LoongArch: Set all reserved memblocks on Node\#0 at initialization

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-03-02T21:52:20.064Z
- **Modified:** 2026-08-15T13:17:45.687Z

## Who should check

- Anyone running Linux \>= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, \< 19878758accf6b2788091a771d9f9fee7bab11ab; \>= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, \< b795fb9f5861ee256070d59e33130980a01fadd7
- Anyone running Linux 6.5

## Description

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

LoongArch: Set all reserved memblocks on Node\#0 at initialization

After commit 61167ad5fecdea ("mm: pass nid to reserve\_bootmem\_region()")
we get a panic if DEFERRED\_STRUCT\_PAGE\_INIT is enabled:

\[    0.000000\] CPU 0 Unable to handle kernel paging request at virtual address 0000000000002b82, era == 90000000040e3f28, ra == 90000000040e3f18
\[    0.000000\] Oops\[\#1\]:
\[    0.000000\] CPU: 0 PID: 0 Comm: swapper Not tainted 6.5.0+ \#733
\[    0.000000\] pc 90000000040e3f28 ra 90000000040e3f18 tp 90000000046f4000 sp 90000000046f7c90
\[    0.000000\] a0 0000000000000001 a1 0000000000200000 a2 0000000000000040 a3 90000000046f7ca0
\[    0.000000\] a4 90000000046f7ca4 a5 0000000000000000 a6 90000000046f7c38 a7 0000000000000000
\[    0.000000\] t0 0000000000000002 t1 9000000004b00ac8 t2 90000000040e3f18 t3 90000000040f0800
\[    0.000000\] t4 00000000000f0000 t5 80000000ffffe07e t6 0000000000000003 t7 900000047fff5e20
\[    0.000000\] t8 aaaaaaaaaaaaaaab u0 0000000000000018 s9 0000000000000000 s0 fffffefffe000000
\[    0.000000\] s1 0000000000000000 s2 0000000000000080 s3 0000000000000040 s4 0000000000000000
\[    0.000000\] s5 0000000000000000 s6 fffffefffe000000 s7 900000000470b740 s8 9000000004ad4000
\[    0.000000\]    ra: 90000000040e3f18 reserve\_bootmem\_region+0xec/0x21c
\[    0.000000\]   ERA: 90000000040e3f28 reserve\_bootmem\_region+0xfc/0x21c
\[    0.000000\]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
\[    0.000000\]  PRMD: 00000000 (PPLV0 -PIE -PWE)
\[    0.000000\]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
\[    0.000000\]  ECFG: 00070800 (LIE=11 VS=7)
\[    0.000000\] ESTAT: 00010800 \[PIL\] (IS=11 ECode=1 EsubCode=0)
\[    0.000000\]  BADV: 0000000000002b82
\[    0.000000\]  PRID: 0014d000 (Loongson-64bit, Loongson-3A6000)
\[    0.000000\] Modules linked in:
\[    0.000000\] Process swapper (pid: 0, threadinfo=(\_\_\_\_ptrval\_\_\_\_), task=(\_\_\_\_ptrval\_\_\_\_))
\[    0.000000\] Stack : 0000000000000000 9000000002eb5430 0000003a00000020 90000000045ccd00
\[    0.000000\]         900000000470e000 90000000002c1918 0000000000000000 9000000004110780
\[    0.000000\]         00000000fe6c0000 0000000480000000 9000000004b4e368 9000000004110748
\[    0.000000\]         0000000000000000 900000000421ca84 9000000004620000 9000000004564970
\[    0.000000\]         90000000046f7d78 9000000002cc9f70 90000000002c1918 900000000470e000
\[    0.000000\]         9000000004564970 90000000040bc0e0 90000000046f7d78 0000000000000000
\[    0.000000\]         0000000000004000 90000000045ccd00 0000000000000000 90000000002c1918
\[    0.000000\]         90000000002c1900 900000000470b700 9000000004b4df78 9000000004620000
\[    0.000000\]         90000000046200a8 90000000046200a8 0000000000000000 9000000004218b2c
\[    0.000000\]         9000000004270008 0000000000000001 0000000000000000 90000000045ccd00
\[    0.000000\]         ...
\[    0.000000\] Call Trace:
\[    0.000000\] \[\<90000000040e3f28\>\] reserve\_bootmem\_region+0xfc/0x21c
\[    0.000000\] \[\<900000000421ca84\>\] memblock\_free\_all+0x114/0x350
\[    0.000000\] \[\<9000000004218b2c\>\] mm\_core\_init+0x138/0x3cc
\[    0.000000\] \[\<9000000004200e38\>\] start\_kernel+0x488/0x7a4
\[    0.000000\] \[\<90000000040df0d8\>\] kernel\_entry+0xd8/0xdc
\[    0.000000\]
\[    0.000000\] Code: 02eb21ad  00410f4c  380c31ac \<262b818d\> 6800b70d  02c1c196  0015001c  57fe4bb1  260002cd

The reason is early memblock\_reserve() in memblock\_init() set node id to
MAX\_NUMNODES, making NODE\_DATA(nid) a NULL dereference in the call chain
reserve\_bootmem\_region() -\> init\_reserved\_page(). After memblock\_init(),
those late calls of memblock\_reserve() operate on subregions of memblock
.memory regions. As a result, these reserved regions will be set to the
correct node at the first iteration of memmap\_init\_reserved\_pages().

So set all reserved memblocks on Node\#0 at initialization can avoid this
panic.

## Affected and fixed versions

- Linux: \>= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, \< 19878758accf6b2788091a771d9f9fee7bab11ab; \>= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, \< b795fb9f5861ee256070d59e33130980a01fadd7 (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52506. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52506.md
Affected: Linux >= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, < 19878758accf6b2788091a771d9f9fee7bab11ab; >= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, < b795fb9f5861ee256070d59e33130980a01fadd7; Linux 6.5
Fixed in: Linux 19878758accf6b2788091a771d9f9fee7bab11ab

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52506 being exploited?

There is no confirmed exploitation: CVE-2023-52506 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-52506?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52506?

Linux \>= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, \< 19878758accf6b2788091a771d9f9fee7bab11ab; \>= 61167ad5fecdeaa037f3df1ba354dddd5f66a1ed, \< b795fb9f5861ee256070d59e33130980a01fadd7; Linux 6.5.

### Is there a fix for CVE-2023-52506?

Yes. Fixed in Linux 19878758accf6b2788091a771d9f9fee7bab11ab. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52506?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/19878758accf6b2788091a771d9f9fee7bab11ab>
- patch: <https://git.kernel.org/stable/c/b795fb9f5861ee256070d59e33130980a01fadd7>
- patch: <https://git.kernel.org/stable/c/f105e893a8edd48bdf4bef9fef845a9ff402f737>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52506>

HTML: <https://flawdb.com/CVE-2023-52506> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52506>
