# CVE-2023-52451: powerpc/pseries/memhp: Fix access beyond end of drmem array

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.34% (percentile 19, 2026-11-28)
- **CWE:** CWE-129
- **Published:** 2024-02-22T16:21:42.295Z
- **Modified:** 2026-06-17T06:42:43.740Z

## Who should check

- Anyone running Linux \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< bb79613a9a704469ddb8d6c6029d532a5cea384c; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 9b5f03500bc5b083c0df696d7dd169d7ef3dd0c7; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< b582aa1f66411d4adcc1aa55b8c575683fb4687e; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 999a27b3ce9a69d54ccd5db000ec3a447bc43e6d; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 026fd977dc50ff4a5e09bfb0603557f104d3f3a0; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< df16afba2378d985359812c865a15c05c70a967e; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 708a4b59baad96c4718dc0bd3a3427d3ab22fedc; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< bd68ffce69f6cf8ddd3a3c32549d1d2275e49fc5
- Anyone running Linux 4.1

## Description

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

powerpc/pseries/memhp: Fix access beyond end of drmem array

dlpar\_memory\_remove\_by\_index() may access beyond the bounds of the
drmem lmb array when the LMB lookup fails to match an entry with the
given DRC index. When the search fails, the cursor is left pointing to
&drmem\_info-\>lmbs\[drmem\_info-\>n\_lmbs\], which is one element past the
last valid entry in the array. The debug message at the end of the
function then dereferences this pointer:

        pr\_debug("Failed to hot-remove memory at %llx\\n",
                 lmb-\>base\_addr);

This was found by inspection and confirmed with KASAN:

  pseries-hotplug-mem: Attempting to hot-remove LMB, drc index 1234
  ==================================================================
  BUG: KASAN: slab-out-of-bounds in dlpar\_memory+0x298/0x1658
  Read of size 8 at addr c000000364e97fd0 by task bash/949

  dump\_stack\_lvl+0xa4/0xfc (unreliable)
  print\_report+0x214/0x63c
  kasan\_report+0x140/0x2e0
  \_\_asan\_load8+0xa8/0xe0
  dlpar\_memory+0x298/0x1658
  handle\_dlpar\_errorlog+0x130/0x1d0
  dlpar\_store+0x18c/0x3e0
  kobj\_attr\_store+0x68/0xa0
  sysfs\_kf\_write+0xc4/0x110
  kernfs\_fop\_write\_iter+0x26c/0x390
  vfs\_write+0x2d4/0x4e0
  ksys\_write+0xac/0x1a0
  system\_call\_exception+0x268/0x530
  system\_call\_vectored\_common+0x15c/0x2ec

  Allocated by task 1:
   kasan\_save\_stack+0x48/0x80
   kasan\_set\_track+0x34/0x50
   kasan\_save\_alloc\_info+0x34/0x50
   \_\_kasan\_kmalloc+0xd0/0x120
   \_\_kmalloc+0x8c/0x320
   kmalloc\_array.constprop.0+0x48/0x5c
   drmem\_init+0x2a0/0x41c
   do\_one\_initcall+0xe0/0x5c0
   kernel\_init\_freeable+0x4ec/0x5a0
   kernel\_init+0x30/0x1e0
   ret\_from\_kernel\_user\_thread+0x14/0x1c

  The buggy address belongs to the object at c000000364e80000
   which belongs to the cache kmalloc-128k of size 131072
  The buggy address is located 0 bytes to the right of
   allocated 98256-byte region \[c000000364e80000, c000000364e97fd0)

  ==================================================================
  pseries-hotplug-mem: Failed to hot-remove memory at 0

Log failed lookups with a separate message and dereference the
cursor only when it points to a valid entry.

## Affected and fixed versions

- Linux: \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< bb79613a9a704469ddb8d6c6029d532a5cea384c; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 9b5f03500bc5b083c0df696d7dd169d7ef3dd0c7; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< b582aa1f66411d4adcc1aa55b8c575683fb4687e; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 999a27b3ce9a69d54ccd5db000ec3a447bc43e6d; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 026fd977dc50ff4a5e09bfb0603557f104d3f3a0; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< df16afba2378d985359812c865a15c05c70a967e; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 708a4b59baad96c4718dc0bd3a3427d3ab22fedc; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< bd68ffce69f6cf8ddd3a3c32549d1d2275e49fc5 (cvelist)
- Linux: 4.1 (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-52451. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52451.md
Affected: Linux >= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, < bb79613a9a704469ddb8d6c6029d532a5cea384c; >= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, < 9b5f03500bc5b083c0df696d7dd169d7ef3dd0c7; >= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, < b582aa1f66411d4adcc1aa55b8c575683fb4687e; >= 51925fb3c5c901aa06cdc85…
Fixed in: Linux 9b5f03500bc5b083c0df696d7dd169d7ef3dd0c7, Linux 999a27b3ce9a69d54ccd5db000ec3a447bc43e6d, Linux 026fd977dc50ff4a5e09bfb0603557f104d3f3a0, Linux 708a4b59baad96c4718dc0bd3a3427d3ab22fedc

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-52451 being exploited?

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

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

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

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

Linux \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< bb79613a9a704469ddb8d6c6029d532a5cea384c; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 9b5f03500bc5b083c0df696d7dd169d7ef3dd0c7; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< b582aa1f66411d4adcc1aa55b8c575683fb4687e; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 999a27b3ce9a69d54ccd5db000ec3a447bc43e6d; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 026fd977dc50ff4a5e09bfb0603557f104d3f3a0; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< df16afba2378d985359812c865a15c05c70a967e; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< 708a4b59baad96c4718dc0bd3a3427d3ab22fedc; \>= 51925fb3c5c901aa06cdc853268a6e19e19bcdc7, \< bd68ffce69f6cf8ddd3a3c32549d1d2275e49fc5; Linux 4.1.

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

Yes. Fixed in Linux 9b5f03500bc5b083c0df696d7dd169d7ef3dd0c7, Linux 999a27b3ce9a69d54ccd5db000ec3a447bc43e6d, Linux 026fd977dc50ff4a5e09bfb0603557f104d3f3a0, Linux 708a4b59baad96c4718dc0bd3a3427d3ab22fedc. No fix listed yet: follow the vendor advisory.

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

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/bb79613a9a704469ddb8d6c6029d532a5cea384c>
- patch: <https://git.kernel.org/stable/c/9b5f03500bc5b083c0df696d7dd169d7ef3dd0c7>
- patch: <https://git.kernel.org/stable/c/b582aa1f66411d4adcc1aa55b8c575683fb4687e>
- patch: <https://git.kernel.org/stable/c/999a27b3ce9a69d54ccd5db000ec3a447bc43e6d>
- patch: <https://git.kernel.org/stable/c/026fd977dc50ff4a5e09bfb0603557f104d3f3a0>
- patch: <https://git.kernel.org/stable/c/df16afba2378d985359812c865a15c05c70a967e>
- patch: <https://git.kernel.org/stable/c/708a4b59baad96c4718dc0bd3a3427d3ab22fedc>
- patch: <https://git.kernel.org/stable/c/bd68ffce69f6cf8ddd3a3c32549d1d2275e49fc5>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00016.html>

## 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-52451>

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