CVE-2021-47555 json
net: vlan: fix underflow for the real_dev refcnt
published 2024-05-24 2 y ago modified 2026-08-05 3 mo ago also EUVD-2021-34557
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 12%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 5.4.163, 5.10.83, 5.15, 5.15.6
- linux Debian 14, Debian 13, Debian 12 5.15.15-1
debian advisories DEBIAN-CVE-2021-47555
- linux Ubuntu 20.04 LTS 5.4.0-100.113
- linux-aws Ubuntu 20.04 LTS 5.4.0-1066.69
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1065.69
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1015.16
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1056.58
- linux-azure Ubuntu 20.04 LTS 5.4.0-1070.73
- linux-gkeop Ubuntu 20.04 LTS 5.4.0-1034.35
- linux-raspi Ubuntu 20.04 LTS 5.4.0-1053.60
ubuntu advisories UBUNTU-CVE-2021-47555
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- dtb-aarch64 openSUSE Leap 15.5 5.14.21-150500.55.73.1
- kernel-64kb SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.73.1
- kernel-syms SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.73.1
- kernel-obs-qa openSUSE Leap 15.5 5.14.21-150500.55.73.1
- kernel-source SLE Module for Development Tools 15 SP5, SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.73.1
- kernel-default SLE Workstation Extension 15 SP5, SLE Module for Legacy 15 SP5, SLE Module for Basesystem 15 SP5 +5 more 5.14.21-150500.55.73.1
- kernel-kvmsmall openSUSE Leap 15.5 5.14.21-150500.55.73.1
- kernel-zfcpdump SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.73.1
suse advisories SUSE-SU-2024:2939-1SUSE-SU-2024:2495-1SUSE-SU-2024:2394-1SUSE-SU-2024:2385-1SUSE-SU-2024:2372-1SUSE-SU-2024:2190-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-47555 updated cvss 4.4
kernel: net: vlan: fix underflow for the real_dev refcnt
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.22% chance of exploitation in the next 30 days, higher than 12% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA ADP | 3.1 | 4.4 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| CNA | 3.1 | 4.4 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-191 Integer Underflow (Wrap or Wraparound)
- Technology feeds
References
Sources
- CVE List CVE-2021-47555
- NVD CVE-2021-47555
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.