# CVE-2022-48734: btrfs: fix deadlock between quota disable and qgroup rescan worker

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-06-20T11:13:21.392Z
- **Modified:** 2026-06-17T05:16:03.067Z

## Who should check

- Anyone running Linux \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 26b3901d20bf9da2c6a00cb1fb48932166f80a45; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 32747e01436aac8ef93fe85b5b523b4f3b52f040; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 89d4cca583fc9594ee7d1a0bc986886d6fb587e6; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 31198e58c09e21d4f65c49d2361f76b87aca4c3f; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< e804861bd4e69cc5fe1053eedcb024982dde8e48
- Anyone running Linux 4.4

## Description

In the Linux kernel, the following vulnerability has been resolved:

btrfs: fix deadlock between quota disable and qgroup rescan worker

Quota disable ioctl starts a transaction before waiting for the qgroup
rescan worker completes. However, this wait can be infinite and results
in deadlock because of circular dependency among the quota disable
ioctl, the qgroup rescan worker and the other task with transaction such
as block group relocation task.

The deadlock happens with the steps following:

1) Task A calls ioctl to disable quota. It starts a transaction and
   waits for qgroup rescan worker completes.
2) Task B such as block group relocation task starts a transaction and
   joins to the transaction that task A started. Then task B commits to
   the transaction. In this commit, task B waits for a commit by task A.
3) Task C as the qgroup rescan worker starts its job and starts a
   transaction. In this transaction start, task C waits for completion
   of the transaction that task A started and task B committed.

This deadlock was found with fstests test case btrfs/115 and a zoned
null\_blk device. The test case enables and disables quota, and the
block group reclaim was triggered during the quota disable by chance.
The deadlock was also observed by running quota enable and disable in
parallel with 'btrfs balance' command on regular null\_blk devices.

An example report of the deadlock:

  \[372.469894\] INFO: task kworker/u16:6:103 blocked for more than 122 seconds.
  \[372.479944\]       Not tainted 5.16.0-rc8 \#7
  \[372.485067\] "echo 0 \> /proc/sys/kernel/hung\_task\_timeout\_secs" disables this message.
  \[372.493898\] task:kworker/u16:6   state:D stack:    0 pid:  103 ppid:     2 flags:0x00004000
  \[372.503285\] Workqueue: btrfs-qgroup-rescan btrfs\_work\_helper \[btrfs\]
  \[372.510782\] Call Trace:
  \[372.514092\]  \<TASK\>
  \[372.521684\]  \_\_schedule+0xb56/0x4850
  \[372.530104\]  ? io\_schedule\_timeout+0x190/0x190
  \[372.538842\]  ? lockdep\_hardirqs\_on+0x7e/0x100
  \[372.547092\]  ? \_raw\_spin\_unlock\_irqrestore+0x3e/0x60
  \[372.555591\]  schedule+0xe0/0x270
  \[372.561894\]  btrfs\_commit\_transaction+0x18bb/0x2610 \[btrfs\]
  \[372.570506\]  ? btrfs\_apply\_pending\_changes+0x50/0x50 \[btrfs\]
  \[372.578875\]  ? free\_unref\_page+0x3f2/0x650
  \[372.585484\]  ? finish\_wait+0x270/0x270
  \[372.591594\]  ? release\_extent\_buffer+0x224/0x420 \[btrfs\]
  \[372.599264\]  btrfs\_qgroup\_rescan\_worker+0xc13/0x10c0 \[btrfs\]
  \[372.607157\]  ? lock\_release+0x3a9/0x6d0
  \[372.613054\]  ? btrfs\_qgroup\_account\_extent+0xda0/0xda0 \[btrfs\]
  \[372.620960\]  ? do\_raw\_spin\_lock+0x11e/0x250
  \[372.627137\]  ? rwlock\_bug.part.0+0x90/0x90
  \[372.633215\]  ? lock\_is\_held\_type+0xe4/0x140
  \[372.639404\]  btrfs\_work\_helper+0x1ae/0xa90 \[btrfs\]
  \[372.646268\]  process\_one\_work+0x7e9/0x1320
  \[372.652321\]  ? lock\_release+0x6d0/0x6d0
  \[372.658081\]  ? pwq\_dec\_nr\_in\_flight+0x230/0x230
  \[372.664513\]  ? rwlock\_bug.part.0+0x90/0x90
  \[372.670529\]  worker\_thread+0x59e/0xf90
  \[372.676172\]  ? process\_one\_work+0x1320/0x1320
  \[372.682440\]  kthread+0x3b9/0x490
  \[372.687550\]  ? \_raw\_spin\_unlock\_irq+0x24/0x50
  \[372.693811\]  ? set\_kthread\_struct+0x100/0x100
  \[372.700052\]  ret\_from\_fork+0x22/0x30
  \[372.705517\]  \</TASK\>
  \[372.709747\] INFO: task btrfs-transacti:2347 blocked for more than 123 seconds.
  \[372.729827\]       Not tainted 5.16.0-rc8 \#7
  \[372.745907\] "echo 0 \> /proc/sys/kernel/hung\_task\_timeout\_secs" disables this message.
  \[372.767106\] task:btrfs-transacti state:D stack:    0 pid: 2347 ppid:     2 flags:0x00004000
  \[372.787776\] Call Trace:
  \[372.801652\]  \<TASK\>
  \[372.812961\]  \_\_schedule+0xb56/0x4850
  \[372.830011\]  ? io\_schedule\_timeout+0x190/0x190
  \[372.852547\]  ? lockdep\_hardirqs\_on+0x7e/0x100
  \[372.871761\]  ? \_raw\_spin\_unlock\_irqrestore+0x3e/0x60
  \[372.886792\]  schedule+0xe0/0x270
  \[372.901685\]  wait\_current\_trans+0x22c/0x310 \[btrfs\]
  \[372.919743\]  ? btrfs\_put\_transaction+0x3d0/0x3d0 \[btrfs\]
  \[372.938923\]  ? finish\_wait+0x270/0x270
  \[372.959085\]  ? join\_transaction+0xc7
---truncated---

## Affected and fixed versions

- Linux: \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 26b3901d20bf9da2c6a00cb1fb48932166f80a45; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 32747e01436aac8ef93fe85b5b523b4f3b52f040; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 89d4cca583fc9594ee7d1a0bc986886d6fb587e6; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 31198e58c09e21d4f65c49d2361f76b87aca4c3f; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< e804861bd4e69cc5fe1053eedcb024982dde8e48 (cvelist)
- Linux: 4.4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-48734. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48734.md
Affected: Linux >= 967ef5131e42d6e3bb216c44161d893048a49957, < 26b3901d20bf9da2c6a00cb1fb48932166f80a45; >= 967ef5131e42d6e3bb216c44161d893048a49957, < 32747e01436aac8ef93fe85b5b523b4f3b52f040; >= 967ef5131e42d6e3bb216c44161d893048a49957, < 89d4cca583fc9594ee7d1a0bc986886d6fb587e6; >= 967ef5131e42d6e3bb216c4…
Fixed in: Linux 26b3901d20bf9da2c6a00cb1fb48932166f80a45, Linux 32747e01436aac8ef93fe85b5b523b4f3b52f040, Linux 89d4cca583fc9594ee7d1a0bc986886d6fb587e6, Linux 31198e58c09e21d4f65c49d2361f76b87aca4c3f

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-48734 being exploited?

There is no confirmed exploitation: CVE-2022-48734 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-48734?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-48734?

Linux \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 26b3901d20bf9da2c6a00cb1fb48932166f80a45; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 32747e01436aac8ef93fe85b5b523b4f3b52f040; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 89d4cca583fc9594ee7d1a0bc986886d6fb587e6; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< 31198e58c09e21d4f65c49d2361f76b87aca4c3f; \>= 967ef5131e42d6e3bb216c44161d893048a49957, \< e804861bd4e69cc5fe1053eedcb024982dde8e48; Linux 4.4.

### Is there a fix for CVE-2022-48734?

Yes. Fixed in Linux 26b3901d20bf9da2c6a00cb1fb48932166f80a45, Linux 32747e01436aac8ef93fe85b5b523b4f3b52f040, Linux 89d4cca583fc9594ee7d1a0bc986886d6fb587e6, Linux 31198e58c09e21d4f65c49d2361f76b87aca4c3f. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-48734?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/26b3901d20bf9da2c6a00cb1fb48932166f80a45>
- patch: <https://git.kernel.org/stable/c/32747e01436aac8ef93fe85b5b523b4f3b52f040>
- patch: <https://git.kernel.org/stable/c/89d4cca583fc9594ee7d1a0bc986886d6fb587e6>
- patch: <https://git.kernel.org/stable/c/31198e58c09e21d4f65c49d2361f76b87aca4c3f>
- patch: <https://git.kernel.org/stable/c/e804861bd4e69cc5fe1053eedcb024982dde8e48>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-48734>

HTML: <https://flawdb.com/CVE-2022-48734> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-48734>
