CVE-2021-46972
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
27/02/2024
Last modified:
08/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ovl: fix leaked dentry<br />
<br />
Since commit 6815f479ca90 ("ovl: use only uppermetacopy state in<br />
ovl_lookup()"), overlayfs doesn&#39;t put temporary dentry when there is a<br />
metacopy error, which leads to dentry leaks when shutting down the related<br />
superblock:<br />
<br />
overlayfs: refusing to follow metacopy origin for (/file0)<br />
...<br />
BUG: Dentry (____ptrval____){i=3f33,n=file3} still in use (1) [unmount of overlay overlay]<br />
...<br />
WARNING: CPU: 1 PID: 432 at umount_check.cold+0x107/0x14d<br />
CPU: 1 PID: 432 Comm: unmount-overlay Not tainted 5.12.0-rc5 #1<br />
...<br />
RIP: 0010:umount_check.cold+0x107/0x14d<br />
...<br />
Call Trace:<br />
d_walk+0x28c/0x950<br />
? dentry_lru_isolate+0x2b0/0x2b0<br />
? __kasan_slab_free+0x12/0x20<br />
do_one_tree+0x33/0x60<br />
shrink_dcache_for_umount+0x78/0x1d0<br />
generic_shutdown_super+0x70/0x440<br />
kill_anon_super+0x3e/0x70<br />
deactivate_locked_super+0xc4/0x160<br />
deactivate_super+0xfa/0x140<br />
cleanup_mnt+0x22e/0x370<br />
__cleanup_mnt+0x1a/0x30<br />
task_work_run+0x139/0x210<br />
do_exit+0xb0c/0x2820<br />
? __kasan_check_read+0x1d/0x30<br />
? find_held_lock+0x35/0x160<br />
? lock_release+0x1b6/0x660<br />
? mm_update_next_owner+0xa20/0xa20<br />
? reacquire_held_locks+0x3f0/0x3f0<br />
? __sanitizer_cov_trace_const_cmp4+0x22/0x30<br />
do_group_exit+0x135/0x380<br />
__do_sys_exit_group.isra.0+0x20/0x20<br />
__x64_sys_exit_group+0x3c/0x50<br />
do_syscall_64+0x45/0x70<br />
entry_SYSCALL_64_after_hwframe+0x44/0xae<br />
...<br />
VFS: Busy inodes after unmount of overlay. Self-destruct in 5 seconds. Have a nice day...<br />
<br />
This fix has been tested with a syzkaller reproducer.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.8 (including) | 5.10.35 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.11.19 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.12 (including) | 5.12.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/71d58457a8afc650da5d3292a7f7029317654d95
- https://git.kernel.org/stable/c/cf3e3330bc5719fa9d658e3e2f596bde89344a94
- https://git.kernel.org/stable/c/d587cfaef72b1b6f4b2774827123bce91f497cc8
- https://git.kernel.org/stable/c/eaab1d45cdb4bb0c846bd23c3d666d5b90af7b41
- https://git.kernel.org/stable/c/71d58457a8afc650da5d3292a7f7029317654d95
- https://git.kernel.org/stable/c/cf3e3330bc5719fa9d658e3e2f596bde89344a94
- https://git.kernel.org/stable/c/d587cfaef72b1b6f4b2774827123bce91f497cc8
- https://git.kernel.org/stable/c/eaab1d45cdb4bb0c846bd23c3d666d5b90af7b41



