CVE-2022-49353: powerpc/papr_scm: don't requests stats with '0' sized stats buffer
In the Linux kernel, the following vulnerability has been resolved:
powerpc/papr_scm: don't requests stats with '0' sized stats buffer
Sachin reported [1] that on a POWER-10 lpar he is seeing a kernel panic being
reported with vPMEM when papr_scm probe is being called. The panic is of the
form below and is observed only with following option disabled(profile) for the
said LPAR 'Enable Performance Information Collection' in the HMC:
Kernel attempted to write user page (1c) - exploit attempt? (uid: 0)
BUG: Kernel NULL pointer dereference on write at 0x0000001c
Faulting instruction address: 0xc008000001b90844
Oops: Kernel access of bad area, sig: 11 [#1]
<snip>
NIP [c008000001b90844] drc_pmem_query_stats+0x5c/0x270 [papr_scm]
LR [c008000001b92794] papr_scm_probe+0x2ac/0x6ec [papr_scm]
Call Trace:
0xc00000000941bca0 (unreliable)
papr_scm_probe+0x2ac/0x6ec [papr_scm]
platform_probe+0x98/0x150
really_probe+0xfc/0x510
__driver_probe_device+0x17c/0x230
<snip>
---[ end trace 0000000000000000 ]---
Kernel panic - not syncing: Fatal exception
On investigation looks like this panic was caused due to a 'stat_buffer' of
size==0 being provided to drc_pmem_query_stats() to fetch all performance
stats-ids of an NVDIMM. However drc_pmem_query_stats() shouldn't have been called
since the vPMEM NVDIMM doesn't support and performance stat-id's. This was caused
due to missing check for 'p->stat_buffer_len' at the beginning of
papr_scm_pmu_check_events() which indicates that the NVDIMM doesn't support
performance-stats.
Fix this by introducing the check for 'p->stat_buffer_len' at the beginning of
papr_scm_pmu_check_events().
[1] https://lore.kernel.org/all/6B3A522A-6A5F-4CC9-B268-0C63AA6E07D3@linux.ibm.com
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue can crash certain IBM POWER virtual persistent memory systems during driver probing. The business impact is availability: an affected LPAR may panic and reboot, not leak or corrupt data according to the supplied CVSS vector.
Executive priority
Treat as a targeted reliability risk, not a broad internet-facing emergency. Patch affected POWER vPMEM estates during the next practical kernel maintenance window, faster for critical workloads.
Technical view
In the powerpc papr_scm driver, papr_scm_pmu_check_events() failed to reject a zero-length stats buffer before calling drc_pmem_query_stats(). On vPMEM NVDIMM configurations without performance stats, this caused a NULL pointer write and kernel panic.
Likely exposure
Exposure appears narrow: Linux on POWER LPARs using papr_scm vPMEM/NVDIMM, especially where HMC performance information collection is disabled. The source lists specific Linux kernel commit/version identifiers, but no complete distro matrix.
Exploitation context
The CVSS vector is local, low-privilege, no user interaction, availability-only. The CVE is not marked KEV, and the supplied sources do not state active exploitation or public exploit availability.
Researcher notes
The root cause is CWE-476 NULL pointer dereference from missing stat_buffer_len validation. Evidence is specific to papr_scm probing on POWER-10 LPAR vPMEM when performance stats are unavailable.
Mitigation direction
Update to a Linux kernel containing the referenced stable fixes.
Check distribution or platform vendor advisories for backported kernel packages.
Prioritize affected POWER vPMEM LPARs where unexpected reboots are operationally significant.
Avoid inventing configuration workarounds; use vendor guidance for temporary risk reduction.
Validation and detection
Inventory POWER LPARs using vPMEM/NVDIMM with the papr_scm driver.
Verify running kernels include the referenced stable commits or vendor backports.
Review logs for papr_scm_probe, drc_pmem_query_stats, NULL dereference, or kernel panic traces.
Check whether HMC performance information collection is disabled on relevant LPARs.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-476: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-476 · source CWE mapping
NULL Pointer Dereference
NULL Pointer Dereference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.