UBUNTU-CVE-2025-21631: Use After Free
In the Linux kernel, the following vulnerability has been resolved: block, bfq: fix wakerbfqq UAF after bfqsplitbfqq() Our syzkaller report a following UAF for v6.6: BUG: KASAN: slab-use-after-free in bfqinitrq+0x175d/0x17a0 block/bfq-iosched.c:6958 Read of size 8 at addr ffff8881b57147d8 by task fsstress/232726 CPU: 2 PID: 232726 Comm: fsstress Not tainted 6.6.0-g3629d1885222 #39 Call Trace: <TASK> dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0x91/0xf0 lib/dumpstack.c:106 printaddressdescription.constprop.0+0x66/0x300 mm/kasan/report.c:364 printreport+0x3e/0x70 mm/kasan/report.c:475 kasanreport+0xb8/0xf0 mm/kasan/report.c:588 hlistaddhead include/linux/list.h:1023 [inline] bfqinitrq+0x175d/0x17a0 block/bfq-iosched.c:6958 bfqinsertrequest.isra.0+0xe8/0xa20 block/bfq-iosched.c:6271 bfqinsertrequests+0x27f/0x390 block/bfq-iosched.c:6323 blkmqinsertrequest+0x290/0x8f0 block/blk-mq.c:2660 blkmqsubmitbio+0x1021/0x15e0 block/blk-mq.c:3143 submitbio+0xa0/0x6b0 block/blk-core.c:639 submitbionoacctmq block/blk-core.c:718 [inline] submitbionoacctnocheck+0x5b7/0x810 block/blk-core.c:747 submitbionoacct+0xca0/0x1990 block/blk-core.c:847 ext4readbh fs/ext4/super.c:205 [inline] ext4readbh+0x15e/0x2e0 fs/ext4/super.c:230 readextenttreeblock+0x304/0x6f0 fs/ext4/extents.c:567 ext4findextent+0x479/0xd20 fs/ext4/extents.c:947 ext4extmapblocks+0x1a3/0x2680 fs/ext4/extents.c:4182 ext4mapblocks+0x929/0x15a0 fs/ext4/inode.c:660 ext4iomapbeginreport+0x298/0x480 fs/ext4/inode.c:3569 iomapiter+0x3dd/0x1010 fs/iomap/iter.c:91 iomapfiemap+0x1f4/0x360 fs/iomap/fiemap.c:80 ext4fiemap+0x181/0x210 fs/ext4/extents.c:5051 ioctlfiemap.isra.0+0x1b4/0x290 fs/ioctl.c:220 dovfsioctl+0x31c/0x11a0 fs/ioctl.c:811 dosysioctl fs/ioctl.c:869 [inline] sesysioctl+0xae/0x190 fs/ioctl.c:857 dosyscallx64 arch/x86/entry/common.c:51 [inline] dosyscall64+0x70/0x120 arch/x86/entry/common.c:81 entrySYSCALL64afterhwframe+0x78/0xe2 Allocated by task 232719: kasansavestack+0x22/0x50 mm/kasan/common.c:45 kasansettrack+0x25/0x30 mm/kasan/common.c:52 kasanslaballoc+0x87/0x90 mm/kasan/common.c:328 kasanslaballoc include/linux/kasan.h:188 [inline] slabpostallochook mm/slab.h:768 [inline] slaballocnode mm/slub.c:3492 [inline] kmemcacheallocnode+0x1b8/0x6f0 mm/slub.c:3537 bfqgetqueue+0x215/0x1f00 block/bfq-iosched.c:5869 bfqgetbfqqhandlesplit+0x167/0x5f0 block/bfq-iosched.c:6776 bfqinitrq+0x13a4/0x17a0 block/bfq-iosched.c:6938 bfqinsertrequest.isra.0+0xe8/0xa20 block/bfq-iosched.c:6271 bfqinsertrequests+0x27f/0x390 block/bfq-iosched.c:6323 blkmqinsertrequest+0x290/0x8f0 block/blk-mq.c:2660 blkmqsubmitbio+0x1021/0x15e0 block/blk-mq.c:3143 submitbio+0xa0/0x6b0 block/blk-core.c:639 submitbionoacctmq block/blk-core.c:718 [inline] submitbionoacctnocheck+0x5b7/0x810 block/blk-core.c:747 submitbionoacct+0xca0/0x1990 block/blk-core.c:847 ext4readbh fs/ext4/super.c:205 [inline] ext4readbhnowait+0x15a/0x240 fs/ext4/super.c:217 ext4readbhlock+0xac/0xd0 fs/ext4/super.c:242 ext4breadbatch+0x268/0x500 fs/ext4/inode.c:958 ext4findentry+0x448/0x10f0 fs/ext4/namei.c:1671 ext4lookupentry fs/ext4/namei.c:1774 [inline] ext4lookup.part.0+0x359/0x6f0 fs/ext4/namei.c:1842 ext4lookup+0x72/0x90 fs/ext4/namei.c:1839 lookupslow+0x257/0x480 fs/namei.c:1696 lookupslow fs/namei.c:1713 [inline] walkcomponent+0x454/0x5c0 fs/namei.c:2004 linkpathwalk.part.0+0x773/0xda0 fs/namei.c:2331 linkpathwalk fs/namei.c:3826 [inline] pathopenat+0x1b9/0x520 fs/namei.c:3826 dofilpopen+0x1b7/0x400 fs/namei.c:3857 dosysopenat2+0x5dc/0x6e0 fs/open.c:1428 dosysopen fs/open.c:1443 [inline] dosysopenat fs/open.c:1459 [inline] sesysopenat fs/open.c:1454 [inline] x64sysopenat+0x148/0x200 fs/open.c:1454 dosyscallx64 arch/x86/entry/common.c:51 [inline] dosyscall6 ---truncated---
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1080.87~20.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1086.95~20.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1081.90~20.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-136.147~20.04.1 - Upgrade
Upgrade
ubuntu/linux-ibm-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1074.77~20.04.1 - Upgrade
Upgrade
ubuntu/linux-intel-iotg-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1077.83~20.04.1 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-135.146~20.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1077.83~20.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1075.79~20.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegra-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1039.39~20.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 5.15.0-135.146 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 5.15.0-1080.87 - Upgrade
Upgrade
ubuntu/linux-aws-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1029.31~22.04.1 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 5.15.0-1084.93 - Upgrade
Upgrade
ubuntu/linux-azure-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1029.34~22.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 5.15.0-1084.93.1 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 5.15.0-1079.88 - Upgrade
Upgrade
ubuntu/linux-gcp-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1030.32~22.04.1 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 5.15.0-1077.83 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 5.15.0-1062.70 - Upgrade
Upgrade
ubuntu/linux-hwe-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-60.63~22.04.1 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 5.15.0-1072.75 - Upgrade
Upgrade
ubuntu/linux-ibm-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1026.26~22.04.1 - Upgrade
Upgrade
ubuntu/linux-intel-iot-realtimeto a version that resolves this vulnerability.Fixed in 5.15.0-1073.75 - Upgrade
Upgrade
ubuntu/linux-intel-iotgto a version that resolves this vulnerability.Fixed in 5.15.0-1075.81 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 5.15.0-1076.81 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 5.15.0-135.146 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-60.63.1~22.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 5.15.0-1074.75 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1028.31~22.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegrato a version that resolves this vulnerability.Fixed in 5.15.0-1033.33 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegra-igxto a version that resolves this vulnerability.Fixed in 5.15.0-1021.21 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 5.15.0-1077.83 - Upgrade
Upgrade
ubuntu/linux-oracle-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1026.27~22.04.1 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 5.15.0-1074.77 - Upgrade
Upgrade
ubuntu/linux-riscv-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-62.65~22.04.1 - Upgrade
Upgrade
ubuntu/linux-xilinx-zynqmpto a version that resolves this vulnerability.Fixed in 5.15.0-1044.48 - Upgrade
Upgrade
ubuntu/linux-bluefieldto a version that resolves this vulnerability.Fixed in 5.15.0-1062.64 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 5.15.0-1080.88 - Upgrade
Upgrade
ubuntu/linux-realtime-6.8to a version that resolves this vulnerability.Fixed in 6.8.1-1022.23~22.04.1 - Upgrade
Upgrade
ubuntu/linux-aws-fipsto a version that resolves this vulnerability.Fixed in 5.15.0-1080.87+fips1 - Upgrade
Upgrade
ubuntu/linux-azure-fipsto a version that resolves this vulnerability.Fixed in 5.15.0-1083.92+fips1 - Upgrade
Upgrade
ubuntu/linux-fipsto a version that resolves this vulnerability.Fixed in 5.15.0-135.146+fips1 - Upgrade
Upgrade
ubuntu/linux-gcp-fipsto a version that resolves this vulnerability.Fixed in 5.15.0-1079.88+fips1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.8.0-60.63 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.8.0-1029.31 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 6.8.0-1029.34 - Upgrade
Upgrade
ubuntu/linux-azure-nvidiato a version that resolves this vulnerability.Fixed in 6.8.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.8.0-1030.32 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 6.8.0-1025.29 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 6.8.0-1012.14 - Upgrade
Upgrade
ubuntu/linux-hwe-6.11to a version that resolves this vulnerability.Fixed in 6.11.0-21.21~24.04.1 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 6.8.0-1026.26 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 6.8.0-60.63.1 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 6.8.0-1028.31 - Upgrade
Upgrade
ubuntu/linux-nvidia-lowlatencyto a version that resolves this vulnerability.Fixed in 6.8.0-1028.31.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegrato a version that resolves this vulnerability.Fixed in 6.8.0-1008.8 - Upgrade
Upgrade
ubuntu/linux-oem-6.11to a version that resolves this vulnerability.Fixed in 6.11.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1028.28 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 6.8.0-1026.27 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 6.8.0-1028.32 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 6.8.0-60.63.1 - Upgrade
Upgrade
ubuntu/linux-raspi-realtimeto a version that resolves this vulnerability.Fixed in 6.8.0-2023.24 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 6.8.1-1022.23
Event History
Frequently Asked Questions
Which Ubuntu kernel packages are identified as affected?
The affected Ubuntu kernel package families listed are linux-azure, linux-gcp, linux-gke, linux-gkeop, linux-riscv, linux-realtime, linux-hwe-edge, and linux-azure-fde.
What access does an attacker need to exploit this issue?
The supplied severity vector indicates local access, low privileges, no user interaction, high attack complexity, and additional attack requirements. The impact is rated high for confidentiality, integrity, and availability within the vulnerable system.
What component is involved in the use-after-free?
The flaw is in the Linux kernel block layer's BFQ I/O scheduler. The reported use-after-free involves waker_bfqq after bfq_split_bfqq(), with the fault observed during request initialization in bfq_init_rq().