CVE-2021-47599 json
btrfs: use latest_dev in btrfs_show_devname
published 2024-06-19 2 y ago modified 2026-06-17 4 mo ago also EUVD-2021-34601
- cvss
- 4.7
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.1%
- EPSS 0.1% chance of exploitation in 30 days, percentile 3%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
btrfs: use latest_dev in btrfs_show_devname
The test case btrfs/238 reports the warning below:
WARNING: CPU: 3 PID: 481 at fs/btrfs/super.c:2509 btrfs_show_devname+0x104/0x1e8 [btrfs] CPU: 2 PID: 1 Comm: systemd Tainted: G W O 5.14.0-rc1-custom #72 Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 Call trace: btrfs_show_devname+0x108/0x1b4 [btrfs] show_mountinfo+0x234/0x2c4 m_show+0x28/0x34 seq_read_iter+0x12c/0x3c4 vfs_read+0x29c/0x2c8 ksys_read+0x80/0xec __arm64_sys_read+0x28/0x34 invoke_syscall+0x50/0xf8 do_el0_svc+0x88/0x138 el0_svc+0x2c/0x8c el0t_64_sync_handler+0x84/0xe4 el0t_64_sync+0x198/0x19c
Reason: While btrfs_prepare_sprout() moves the fs_devices::devices into fs_devices::seed_list, the btrfs_show_devname() searches for the devices and found none, leading to the warning as in above.
Fix: latest_dev is updated according to the changes to the device list. That means we could use the latest_dev->name to show the device name in /proc/self/mounts, the pointer will be always valid as it's assigned before the device is deleted from the list in remove or replace. The RCU protection is sufficient as the device structure is freed after synchronization.
Patch / fix
- Linux Linux 4.20, 5.5, 5.8, 5.9, 5.15.11, 5.16
- linux Debian 14, Debian 13, Debian 12 5.15.15-1
debian advisories DEBIAN-CVE-2021-47599
- linux Ubuntu Pro 16.04 LTS 4.4.0-278.312
- linux Ubuntu Pro 18.04 LTS 4.15.0-247.259
- linux Ubuntu Pro 20.04 LTS 5.4.0-227.247
- linux-aws Ubuntu Pro 14.04 LTS 4.4.0-1152.158
- linux-aws Ubuntu Pro 16.04 LTS 4.4.0-1190.205
- linux-aws Ubuntu Pro 18.04 LTS 4.15.0-1189.202
- linux-aws Ubuntu Pro 20.04 LTS 5.4.0-1156.166
- linux-gcp Ubuntu Pro 16.04 LTS 4.15.0-1182.199~16.04.1
ubuntu advisories UBUNTU-CVE-2021-47599
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
- kernel-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.63.1
- kernel-syms-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.63.1
- kernel-source-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.63.1
- kernel-syms SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-122.225.1
- kernel-source SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-122.225.1
- kernel-default SLES for SAP 12 SP5, SLES 12 SP5, SLE Workstation Extension 12 SP5 +2 more 4.12.14-122.225.1
- kernel-obs-build SLE Software Development Kit 12 SP5 4.12.14-122.225.1
- dtb-aarch64 openSUSE Leap 15.5 5.14.21-150500.55.73.1
suse advisories SUSE-SU-2024:2947-1SUSE-SU-2024:2940-1SUSE-SU-2024:2939-1SUSE-SU-2024:2901-1SUSE-SU-2024:2894-1SUSE-SU-2024:2892-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-47599 updated cvss 5.5
kernel: btrfs: use latest_dev in btrfs_show_devname
-
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.15% chance of exploitation in the next 30 days, higher than 3% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 4.7 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization
- Technology feeds
References
Sources
- CVE List CVE-2021-47599
- NVD CVE-2021-47599
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.