CVE-2025-71194: btrfs: fix deadlock in wait_current_trans() due to ignored transaction type

Published Feb 4, 2026
·
Updated

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

btrfs: fix deadlock in waitcurrenttrans() due to ignored transaction type

When waitcurrenttrans() is called during starttransaction(), it currently waits for a blocked transaction without considering whether the given transaction type actually needs to wait for that particular transaction state. The btrfsblockedtranstypes[] array already defines which transaction types should wait for which transaction states, but this check was missing in waitcurrenttrans().

This can lead to a deadlock scenario involving two transactions and pending ordered extents:

1. Transaction A is in TRANSSTATECOMMITDOING state

2. A worker processing an ordered extent calls starttransaction() with TRANSJOIN

3. jointransaction() returns -EBUSY because Transaction A is in TRANSSTATECOMMITDOING

4. Transaction A moves to TRANSSTATEUNBLOCKED and completes

5. A new Transaction B is created (TRANSSTATERUNNING)

6. The ordered extent from step 2 is added to Transaction B's pending ordered extents

7. Transaction B immediately starts commit by another task and enters TRANSSTATECOMMITSTART

8. The worker finally reaches waitcurrenttrans(), sees Transaction B in TRANSSTATECOMMITSTART (a blocked state), and waits unconditionally

9. However, TRANSJOIN should NOT wait for TRANSSTATECOMMITSTART according to btrfsblockedtranstypes[]

10. Transaction B is waiting for pending ordered extents to complete

11. Deadlock: Transaction B waits for ordered extent, ordered extent waits for Transaction B

This can be illustrated by the following call stacks: CPU0 CPU1 btrfsfinishorderedio() starttransaction(TRANSJOIN) jointransaction() # -EBUSY (Transaction A is # TRANSSTATECOMMITDOING) # Transaction A completes # Transaction B created # ordered extent added to # Transaction B's pending list btrfscommittransaction() # Transaction B enters # TRANSSTATECOMMITSTART # waiting for pending ordered # extents waitcurrenttrans() # waits for Transaction B # (should not wait!)

Task bstorekvsync in btrfscommittransaction waiting for ordered extents:

schedule+0x2e7/0x8a0 schedule+0x64/0xe0 btrfscommittransaction+0xbf7/0xda0 [btrfs] btrfssyncfile+0x342/0x4d0 [btrfs] x64sysfdatasync+0x4b/0x80 dosyscall64+0x33/0x40 entrySYSCALL64afterhwframe+0x44/0xa9

Task kworker in waitcurrenttrans waiting for transaction commit:

Workqueue: btrfs-synonocow btrfsworkhelper [btrfs] schedule+0x2e7/0x8a0 schedule+0x64/0xe0 waitcurrenttrans+0xb0/0x110 [btrfs] starttransaction+0x346/0x5b0 [btrfs] btrfsfinishorderedio.isra.0+0x49b/0x9c0 [btrfs] btrfsworkhelper+0xe8/0x350 [btrfs] processonework+0x1d3/0x3c0 workerthread+0x4d/0x3e0 kthread+0x12d/0x150 retfromfork+0x1f/0x30

Fix this by passing the transaction type to waitcurrenttrans() and checking btrfsblockedtranstypes[curtrans->state] against the given type before deciding to wait. This ensures that transaction types which are allowed to join during certain blocked states will not unnecessarily wait and cause deadlocks.

Affected Software

2 affected componentsFixes available
Linux Linux kernel=
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1

Event History

Feb 4, 2026
CVE Published
via MITRE·04:04 PM
Data Sourced
via MITRE·04:04 PM
Description
Data Sourced
via NVD·05:16 PM
DescriptionWeakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

Which systems are most likely to encounter this issue?

The deadlock scenario involves Btrfs transaction processing with a worker handling an ordered extent while other tasks advance and commit transactions. It requires a specific sequence in which a transaction join is initially blocked, a new transaction is created, and that new transaction begins committing.

2

What is the practical impact if the issue is triggered?

The affected worker can wait on a transaction state that its transaction type does not need to wait for, creating a deadlock involving pending ordered extents and transaction commit processing.

3

Are upstream fixes available?

Yes. The issue is described as resolved, and fixes are referenced in stable kernel commits e563f59395981fcd69d130761290929806e728d6, dc84036c173cff6a432d9ab926298850b1d2a659, and d7b04b40ac8e6d814e35202a0e1568809b818295.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203