net: vlan: fix underflow for the real_dev refcnt
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
| No fix yet |
In the Linux kernel, the following vulnerability has been resolved:
net: vlan: fix underflow for the real_dev refcnt
Inject error before dev_hold(real_dev) in register_vlan_dev(), and execute the following testcase:
ip link add dev dummy1 type dummy ip link add name dummy1.100 link dummy1 type vlan id 100 ip link del dev dummy1
When the dummy netdevice is removed, we will get a WARNING as following:
======================================================================= refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 2 PID: 0 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0
and an endless loop of:
======================================================================= unregister_netdevice: waiting for dummy1 to become free. Usage count = -1073741824
From the CVE record · Linux
The Linux kernel’s VLAN networking code can underflow a device reference count if VLAN registration fails before it retains the underlying device. Under the described error-injection and device-removal sequence, this causes a warning and an endless wait for the device to become free. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux kernels with the affected VLAN networking code should check their vendor’s advisory; affected versions are not specified.