CVE
CVE-2025-21753
CNA 原文 · 原文(英文)
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix use-after-free when attempting to join an aborted transaction When we are trying to join the current transaction and if it's aborted, we read its 'aborted' field after unlocking fs_info->trans_lock and without holding any extra reference count on it. This means that a concurrent task that is aborting the transaction may free the transaction before we read its 'aborted' field, leading to a use-after-free. Fix this by reading the 'aborted' field while holding fs_info->trans_lock since any freeing task must first acquire that lock and set fs_info->running_transaction to NULL before freeing the transaction. This was reported by syzbot and Dmitry with the following stack traces from KASAN: ================================================================== BUG: KASAN: slab-use-after-free in join_transaction+0xd9b/0xda0 fs/btrfs/transaction.c:278 Read of size 4 at addr ffff888011839024 by task kworker/u4:9/1128 CPU: 0 UID: 0 PID: 1128 Comm: kworker/u4:9 Not tainted 6.13.0-rc7-syzkaller-00019-gc45323b7560e #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events_unbound btrfs_async_reclaim_data_space Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 join_transaction+0xd9b/0xda0 fs/btrfs/transaction.c:278 start_transaction+0xaf8/0x1670 fs/btrfs/transaction.c:697 flush_space+0x448/0xcf0 fs/btrfs/space-info.c:803 btrfs_async_reclaim_data_space+0x159/0x510 fs/btrfs/space-info.c:1321 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398…
受影响版本
- 6.14-rc1仅此版本
- ≥ 6.13, < 6.13.3修复版本 6.13.3
- ≥ 6.7, < 6.12.14修复版本 6.12.14
- ≥ 6.2, < 6.6.78修复版本 6.6.78
- ≥ 5.16, < 6.1.129修复版本 6.1.129
- ≥ 5.11, < 5.15.179修复版本 5.15.179
- ≥ 5.5, < 5.10.235修复版本 5.10.235
- ≥ 3.4, < 5.4.291修复版本 5.4.291
发行版软件包(Debian、Ubuntu、Red Hat 等)会回移补丁而不改上游版本号,请同时查看所用发行版的安全公告。
公告与补丁
- git.kernel.org/stable/c/6ba4663ada6c6315af23a6669d386146634808ec · Patch
- git.kernel.org/stable/c/7e954b6bb95d67ae4d1a20e9cfd83c182cf929bc · Patch
- git.kernel.org/stable/c/86d71a026a7f63da905db9add845c8ee88801eca · Patch
- git.kernel.org/stable/c/8f5cff471039caa2b088060c074c2bf2081bcb01 · Patch
- git.kernel.org/stable/c/c7a53757717e68af94a56929d57f1e6daff220ec · Patch
- git.kernel.org/stable/c/ce628048390dad80320d5a1f74de6ca1e1be91e7 · Patch
- git.kernel.org/stable/c/cee55b1219568c80bf0d5dc55066e4a859baf753 · Patch
- git.kernel.org/stable/c/e2f0943cf37305dbdeaf9846e3c941451bcdef63 · Patch
数据来源:NVD(公有领域)、CISA KEV(CC0)、FIRST EPSS、OSV.dev / GitHub Advisory Database(CC-BY 4.0) · 本库只列受影响版本与修复版本,不托管、不链接任何利用代码。