CVE-2022-49889: ring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()
In the Linux kernel, the following vulnerability has been resolved:
ring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()
On some machines the number of listed CPUs may be bigger than the actual
CPUs that exist. The tracing subsystem allocates a per_cpu directory with
access to the per CPU ring buffer via a cpuX file. But to save space, the
ring buffer will only allocate buffers for online CPUs, even though the
CPU array will be as big as the nr_cpu_ids.
With the addition of waking waiters on the ring buffer when closing the
file, the ring_buffer_wake_waiters() now needs to make sure that the
buffer is allocated (with the irq_work allocated with it) before trying to
wake waiters, as it will cause a NULL pointer dereference.
While debugging this, I added a NULL check for the buffer itself (which is
OK to do), and also NULL pointer checks against buffer->buffers (which is
not fine, and will WARN) as well as making sure the CPU number passed in
is within the nr_cpu_ids (which is also not fine if it isn't).
Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1204705
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel availability bug in the tracing ring buffer. A local low-privileged user could trigger a NULL pointer dereference on affected systems, potentially crashing the kernel or disrupting service. The sources do not indicate data theft, data modification, remote attack, or active exploitation.
Executive priority
Treat this as a moderate availability risk, highest for shared Linux hosts and systems with untrusted local users. It does not appear remotely exploitable from the supplied evidence, but kernel crash potential warrants normal patch-cycle remediation.
Technical view
ring_buffer_wake_waiters() could dereference a missing per-CPU ring buffer when listed CPU IDs exceed allocated online CPU buffers. The CVE maps to CWE-476 and CVSS 3.1 score 5.5: local attack vector, low complexity, low privileges, no user interaction, availability impact only.
Likely exposure
Exposure is mainly Linux systems running kernel builds that include the vulnerable tracing ring-buffer behavior before the referenced stable fixes or vendor backports. The bundle does not provide distribution package names, CPEs, or a complete affected-version matrix.
Exploitation context
The CVE is not listed as KEV in the supplied data, and no cited source reports active exploitation. The CVSS vector indicates local, low-privileged exploitation with high availability impact and no confidentiality or integrity impact.
Researcher notes
The root issue is missing NULL handling for unallocated cpu_buffer data when waking ring-buffer waiters. The interesting validation point is CPU topology mismatch versus allocated online CPU buffers. Evidence is limited to the CVE text and kernel stable commit references.
Mitigation direction
Update to a vendor kernel containing the referenced stable commits or equivalent backports.
Check Linux distribution advisories for exact fixed package versions.
Prioritize multi-user systems where untrusted local users have shell or workload access.
If patching is delayed, review vendor guidance for tracing subsystem exposure controls.
Validation and detection
Inventory Linux kernel versions and vendor package release levels across affected fleets.
Confirm fixed stable commits or distribution backports are present in deployed kernels.
Review crash logs for kernel NULL pointer dereference events involving ring buffer tracing.
Verify vulnerability scanners use vendor advisories, not only upstream kernel version strings.
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.