CVE-2023-52896
published 2024-08-21CVE-2023-52896: In the Linux kernel, the following vulnerability has been resolved: btrfs: fix race between quota rescan and disable leading to NULL pointer deref If we have…
PriorityP417medium4.7CVSS 3.1
AVLACHPRLUINSUCNINAH
EPSS
0.24%
15.1th percentile
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix race between quota rescan and disable leading to NULL pointer deref
If we have one task trying to start the quota rescan worker while another
one is trying to disable quotas, we can end up hitting a race that results
in the quota rescan worker doing a NULL pointer dereference. The steps for
this are the following:
1) Quotas are enabled;
2) Task A calls the quota rescan ioctl and enters btrfs_qgroup_rescan().
It calls qgroup_rescan_init() which returns 0 (success) and then joins a
transaction and commits it;
3) Task B calls the quota disable ioctl and enters btrfs_quota_disable().
It clears the bit BTRFS_FS_QUOTA_ENABLED from fs_info->flags and calls
btrfs_qgroup_wait_for_completion(), which returns immediately since the
rescan worker is not yet running.
Then it starts a transaction and locks fs_info->qgroup_ioctl_lock;
4) Task A queues the rescan worker, by calling btrfs_queue_work();
5) The rescan worker starts, and calls rescan_should_stop() at the start
of its while loop, which results in 0 iterations of the loop, since
the flag BTRFS_FS_QUOTA_ENABLED was cleared from fs_info->flags by
task B at step 3);
6) Task B sets fs_info->quota_root to NULL;
7) The rescan worker tries to start a transaction and uses
fs_info->quota_root as the root argument for btrfs_start_transaction().
This results in a NULL pointer dereference down the call chain of
btrfs_start_transaction(). The stack trace is something like the one
reported in Link tag below:
general protection fault, probably for non-canonical address 0xdffffc0000000041: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000208-0x000000000000020f]
CPU: 1 PID: 34 Comm: kworker/u4:2 Not tainted 6.1.0-syzkaller-13872-gb6bb9676f216 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: btrfs-qgroup-rescan btrfs_work_helper
RIP: 0010:start_transaction+0x48/0x10f0 fs/b
Affected
22 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | linux | < linux 6.1.8-1 (bookworm) | linux 6.1.8-1 (bookworm) |
| linux | linux | — | — |
| linux | linux | — | — |
| linux | linux | >= 26b3901d20bf9da2c6a00cb1fb48932166f80a45 < 89ac597e3e807b91e2ebd6a7c36fec7b97290233 | 89ac597e3e807b91e2ebd6a7c36fec7b97290233 |
| linux | linux | >= 32747e01436aac8ef93fe85b5b523b4f3b52f040 < 3bd43374857103ba3cac751d6d4afa8d83b5d92a | 3bd43374857103ba3cac751d6d4afa8d83b5d92a |
| linux | linux | >= 5.10.99 < 5.10.165 | 5.10.165 |
| linux | linux | >= 5.15.22 < 5.15.90 | 5.15.90 |
| linux | linux | >= 5.16.8 < 5.17 | 5.17 |
| linux | linux | >= 5.4.178 < 5.4.230 | 5.4.230 |
| linux | linux | >= 89d4cca583fc9594ee7d1a0bc986886d6fb587e6 < 64287cd456a22373053998c1fccf14b651e9cbbd | 64287cd456a22373053998c1fccf14b651e9cbbd |
| linux | linux | >= e804861bd4e69cc5fe1053eedcb024982dde8e48 < 1004fc90f0d79a4b7d9e3d432729914f472f9ad1 | 1004fc90f0d79a4b7d9e3d432729914f472f9ad1 |
| linux | linux | >= e804861bd4e69cc5fe1053eedcb024982dde8e48 < b7adbf9ada3513d2092362c8eac5cddc5b651f5c | b7adbf9ada3513d2092362c8eac5cddc5b651f5c |
| linux | linux_kernel | < 5.17 | 5.17 |
| linux | linux_kernel | — | — |
| linux | linux_kernel | >= 0 < 5.10.178-1 | 5.10.178-1 |
| linux | linux_kernel | >= 0 < 6.1.8-1 | 6.1.8-1 |
| linux | linux_kernel | >= 0 < 6.1.8-1 | 6.1.8-1 |
| linux | linux_kernel | >= 0 < 6.1.8-1 | 6.1.8-1 |
| linux | linux_kernel | >= 5.10.99 < 5.10.165 | 5.10.165 |
| linux | linux_kernel | >= 5.15.22 < 5.15.90 | 5.15.90 |
| linux | linux_kernel | >= 5.17 < 6.1.8 | 6.1.8 |
| linux | linux_kernel | >= 5.4.178 < 5.4.230 | 5.4.230 |
CVSS provenance
nvdv3.14.7MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
osv4.7MEDIUM
vendor_debian4.7MEDIUM
vendor_redhat4.7MEDIUM
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.
GHSA
GHSA-7g59-fcf3-5hj5: In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix race between quota rescan and disable leading to NULL pointer deref
I
ghsa_unreviewed·2024-08-21
CVE-2023-52896 [MEDIUM] CWE-476 GHSA-7g59-fcf3-5hj5: In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix race between quota rescan and disable leading to NULL pointer deref
I
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix race between quota rescan and disable leading to NULL pointer deref
If we have one task trying to start the quota rescan worker while another
one is trying to disable quotas, we can end up hitting a race that results
in the quota rescan worker doing a NULL pointer dereference. The steps for
this are the following:
1) Quotas are enabled;
2) Task A calls the quota rescan ioctl and enters btrfs_qgroup_rescan().
It calls qgroup_rescan_init() which returns 0 (success) and then joins a
transaction and commits it;
3) Task B calls the quota disable ioctl and enters btrfs_quota_disable().
It clears the bit BTRFS_FS_QUOTA_ENABLED from fs_info->flags and calls
btrfs_qgroup_wait_for_completion(), which returns immediat
OSV
CVE-2023-52896: In the Linux kernel, the following vulnerability has been resolved: btrfs: fix race between quota rescan and disable leading to NULL pointer deref If
osv·2024-08-21·CVSS 4.7
CVE-2023-52896 [MEDIUM] CVE-2023-52896: In the Linux kernel, the following vulnerability has been resolved: btrfs: fix race between quota rescan and disable leading to NULL pointer deref If
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix race between quota rescan and disable leading to NULL pointer deref If we have one task trying to start the quota rescan worker while another one is trying to disable quotas, we can end up hitting a race that results in the quota rescan worker doing a NULL pointer dereference. The steps for this are the following: 1) Quotas are enabled; 2) Task A calls the quota rescan ioctl and enters btrfs_qgroup_rescan(). It calls qgroup_rescan_init() which returns 0 (success) and then joins a transaction and commits it; 3) Task B calls the quota disable ioctl and enters btrfs_quota_disable(). It clears the bit BTRFS_FS_QUOTA_ENABLED from fs_info->flags and calls btrfs_qgroup_wait_for_completion(), which returns immediately s
Red Hat
kernel: btrfs: fix race between quota rescan and disable leading to NULL pointer deref
vendor_redhat·2024-08-21·CVSS 4.7
CVE-2023-52896 [MEDIUM] CWE-362 kernel: btrfs: fix race between quota rescan and disable leading to NULL pointer deref
kernel: btrfs: fix race between quota rescan and disable leading to NULL pointer deref
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix race between quota rescan and disable leading to NULL pointer deref
If we have one task trying to start the quota rescan worker while another
one is trying to disable quotas, we can end up hitting a race that results
in the quota rescan worker doing a NULL pointer dereference. The steps for
this are the following:
1) Quotas are enabled;
2) Task A calls the quota rescan ioctl and enters btrfs_qgroup_rescan().
It calls qgroup_rescan_init() which returns 0 (success) and then joins a
transaction and commits it;
3) Task B calls the quota disable ioctl and enters btrfs_quota_disable().
It clears the bit BTRFS_FS_QUOTA_ENABLED from
Debian
CVE-2023-52896: linux - In the Linux kernel, the following vulnerability has been resolved: btrfs: fix ...
vendor_debian·2023·CVSS 4.7
CVE-2023-52896 [MEDIUM] CVE-2023-52896: 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 race between quota rescan and disable leading to NULL pointer deref If we have one task trying to start the quota rescan worker while another one is trying to disable quotas, we can end up hitting a race that results in the quota rescan worker doing a NULL pointer dereference. The steps for this are the following: 1) Quotas are enabled; 2) Task A calls the quota rescan ioctl and enters btrfs_qgroup_rescan(). It calls qgroup_rescan_init() which returns 0 (success) and then joins a transaction and commits it; 3) Task B calls the quota disable ioctl and enters btrfs_quota_disable(). It clears the bit BTRFS_FS_QUOTA_ENABLED from fs_info->flags and calls btrfs_qgroup_wait_for_completion(), which returns immediately s
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://git.kernel.org/stable/c/1004fc90f0d79a4b7d9e3d432729914f472f9ad1https://git.kernel.org/stable/c/3bd43374857103ba3cac751d6d4afa8d83b5d92ahttps://git.kernel.org/stable/c/64287cd456a22373053998c1fccf14b651e9cbbdhttps://git.kernel.org/stable/c/89ac597e3e807b91e2ebd6a7c36fec7b97290233https://git.kernel.org/stable/c/b7adbf9ada3513d2092362c8eac5cddc5b651f5c
2024-08-21
Published