Security mailing lists by PureSourceCode

CVE-2021-47555

MEDIUM 5.5CVSS 3.1

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

That is because dev_put(real_dev) in vlan_dev_free() be called without
dev_hold(real_dev) in register_vlan_dev(). It makes the refcnt of real_dev
underflow.

Move the dev_hold(real_dev) to vlan_dev_init() which is the call-back of
ndo_init(). That makes dev_hold() and dev_put() for vlan's real_dev
symmetrical.

Published
24 May 2024
Last modified
4 Aug 2026
Assigned by
416baaa9-dc9f-4396-8d5f-8c081fb06d67
NVD status
Modified
Weakness
CWE-191
Sources
NVDJSON

Scores

SourceScored byVersionScoreVector / decision
NVD 416baaa9-dc9f-4396-8d5f-8c081fb06d67 (Secondary) CVSS 3.1 HIGH 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) CVSS 3.1 MEDIUM 4.4 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD linux linux_kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
>= 5.4.160, < 5.4.163 5.4.163
NVD linux linux_kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
>= 5.10.80, < 5.10.83 5.10.83
NVD linux linux_kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
>= 5.14.19, < 5.15 5.15
NVD linux linux_kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
>= 5.15.3, < 5.15.6 5.15.6
NVD linux linux_kernel
cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:*
= 5.16
NVD linux linux_kernel
cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:*
= 5.16

References

History

  • 25 Nov 2026 20:55 UTC · NVD: first stored (published 24 May 2024)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.