CVE-2021-47638 json
ubifs: rename_whiteout: Fix double free for whiteout_ui->data
published 2025-02-26 20 mo ago modified 2026-08-05 3 mo ago also EUVD-2021-34666
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 17%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
ubifs: rename_whiteout: Fix double free for whiteout_ui->data
'whiteout_ui->data' will be freed twice if space budget fail for rename whiteout operation as following process:
rename_whiteout dev = kmalloc whiteout_ui->data = dev kfree(whiteout_ui->data) // Free first time iput(whiteout) ubifs_free_inode kfree(ui->data) // Double free!
KASAN reports: ================================================================== BUG: KASAN: double-free or invalid-free in ubifs_free_inode+0x4f/0x70 Call Trace: kfree+0x117/0x490 ubifs_free_inode+0x4f/0x70 [ubifs] i_callback+0x30/0x60 rcu_do_batch+0x366/0xac0 __do_softirq+0x133/0x57f
Allocated by task 1506: kmem_cache_alloc_trace+0x3c2/0x7a0 do_rename+0x9b7/0x1150 [ubifs] ubifs_rename+0x106/0x1f0 [ubifs] do_syscall_64+0x35/0x80
Freed by task 1506: kfree+0x117/0x490 do_rename.cold+0x53/0x8a [ubifs] ubifs_rename+0x106/0x1f0 [ubifs] do_syscall_64+0x35/0x80
The buggy address belongs to the object at ffff88810238bed8 which belongs to the cache kmalloc-8 of size 8 ==================================================================
Let ubifs_free_inode() free 'whiteout_ui->data'. BTW, delete unused assignment 'whiteout_ui->data_len = 0', process 'ubifs_evict_inode() -> ubifs_jnl_delete_inode() -> ubifs_jnl_write_inode()' doesn't need it (because 'inc_nlink(whiteout)' won't be excuted by 'goto out_release', and the nlink of whiteout inode is 0).
Patch / fix
- Linux Linux 4.14.276, 4.19.238, 5.4.189, 5.10.110, 5.15.33, 5.16.19, 5.17.2, 5.18
- linux Debian 14, Debian 13, Debian 12 5.17.3-1
debian advisories DEBIAN-CVE-2021-47638
- linux Ubuntu 18.04 LTS 4.15.0-189.200
- linux Ubuntu 20.04 LTS 5.4.0-117.132
- linux Ubuntu 22.04 LTS 5.15.0-37.39
- linux-aws Ubuntu 18.04 LTS 4.15.0-1137.148
- linux-aws Ubuntu 20.04 LTS 5.4.0-1078.84
- linux-aws Ubuntu 22.04 LTS 5.15.0-1011.14
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1078.84
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1008.12
ubuntu advisories UBUNTU-CVE-2021-47638
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-64kb SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS, SLE High Performance Computing 15 SP5-ESPOS 5.14.21-150500.55.100.1
- kernel-syms SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.100.1
- kernel-source SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.100.1
- kernel-default SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +3 more 5.14.21-150500.55.100.1
- kernel-obs-build SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.100.1
- kernel-default-base SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.100.1.150500.6.47.1
- kernel-rt SLE Micro 5.4, SLE Micro 5.3 5.14.21-150400.15.115.1
- kernel-source-rt SLE Micro 5.4, SLE Micro 5.3 5.14.21-150400.15.115.1
suse advisories SUSE-SU-2025:1241-1SUSE-SU-2025:1183-1SUSE-SU-2025:1176-1SUSE-SU-2025:1027-1
- git.kernel.org/stable/c/8b3c7be16f3f4dfd6e15ac651484e59d3fa36274 commit
- git.kernel.org/stable/c/2b3236ecf96db7af5836e1366ce39ace8ce832fa commit
- git.kernel.org/stable/c/14276d38c89a170363e90b6ac0a53c3cf61b87fc commit
- git.kernel.org/stable/c/a90e2dbe66d2647ff95a0442ad2e86482d977fd8 commit
- git.kernel.org/stable/c/2ad07009c459e56ebdcc089d850d664660fdb742 commit
- git.kernel.org/stable/c/b9a937f096e608b3368c1abc920d4d640ba2c94f commit
- git.kernel.org/stable/c/6d7a158a7363c1f6604aa47ae1a280a5c65123dd commit
- git.kernel.org/stable/c/40a8f0d5e7b3999f096570edab71c345da812e3e commit
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-47638 updated cvss 5.5
kernel: ubifs: rename_whiteout: Fix double free for whiteout_ui->data
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more 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 more Red Hat Enterprise Linux 10 kernelnot 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
- 13 mo ago
Exploit prediction
0.26% chance of exploitation in the next 30 days, higher than 17% 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 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| 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 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-415 Double Free
- Technology feeds
References
-
git.kernel.org
/stable/c/8b3c7be16f3f4dfd6e15ac651484e59d3fa36274
patch
-
git.kernel.org
/stable/c/2b3236ecf96db7af5836e1366ce39ace8ce832fa
patch
-
git.kernel.org
/stable/c/14276d38c89a170363e90b6ac0a53c3cf61b87fc
patch
-
git.kernel.org
/stable/c/a90e2dbe66d2647ff95a0442ad2e86482d977fd8
patch
-
git.kernel.org
/stable/c/2ad07009c459e56ebdcc089d850d664660fdb742
patch
-
git.kernel.org
/stable/c/b9a937f096e608b3368c1abc920d4d640ba2c94f
patch
-
git.kernel.org
/stable/c/6d7a158a7363c1f6604aa47ae1a280a5c65123dd
patch
-
git.kernel.org
/stable/c/40a8f0d5e7b3999f096570edab71c345da812e3e
patch
Sources
- CVE List CVE-2021-47638
- NVD CVE-2021-47638
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.