Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C64484A2E24 for ; Sun, 18 Oct 2026 16:21:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340476; cv=none; b=Rg0nGa/m2zzDxs3CMd3DQA6mKZsTi5U1RF5OCfE9moM3RNEoP3/pi076WSeEKiaWhg+5z9z0b5u/LrcfOGQza3CthzQymz4Y5HTp1WhzlN+LRCwm2lunTjbN+nCq8jq6+89FDBMSFa+6nN7UFSzan0VRZD7bn83yTnk3F3siUbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340476; c=relaxed/simple; bh=tVbM882zlOecSduAPGLtei5cMjkMwJm318Bu9EsBIDE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FqczvPRTxLE6S++yVxKAp2373f5zRMZ+1H3AvmGHAdjqMUTM2O23Do76HGVy1gPcNl753ze56dGqms9zZCzV7z4BsEv0uU/VrFZLrv7wn2iSlZi6ZQzs0En6zY7AGjsLmzHkrpASTtJeu4EYBmcVbbBLE/6KfTMS4rEzlbMFCXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dViGKw6J; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dViGKw6J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAFDA1F000C4; Sun, 18 Oct 2026 16:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792340475; bh=g3iOII5F7u54goet2TWzFxXO6S+DxNCrLuOpj9MoOfo=; h=From:To:Cc:Subject:Date:Reply-To; b=dViGKw6JsTtQuLPgZQnpDs6S8Epj5cNHX2Ktu/JHEBWaLvEgwZX4ylB+QQ5McZzek ren+uhDibo+wpcdJyu32fqtB6KcHqbchTZLsvjgAnUS1m9vBcJKW8XYUmixvM0k/On n0UaxhCmvvRWVqcR+K+LMPXJdB0hq5yn5nR5HeNQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98826: rtc: ac100: Fix clock provider use-after-free on probe failure Date: Sun, 18 Oct 2026 17:46:41 +0200 Message-ID: <2026101829-CVE-2026-98826-1a1d@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4356; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7UnQxPMCOYXW5jE11WxzgLkuoJyflNwzl5UAq99HlJo=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXXsZJeU0P+SfYoLD/wJqKbT/txcpFfDx47rk7zew6+ vTYsRjejlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhInjfDgs2OkYl7914PPez0 ttdB9EqhYGKMJMM8O3feygBBtxPH5qZzrZlnKK1mKaIMAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: rtc: ac100: Fix clock provider use-after-free on probe failure ac100_rtc_register_clks() registers the RTC-32k clock with clk_hw_register_fixed_rate() and the clock provider with of_clk_add_hw_provider(). Neither is device managed, and both are released only from ac100_rtc_remove(). The driver core does not call remove() when probe() fails: really_probe() reaches probe_failed below the device_remove() call and goes straight to releasing the device's managed resources. ac100_rtc_probe() ends with return devm_rtc_register_device(chip->rtc); so if that fails after the clocks have been registered, the provider is left on the global of_clk_providers list holding chip->clk_data, which was allocated with devm_kzalloc() and is freed while probe() unwinds. A later lookup on this device tree node then reads freed memory in of_clk_hw_onecell_get(). Consumers that do exactly that exist in tree: the wifi power sequence nodes on sun8i-a83t-bananapi-m3 and sun8i-a83t-cubietruck-plus take <&ac100_rtc 1>, and the sun9i-a80 boards route osc32k through <&ac100_rtc 0>. The window is narrow, as devm_rtc_register_device() 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 clk_core_lookup() searches a global list that is not scoped per device, __clk_register() 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 devm_clk_hw_register_fixed_rate() and devm_of_clk_add_hw_provider() 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->clk_data is freed, and the clkout children are now unregistered before their parent rather than after it. ac100_rtc_unregister_clks() and the remove callback then have nothing left to do and are removed. The Linux kernel CVE team has assigned CVE-2026-98826 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit d00a18a42c1483924de086ddfb0efe8da1dba3ac and fixed in 6.12.113 with commit 12bcd20d76703ee2baf52224d287b7fea096b12f Issue introduced in 4.9 with commit d00a18a42c1483924de086ddfb0efe8da1dba3ac and fixed in 6.18.56 with commit 9cff19ddd7f90c1f572a0f83cfc41de8f8dcbcd8 Issue introduced in 4.9 with commit d00a18a42c1483924de086ddfb0efe8da1dba3ac and fixed in 7.2.10 with commit 55ca60ba336632349f7c4585d22ba74ae355b7ce Issue introduced in 4.9 with commit d00a18a42c1483924de086ddfb0efe8da1dba3ac and fixed in 7.3-rc6 with commit fcf0b58e976e83adf246b014518e49c662b96f5e Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-98826 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/rtc/rtc-ac100.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/12bcd20d76703ee2baf52224d287b7fea096b12f https://git.kernel.org/stable/c/9cff19ddd7f90c1f572a0f83cfc41de8f8dcbcd8 https://git.kernel.org/stable/c/55ca60ba336632349f7c4585d22ba74ae355b7ce https://git.kernel.org/stable/c/fcf0b58e976e83adf246b014518e49c662b96f5e