cve.bz

CVE-2026-45949 linux linux kernel: Race Condition

4.7 mediumEPSS 0.09%Fix available

Medium (4.7) in linux linux kernel. EPSS 0.09% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: hwrng: core - use RCU and work_struct to fix race condition Currently, hwrng_fill is not cleared until the hwrng_fillfn() thread exits. Since hwrng_unregister() reads hwrng_fill outside the rng_mutex lock, a concurrent hwrng_unregister() may call kthread_stop() again on the same task. Additionally, if hwrng_unregister() is called immediately after hwrng_register(), the stopped thread may have never been executed. Thus, hwrng_fill remains dirty even after hwrng_unregister() returns. In this case, subsequent calls to hwrng_register() will fail to start new threads, and hwrng_unregister() will call kthread_stop() on the same freed task. In both cases, a use-after-free occurs: refcount_t: addition on 0; use-after-free. WARNING: ... at lib/refcount.c:25 refcount_warn_saturate+0xec/0x1c0 Call Trace: kthread_stop+0x181/0x360 hwrng_unregister+0x288/0x380 virtrng_remove+0xe3/0x200 This patch fixes the race by protecting the global hwrng_fill pointer inside the rng_mutex lock, so that hwrng_fillfn() thread is stopped only once, and calls to kthread_run() and kthread_stop() are serialized with the lock held. To avoid deadlock in hwrng_fillfn() while being stopped with the lock held, we convert current_rng to RCU, so that get_current_rng() can read current_rng without holding the lock. To remove the lock from put_rng(), we also delay the actual cleanup into a work_struct. Since get_current_rng() no longer returns ERR_PTR values, the IS_ERR() checks are removed from its callers. With hwrng_fill protected by the rng_mutex lock, hwrng_fillfn() can no longer clear hwrng_fill itself. Therefore, if hwrng_fillfn() returns directly after current_rng is dropped, kthread_stop() would be called on a freed task_struct later. To fix this, hwrng_fillfn() calls schedule() now to keep the task alive until being stopped. The kthread_stop() call is also moved from hwrng_unregister() to drop_current_rng(), ensuring kthread_stop() is called on all possible paths where current_rng becomes NULL, so that the thread would not wait forever.

Severity

CVSS 3.1

4.7 medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.09% (unchanged from 0.09% a week ago; 0.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 0th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-11-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-45949 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-45949?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-45949?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-45949 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux3.17 and later

Fixed in

ProductRelease lineFixed in
Linux6.16.1.191
Linux6.66.6.160
Linux6.126.12.75
Linux6.186.18.14
Linux6.196.19.4
Linuxlater releases7.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.192-1DEBIAN-CVE-2026-45949
Debian13linux6.12.85-1DEBIAN-CVE-2026-45949
Debian14linux6.18.14-1DEBIAN-CVE-2026-45949
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2026-45949
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2026-45949
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2026-45949
Ubuntu22.04:LTSlinux, linux-aws, linux-gcp and 57 moreno fix listedUBUNTU-CVE-2026-45949
Ubuntu24.04:LTSlinux, linux-aws, linux-gcp and 42 moreno fix listedUBUNTU-CVE-2026-45949
Ubuntu25.10linux, linux-aws, linux-gcp and 6 moreno fix listedUBUNTU-CVE-2026-45949
UbuntuNvidia-BlueField:22.04:LTS, Nvidia-BlueField:24.04:LTSlinux-bluefieldno fix listedUBUNTU-CVE-2026-45949
UbuntuPro:14.04:LTSlinux-aws, linux-azure, linux-lts-xenialno fix listedUBUNTU-CVE-2026-45949
UbuntuPro:16.04:LTSlinux, linux-aws, linux-gcp and 5 moreno fix listedUBUNTU-CVE-2026-45949
UbuntuPro:18.04:LTSlinux, linux-aws, linux-kvm and 10 moreno fix listedUBUNTU-CVE-2026-45949
UbuntuPro:20.04:LTSlinux, linux-aws, linux-gcp and 19 moreno fix listedUBUNTU-CVE-2026-45949
UbuntuPro:FIPS-preview:22.04:LTS, Pro:FIPS-updates:18.04:LTS, Pro:FIPS-updates:20.04:LTS and 4 morelinux-fips, linux-aws-fips, linux-gcp-fips and 1 moreno fix listedUBUNTU-CVE-2026-45949
3 more for Ubuntu in the JSON and on Ubuntu's page.
Azure Linux3kernelno fix listedAZL-88494
Alpaquita23linux-lts6.1.191-r0BELL-CVE-2026-45949
Alpaquita25linux-lts6.12.80-r0BELL-CVE-2026-45949
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2026-45949

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A race in the hwrng core can leave the global hwrng_fill task pointer stale across fast hwrng_register and hwrng_unregister sequences. This can make hwrng_unregister call kthread_stop on the same task twice or on a task_struct that has already been freed, producing a real use after free in a kernel thread lifetime path. For the CVSS the PR:H is used because reliable triggering normally requires privileged hardware RNG device management, module unload, driver unbind, or hotplug control rather than ordinary local user access. The issue is not network reachable and reading from /dev/hwrng alone is not the relevant trigger path. Impact is primarily availability through kernel warning or crash. Limited confidentiality and integrity impact are kept only for the paranoid interpretation because the bug is a real UAF, but the patch does not show controlled reclaim, arbitrary write, or a strong LPE primitive.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelFix deferred
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelFix deferred
Red Hat Enterprise Linux 7kernel-rtFix deferred
Red Hat Enterprise Linux 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-45949.

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON