Skip to main content
Vulnerability Database/CVE-2026-98826

CVE-2026-98826: Linux Kernel RTC Use-After-Free Vulnerability

CVE-2026-98826 is a use-after-free flaw in the Linux kernel RTC ac100 driver that occurs during probe failure, leaving freed memory accessible. This post explains its technical details, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98826 Overview

CVE-2026-98826 is a use-after-free vulnerability in the Linux kernel's ac100 real-time clock (RTC) driver. The flaw occurs in ac100_rtc_probe() when devm_rtc_register_device() fails after the clock provider has been registered. Because neither the RTC-32k clock nor the clock provider is device-managed, probe failure leaves the provider on the global of_clk_providers list while chip->clk_data is freed as devres unwinds. Subsequent lookups through of_clk_hw_onecell_get() then read freed memory. In-tree consumers on sun8i-a83t-bananapi-m3, sun8i-a83t-cubietruck-plus, and sun9i-a80 boards reference &ac100_rtc, exposing the dangling pointer path.

Critical Impact

Probe failure in the ac100 RTC driver leaves a stale clock provider referencing freed memory, enabling kernel memory corruption when downstream consumers resolve the clock.

Affected Products

  • Linux kernel branches containing the rtc-ac100 driver prior to the referenced fix commits
  • Allwinner-based platforms using the AC100 PMIC (for example, sun8i-a83t-bananapi-m3, sun8i-a83t-cubietruck-plus, sun9i-a80 boards)
  • Downstream distributions shipping unpatched stable kernels

Discovery Timeline

  • 2026-10-18 - CVE-2026-98826 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98826

Vulnerability Analysis

The ac100_rtc_register_clks() function registers the RTC-32k clock through clk_hw_register_fixed_rate() and the clock provider through of_clk_add_hw_provider(). Both resources are released only from ac100_rtc_remove(). The driver core does not invoke remove() on probe failure. Instead, really_probe() jumps to probe_failed and immediately releases device-managed resources.

Because ac100_rtc_probe() finishes with return devm_rtc_register_device(chip->rtc), a failure at that call leaves the clock provider registered globally while chip->clk_data, allocated via devm_kzalloc(), is freed during devres teardown. The provider still points at the freed clk_data structure.

Root Cause

The root cause is a lifetime mismatch between manually registered resources and device-managed allocations. The provider and fixed-rate clock outlive the memory they reference once probe fails, because they were not registered with devres-aware helpers. The fix converts both registrations to devm_clk_hw_register_fixed_rate() and devm_of_clk_add_hw_provider(), ensuring devres releases them in reverse order before clk_data is freed.

Attack Vector

Exploitation requires that devm_rtc_register_device() fail during probe, which in this path can only occur with -ENOMEM. After the failed probe, any consumer resolving the device tree node, such as the Wi-Fi power sequence nodes using <&ac100_rtc 1> or boards routing osc32k through <&ac100_rtc 0>, triggers of_clk_hw_onecell_get() to read freed memory. The RTC-32k clock is also leaked, and because clk_core_lookup() searches a global list, a subsequent probe of the same device fails with -EEXIST on the duplicate clock name.

The parallel error path returning -EINVAL when the ADDA 4M parent clock is not found leaks the RTC-32k clock as well, though no provider is registered at that point, limiting that path to a memory leak rather than a use-after-free.

Detection Methods for CVE-2026-98826

Indicators of Compromise

  • Kernel log entries showing ac100-rtc probe failures accompanied by -ENOMEM from devm_rtc_register_device()
  • Subsequent -EEXIST errors when the ac100-rtc device re-probes, indicating the leaked RTC-32k clock remains registered
  • KASAN or SLUB_DEBUG reports flagging use-after-free in of_clk_hw_onecell_get() on Allwinner platforms

Detection Strategies

  • Enable CONFIG_KASAN on test kernels for Allwinner sun8i/sun9i boards to catch the dangling clk_data dereference during boot
  • Audit dmesg for ac100_rtc_probe failures followed by clock lookup errors on &ac100_rtc consumers
  • Track the fix commits (12bcd20, 55ca60b, 9cff19d, fcf0b58) across stable branches to confirm backport presence

Monitoring Recommendations

  • Collect kernel oops and panic telemetry from fleet devices built on AC100-equipped SoCs
  • Monitor boot logs for repeated RTC driver initialization failures that suggest the stale clock registration path
  • Correlate device tree consumer boot order with RTC probe outcomes to identify at-risk configurations

How to Mitigate CVE-2026-98826

Immediate Actions Required

  • Apply the upstream Linux kernel patches referenced by commits 12bcd20, 55ca60b, 9cff19d, and fcf0b58
  • Rebuild and redeploy kernels for all Allwinner platforms that enable the rtc-ac100 driver
  • Validate the fix by inducing probe failure under memory pressure and confirming no stale provider remains

Patch Information

The upstream fix replaces clk_hw_register_fixed_rate() with devm_clk_hw_register_fixed_rate() and of_clk_add_hw_provider() with devm_of_clk_add_hw_provider(). Devres then releases the provider before chip->clk_data is freed, and the now-redundant ac100_rtc_unregister_clks() helper and remove callback are deleted. Backports are available across stable kernel branches via the referenced git commits.

Workarounds

  • Disable the CONFIG_RTC_DRV_AC100 kernel option on affected builds if the AC100 RTC is not required
  • Remove &ac100_rtc references from device tree overlays on boards where downstream consumers can tolerate alternative clock sources
  • Avoid memory-pressured boot conditions on affected hardware until patched kernels are deployed

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.