Junglewise Threat Intelligence

CVE-2025-21753: Linux Kernel Btrfs use-after-free in join_transaction

CVE-2025-21753 · Severity: high · CVSS 7.8 · Published 2025-02-27

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's Btrfs file system could allow a local user to cause a system crash or potentially execute unauthorized code. The issue occurs when the system attempts to manage file system transactions that have been cancelled, leading to a memory error. This could impact the stability of servers or workstations using Btrfs and potentially lead to data corruption or unauthorized access.

Technical details

A use-after-free (UAF) vulnerability exists in the Btrfs implementation within the Linux kernel, specifically in the join_transaction function in fs/btrfs/transaction.c. The root cause is a race condition where the 'aborted' field of a transaction object is read after the fs_info->trans_lock has been released and without holding a proper reference count. A concurrent task aborting the transaction can free the memory before the read occurs. An attacker with local access could exploit this to trigger a kernel panic or achieve arbitrary code execution. The fix involves moving the 'aborted' field check inside the protection of the trans_lock.

Affected products

  • Linux Linux Kernel 6.14-rc1 and earlier

Timeline

  • 2025-01-20: patched: Initial patch authored by Filipe Manana
  • 2025-02-27: disclosed: CVE-2025-21753 published

References

Related threats