CVE-2026-98826: rtc: ac100: Fix clock provider use-after-free on probe failure

Published Oct 18, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

rtc: ac100: Fix clock provider use-after-free on probe failure

ac100rtcregisterclks() registers the RTC-32k clock with clkhwregisterfixedrate() and the clock provider with ofclkaddhwprovider(). Neither is device managed, and both are released only from ac100rtcremove(). The driver core does not call remove() when probe() fails: reallyprobe() reaches probefailed below the deviceremove() call and goes straight to releasing the device's managed resources.

ac100rtcprobe() ends with

return devmrtcregisterdevice(chip->rtc);

so if that fails after the clocks have been registered, the provider is left on the global ofclkproviders list holding chip->clkdata, which was allocated with devmkzalloc() and is freed while probe() unwinds. A later lookup on this device tree node then reads freed memory in ofclkhwonecellget(). Consumers that do exactly that exist in tree: the wifi power sequence nodes on sun8i-a83t-bananapi-m3 and sun8i-a83t-cubietruck-plus take <&ac100rtc 1>, and the sun9i-a80 boards route osc32k through <&ac100rtc 0>. The window is narrow, as devmrtcregisterdevice() can only fail with -ENOMEM here, but the provider is left dangling whenever it does.

The RTC-32k clock is leaked on the same path. Since clkcorelookup() searches a global list that is not scoped per device, clkregister() rejects the duplicate name with -EEXIST, so the leak also makes a later probe of the same device fail.

The error path that returns -EINVAL when the ADDA 4M parent clock cannot be found leaks the RTC-32k clock in the same way. No provider has been registered at that point, so that one is a leak rather than a use-after-free.

Register both with devmclkhwregisterfixedrate() and devmofclkaddhwprovider() so that they are released whenever the device goes away, on a failed probe as well as on unbind. Devres releases in reverse order of acquisition, so the provider is removed before chip->clkdata is freed, and the clkout children are now unregistered before their parent rather than after it. ac100rtcunregisterclks() and the remove callback then have nothing left to do and are removed.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Update the AC100 RTC driver to register both fixed-rate clocks with devm_clk_hw_register_fixed_rate() and register the clock provider with devm_of_clk_add_hw_provider(), so the clocks and provider are released automatically on probe failure and device removal.

Event History

Oct 18, 2026
CVE Published
via MITRE·03:49 PM
Data Sourced
via MITRE·03:49 PM
Description
Data Sourced
via NVD·04:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203