Skip to main content

CVE-2022-49353: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-49353cvecve-2022-49353
Published: Wed Feb 26 2025 (02/26/2025, 02:11:04 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

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

AI-Powered Analysis

AILast updated: 06/30/2025, 06:12:04 UTC

Technical Analysis

CVE-2022-49353 is a vulnerability identified in the Linux kernel specifically affecting the powerpc architecture's papr_scm driver, which manages certain NVDIMM (Non-Volatile Dual In-line Memory Module) devices on POWER-10 logical partitions (LPARs). The issue arises when the papr_scm_probe function calls drc_pmem_query_stats() with a zero-sized stats buffer, which is not supported by the vPMEM NVDIMM devices. This occurs because the papr_scm_pmu_check_events() function lacks an initial check for the 'stat_buffer_len' parameter, which indicates whether performance statistics are supported by the device. Without this check, the kernel attempts to fetch performance statistics from devices that do not support them, leading to a NULL pointer dereference and subsequent kernel panic. The panic manifests as a fatal exception with a kernel crash, specifically a write to a NULL pointer at address 0x0000001c, causing an unrecoverable system failure. The vulnerability is triggered only when the 'Enable Performance Information Collection' option is disabled in the Hardware Management Console (HMC) for the LPAR, which is a configuration setting in IBM POWER systems. The root cause is a missing validation in the kernel driver code, and the fix involves adding a check for 'p->stat_buffer_len' at the start of papr_scm_pmu_check_events() to prevent calls to drc_pmem_query_stats() when the buffer length is zero. This vulnerability is specific to Linux kernels running on IBM POWER10 hardware with vPMEM NVDIMM devices and does not appear to have known exploits in the wild as of the publication date. No CVSS score has been assigned yet.

Potential Impact

For European organizations utilizing IBM POWER10 servers running Linux with vPMEM NVDIMM devices, this vulnerability can cause unexpected kernel panics leading to system crashes and downtime. Such outages can disrupt critical business operations, especially in environments relying on high availability and continuous uptime, such as financial institutions, telecommunications, and data centers. The kernel panic results in loss of availability and may require manual intervention to recover systems, impacting service delivery and potentially causing data loss if unsaved data is present. Since the vulnerability is triggered by a specific configuration (disabling performance information collection), organizations that disable this feature for performance or security reasons are at risk. Although the vulnerability does not appear to allow privilege escalation or direct data compromise, the denial of service impact can be significant in production environments. The lack of known exploits reduces immediate risk, but the vulnerability's presence in kernel code means that attackers with local access or the ability to influence kernel module loading could potentially trigger the panic, making it a reliability and availability concern.

Mitigation Recommendations

European organizations should ensure that their Linux kernel versions on POWER10 systems are updated to include the patch that adds the missing 'stat_buffer_len' check in papr_scm_pmu_check_events(). This involves applying the latest kernel updates from trusted Linux distributions or directly from the Linux kernel source if using custom kernels. Additionally, organizations should audit their HMC configurations to verify whether the 'Enable Performance Information Collection' option is disabled on any LPARs using vPMEM NVDIMM devices. If disabling this option is not necessary, it should be enabled to avoid triggering the vulnerability. For environments where disabling performance information collection is required, extra caution and monitoring should be implemented to detect kernel panics promptly. Implementing robust kernel crash recovery mechanisms and maintaining regular backups will help mitigate the impact of unexpected reboots. Finally, organizations should monitor Linux kernel mailing lists and vendor advisories for any updates or exploit reports related to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-26T02:08:31.545Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982dc4522896dcbe5770

Added to database: 5/21/2025, 9:09:01 AM

Last enriched: 6/30/2025, 6:12:04 AM

Last updated: 7/25/2025, 7:06:57 AM

Views: 8

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats