CVE-2023-53339
kernel: Linux kernel: Denial of Service in btrfs due to race condition
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix BUG_ON condition in btrfs_cancel_balance
Pausing and canceling balance can race to interrupt balance lead to BUG_ON panic in btrfs_cancel_balance. The BUG_ON condition in btrfs_cancel_balance does not take this race scenario into account.
However, the race condition has no other side effects. We can fix that.
Reproducing it with panic trace like this:
kernel BUG at fs/btrfs/volumes.c:4618! RIP: 0010:btrfs_cancel_balance+0x5cf/0x6a0 Call Trace: <TASK> ? do_nanosleep+0x60/0x120 ? hrtimer_nanosleep+0xb7/0x1a0 ? sched_core_clone_cookie+0x70/0x70 btrfs_ioctl_balance_ctl+0x55/0x70 btrfs_ioctl+0xa46/0xd20 __x64_sys_ioctl+0x7d/0xa0 do_syscall_64+0x38/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd
Race scenario as follows:
mutex_unlock(&fs_info->balance_mutex);
.......issue pause and cancel req in another thread
ret = __btrfs_balance(fs_info);
mutex_lock(&fs_info->balance_mutex); if (ret == -ECANCELED && atomic_read(&fs_info->balance_pause_req)) { btrfs_info(fs_info, "balance: paused"); btrfs_exclop_balance(fs_info, BTRFS_EXCLOP_BALANCE_PAUSED); }
Source: OX vulnerability database
Severity
5.5 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-617
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 31 fixes
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.46-2.ph4 |
Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | bpftool +25 | affected |
SUSE Linux Enterprise 3 releases · 8 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | kgraft-patch-4-12-14-122-280-default | 1-8.5.1 | SUSE-SU-2025:4189-1 |
| 12.5 | cluster-md-kmp-default +13 | 4.12.14-122.280.1 | SUSE-SU-2025:4189-1 |
| 15.6 | kernel-livepatch-6-4-0-150600-10-55-rt | 1-150600.1.3.1 | SUSE-SU-2025:3751-1 |
| 15.6 | kernel-livepatch-6-4-0-150600-23-73-default | 1-150600.13.3.1 | SUSE-SU-2025:03600-1 |
| 15.6 | cluster-md-kmp-default +18 | 6.4.0-150600.23.73.1 | SUSE-SU-2025:03600-1 |
| 15.6 | kernel-default-base | 6.4.0-150600.23.73.1.150600.12.32.1 | SUSE-SU-2025:03600-1 |
6 more rows
SUSE Linux Enterprise Micro 2 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 6.0 | kernel-default +5 | 6.4.0-35.1 | SUSE-SU-2025:20851-1 |
| 6.0 | kernel-default-base | 6.4.0-35.1.21.12 | SUSE-SU-2025:20851-1 |
| 6.0 | kernel-devel-rt +3 | 6.4.0-37.1 | SUSE-SU-2025:20870-1 |
| 6.1 | kernel-default +6 | 6.4.0-35.1 | SUSE-SU-2025:20861-1 |
| 6.1 | kernel-default-base | 6.4.0-35.1.21.12 | SUSE-SU-2025:20861-1 |
| 6.1 | kernel-devel-rt +4 | 6.4.0-37.1 | SUSE-SU-2025:20898-1 |
amazon linux 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-1-49-69-116 | 1.0-0.amzn2023 |
| 2023 | bpftool +17 | 6.1.49-69.116.amzn2023 |
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.197-1 |
| 12 | linux | 6.1.52-1 |
| 13 | linux | 6.4.13-1 |
| 14 | linux | 6.4.13-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 6.4.13-1 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-linux | 5.10.197-1 |
| 12 | rootio-linux | 6.1.52-1 |
| 13 | rootio-linux | 6.4.13-1 |
root.io ubuntu 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | rootio-linux | 5.15.0-91.101 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-53339
- git.kernel.org https://git.kernel.org/stable/c/29eefa6d0d07e185f7bfe9576f91e6dba98189c2
- git.kernel.org https://git.kernel.org/stable/c/ae81329f7de3aa6f34ecdfa5412e72161a30e9ce
- git.kernel.org https://git.kernel.org/stable/c/ceb9ba8e30833a4823e2dc73f80ebcdf2498d01a
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025091718-CVE-2023-53339-437d@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-53339
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-53339
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.