CVE-2021-46987
published 2024-02-28CVE-2021-46987: In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock when cloning inline extents and using qgroups There are a few…
PriorityP420medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.18%
7.9th percentile
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix deadlock when cloning inline extents and using qgroups
There are a few exceptional cases where cloning an inline extent needs to
copy the inline extent data into a page of the destination inode.
When this happens, we end up starting a transaction while having a dirty
page for the destination inode and while having the range locked in the
destination's inode iotree too. Because when reserving metadata space
for a transaction we may need to flush existing delalloc in case there is
not enough free space, we have a mechanism in place to prevent a deadlock,
which was introduced in commit 3d45f221ce627d ("btrfs: fix deadlock when
cloning inline extent and low on free metadata space").
However when using qgroups, a transaction also reserves metadata qgroup
space, which can also result in flushing delalloc in case there is not
enough available space at the moment. When this happens we deadlock, since
flushing delalloc requires locking the file range in the inode's iotree
and the range was already locked at the very beginning of the clone
operation, before attempting to start the transaction.
When this issue happens, stack traces like the following are reported:
[72747.556262] task:kworker/u81:9 state:D stack: 0 pid: 225 ppid: 2 flags:0x00004000
[72747.556268] Workqueue: writeback wb_workfn (flush-btrfs-1142)
[72747.556271] Call Trace:
[72747.556273] __schedule+0x296/0x760
[72747.556277] schedule+0x3c/0xa0
[72747.556279] io_schedule+0x12/0x40
[72747.556284] __lock_page+0x13c/0x280
[72747.556287] ? generic_file_readonly_mmap+0x70/0x70
[72747.556325] extent_write_cache_pages+0x22a/0x440 [btrfs]
[72747.556331] ? __set_page_dirty_nobuffers+0xe7/0x160
[72747.556358] ? set_extent_buffer_dirty+0x5e/0x80 [btrfs]
[72747.556362] ? update_group_capacity+0x25/0x210
[72747.556366] ? cpumask_next_and+0x1a/0x20
[72747.556391] extent_writepages+0x44/0xa0 [btrfs]
[72747.556394] do_writepages+0x41/0xd0
[72747
Affected
15 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | linux | < linux 5.14.6-1 (bookworm) | linux 5.14.6-1 (bookworm) |
| linux | linux | — | — |
| linux | linux | — | — |
| linux | linux | >= 5.4.141 < 5.5 | 5.5 |
| linux | linux | >= c53e9653605dbf708f5be02902de51831be4b009 < f8fbbd06fab9b75dcd68d850fe318ac3bc128974 | f8fbbd06fab9b75dcd68d850fe318ac3bc128974 |
| linux | linux | >= c53e9653605dbf708f5be02902de51831be4b009 < d5347827d0b4b2250cbce6eccaa1c81dc78d8651 | d5347827d0b4b2250cbce6eccaa1c81dc78d8651 |
| linux | linux | >= c53e9653605dbf708f5be02902de51831be4b009 < 96157707c0420e3d3edfe046f1cc797fee117ade | 96157707c0420e3d3edfe046f1cc797fee117ade |
| linux | linux | >= c53e9653605dbf708f5be02902de51831be4b009 < f9baa501b4fd6962257853d46ddffbc21f27e344 | f9baa501b4fd6962257853d46ddffbc21f27e344 |
| linux | linux_kernel | — | — |
| linux | linux_kernel | >= 0 < 5.10.244-1 | 5.10.244-1 |
| linux | linux_kernel | >= 0 < 5.14.6-1 | 5.14.6-1 |
| linux | linux_kernel | >= 0 < 5.14.6-1 | 5.14.6-1 |
| linux | linux_kernel | >= 0 < 5.14.6-1 | 5.14.6-1 |
| linux | linux_kernel | >= 5.12 < 5.12.5 | 5.12.5 |
| linux | linux_kernel | >= 5.9 < 5.11.22 | 5.11.22 |
CVSS provenance
nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
osv5.5MEDIUM
vendor_debian5.5MEDIUM
vendor_redhat5.5MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Red Hat
kernel: btrfs: fix deadlock when cloning inline extents and using qgroups
vendor_redhat·2024-02-28·CVSS 5.5
CVE-2021-46987 [MEDIUM] CWE-833 kernel: btrfs: fix deadlock when cloning inline extents and using qgroups
kernel: btrfs: fix deadlock when cloning inline extents and using qgroups
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix deadlock when cloning inline extents and using qgroups
There are a few exceptional cases where cloning an inline extent needs to
copy the inline extent data into a page of the destination inode.
When this happens, we end up starting a transaction while having a dirty
page for the destination inode and while having the range locked in the
destination's inode iotree too. Because when reserving metadata space
for a transaction we may need to flush existing delalloc in case there is
not enough free space, we have a mechanism in place to prevent a deadlock,
which was introduced in commit 3d45f221ce627d ("btrfs: fix deadlock when
cloning inline
Debian
CVE-2021-46987: linux - In the Linux kernel, the following vulnerability has been resolved: btrfs: fix ...
vendor_debian·2021·CVSS 5.5
CVE-2021-46987 [MEDIUM] CVE-2021-46987: linux - In the Linux kernel, the following vulnerability has been resolved: btrfs: fix ...
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock when cloning inline extents and using qgroups There are a few exceptional cases where cloning an inline extent needs to copy the inline extent data into a page of the destination inode. When this happens, we end up starting a transaction while having a dirty page for the destination inode and while having the range locked in the destination's inode iotree too. Because when reserving metadata space for a transaction we may need to flush existing delalloc in case there is not enough free space, we have a mechanism in place to prevent a deadlock, which was introduced in commit 3d45f221ce627d ("btrfs: fix deadlock when cloning inline extent and low on free metadata space"). However when using qgroups, a tra
OSV
CVE-2021-46987: In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock when cloning inline extents and using qgroups There are a few
osv·2024-02-28·CVSS 5.5
CVE-2021-46987 [MEDIUM] CVE-2021-46987: In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock when cloning inline extents and using qgroups There are a few
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock when cloning inline extents and using qgroups There are a few exceptional cases where cloning an inline extent needs to copy the inline extent data into a page of the destination inode. When this happens, we end up starting a transaction while having a dirty page for the destination inode and while having the range locked in the destination's inode iotree too. Because when reserving metadata space for a transaction we may need to flush existing delalloc in case there is not enough free space, we have a mechanism in place to prevent a deadlock, which was introduced in commit 3d45f221ce627d ("btrfs: fix deadlock when cloning inline extent and low on free metadata space"). However when using qgroups, a tra
GHSA
GHSA-85xw-cv8g-9227: In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix deadlock when cloning inline extents and using qgroups
There are a fe
ghsa_unreviewed·2024-02-28
CVE-2021-46987 [MEDIUM] CWE-667 GHSA-85xw-cv8g-9227: In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix deadlock when cloning inline extents and using qgroups
There are a fe
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix deadlock when cloning inline extents and using qgroups
There are a few exceptional cases where cloning an inline extent needs to
copy the inline extent data into a page of the destination inode.
When this happens, we end up starting a transaction while having a dirty
page for the destination inode and while having the range locked in the
destination's inode iotree too. Because when reserving metadata space
for a transaction we may need to flush existing delalloc in case there is
not enough free space, we have a mechanism in place to prevent a deadlock,
which was introduced in commit 3d45f221ce627d ("btrfs: fix deadlock when
cloning inline extent and low on free metadata space").
However when using qgroups, a
No detection rules found.
No public exploits indexed.
https://git.kernel.org/stable/c/96157707c0420e3d3edfe046f1cc797fee117adehttps://git.kernel.org/stable/c/d5347827d0b4b2250cbce6eccaa1c81dc78d8651https://git.kernel.org/stable/c/f8fbbd06fab9b75dcd68d850fe318ac3bc128974https://git.kernel.org/stable/c/f9baa501b4fd6962257853d46ddffbc21f27e344https://git.kernel.org/stable/c/96157707c0420e3d3edfe046f1cc797fee117adehttps://git.kernel.org/stable/c/d5347827d0b4b2250cbce6eccaa1c81dc78d8651https://git.kernel.org/stable/c/f9baa501b4fd6962257853d46ddffbc21f27e344https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html
2024-02-28
Published