Linux
ipv6: fix a BUG in rt6_get_pcpu_route() under PREEMPT_RT
In the Linux kernel, the following vulnerability has been resolved: ipv6: fix a BUG in rt6_get_pcpu_route() under PREEMPT_RT On PREEMPT_RT kernels, after rt6_get_pcpu_route() returns NULL, the current task can be preempted. Another task running on the same CPU may then execute rt6_make_pcpu_route() and successfully install a pcpu_rt entry. When the first task resumes execution, its cmpxchg() in rt6_make_pcpu_route() will fail because rt6i_pcpu is no longer NULL, triggering the BUG_ON(prev). It's easy to reproduce it by adding mdelay() after rt6_get_pcpu_route(). Using preempt_disable/enable is not appropriate here because ip6_rt_pcpu_alloc() may sleep. Fix this by handling the cmpxchg() failure gracefully on PREEMPT_RT: free our allocation and return the existing pcpu_rt installed by another task. The BUG_ON is replaced by WARN_ON_ONCE for non-PREEMPT_RT kernels where such races should not occur.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= d2d6422f8bd17c6bb205133e290625a564194496, < 1dc33ad0867325f8d2c6d7b2a6f542d4f3121f66
- >= d2d6422f8bd17c6bb205133e290625a564194496, < 787515ccb2292f82eb0876993129154629a49651
- >= d2d6422f8bd17c6bb205133e290625a564194496, < 1adaea51c61b52e24e7ab38f7d3eba023b2d050d
Fixed in 1dc33ad0867325f8d2c6d7b2a6f542d4f3121f66, 787515ccb2292f82eb0876993129154629a49651, 1adaea51c61b52e24e7ab38f7d3eba023b2d050d
- 6.12
Fixed in 0, 6.12.64, 6.18.4, 6.19
Mitigation
Upgrade Linux to 1dc33ad0867325f8d2c6d7b2a6f542d4f3121f66 or 787515ccb2292f82eb0876993129154629a49651 or 1adaea51c61b52e24e7ab38f7d3eba023b2d050d or later.
Upgrade Linux to 0 or 6.12.64 or 6.18.4 or 6.19 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.