CVE-2022-48953

rtc: cmos: Fix event handler registration ordering issue

MEDIUM
5.5
CVSS Score
Published: October 21, 2024 at 08:05 PM UTC
Updated: June 17, 2026 at 05:16 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: rtc: cmos: Fix event handler registration ordering issue Because acpi_install_fixed_event_handler() enables the event automatically on success, it is incorrect to call it before the handler routine passed to it is ready to handle events. Unfortunately, the rtc-cmos driver does exactly the incorrect thing by calling cmos_wake_setup(), which passes rtc_handler() to acpi_install_fixed_event_handler(), before cmos_do_probe(), because rtc_handler() uses dev_get_drvdata() to get to the cmos object pointer and the driver data pointer is only populated in cmos_do_probe(). This leads to a NULL pointer dereference in rtc_handler() on boot if the RTC fixed event happens to be active at the init time. To address this issue, change the initialization ordering of the driver so that cmos_wake_setup() is always called after a successful cmos_do_probe() call. While at it, change cmos_pnp_probe() to call cmos_do_probe() after the initial if () statement used for computing the IRQ argument to be passed to cmos_do_probe() which is cleaner than calling it in each branch of that if () (local variable "irq" can be of type int, because it is passed to that function as an argument of type int). Note that commit 6492fed7d8c9 ("rtc: rtc-cmos: Do not check ACPI_FADT_LOW_POWER_S0") caused this issue to affect a larger number of systems, because previously it only affected systems with ACPI_FADT_LOW_POWER_S0 set, but it is present regardless of that commit.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.28 ≤ v < 5.10.1632.6.28 ≤ v < 5.15.862.6.28 ≤ v < 6.0.142.6.28 ≤ v < 6.15.11 ≤ v < 5.15.865.16 ≤ v < 6.0.146.1 rc16.1 rc26.1 rc36.1 rc46.1 rc56.1 rc66.1 rc76.1 rc8a474aaedac99ba86e28ef6c912a7647c482db6dd
Vendor states this is fixed in 0bcfccb48696aba475f046c2021f0733659ce0ef (fixed)
Vendor states this is fixed in 1ba745fce13d19775100eece30b0bfb8b8b10ea6 (fixed)
Vendor states this is fixed in 4919d3eb2ec0ee364f7e3cf2d99646c1b224fae8 (fixed)
Vendor states this is fixed in 60c6e563a843032cf6ff84b2fb732cd8754fc10d (fixed)
Vendor states this is fixed in 2.6.28 (unaffected)
Vendor states this is fixed in 5.10.163 (unaffected)
Vendor states this is fixed in 5.15.86 (unaffected)
Vendor states this is fixed in 6.0.14 (unaffected)
Vendor states this is fixed in 6.1 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0bcfccb48696aba475f046c2021f0733659ce0ef
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1ba745fce13d19775100eece30b0bfb8b8b10ea6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4919d3eb2ec0ee364f7e3cf2d99646c1b224fae8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/60c6e563a843032cf6ff84b2fb732cd8754fc10d

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card