ipv6/addrconf: fix a potential refcount underflow for idev
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b7b1bfce0bb68bd8f6e62a28295922785cc63781 · < 436b7cc7eae7851c184b671ed7a4a64c750b86f7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipv6/addrconf: fix a potential refcount underflow for idev
Now in addrconf_mod_rs_timer(), reference idev depends on whether rs_timer is not pending. Then modify rs_timer timeout.
There is a time gap in [1], during which if the pending rs_timer becomes not pending. It will miss to hold idev, but the rs_timer is activated. Thus rs_timer callback function addrconf_rs_timer() will be executed and put idev later without holding idev. A refcount underflow issue for idev can be caused by this.
if (!timer_pending(&idev->rs_timer)) in6_dev_hold(idev); <--------------[1] mod_timer(&idev->rs_timer, jiffies + when);
To fix the issue, hold idev if mod_timer() return 0.
From the CVE record · Linux
A race in the Linux kernel’s IPv6 addrconf router solicitation timer can cause an idev reference-count underflow when the timer becomes inactive before it is modified. The input does not establish how an attacker could trigger the race or whether network access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.