syzbot


KASAN: slab-use-after-free Read in update_io_ticks (4)

Status: moderation: reported on 2026/03/07 12:26
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+9eefac3fe5d5022c349e@syzkaller.appspotmail.com
First crash: 9d15h, last: 9d15h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
14841dfa-63b9-4713-bd29-041dd248e471 moderation 💥 KASAN: slab-use-after-free Read in update_io_ticks (4) 2026/03/10 15:23 2026/03/10 15:23 2026/03/10 15:23 d16aa12f36812fd3c4bc5f61111b6678f99f6b6e+ unexpected git log output: "warning: unable to access '/root/.config/git/attributes': Permission denied\nwarning: unable to access '/root/.config/git/attributes': Permission denied\naf4e9ef3d78420feb8fe58cd9a1ab80c501b3c08\nuaccess: Fix scoped_user_read_access() for 'pointer to const'\ndavid.laight.linux@gmail.com\nDavid Laight\nMon Mar 2 13:27:51 2026 +0000\n1b37ac211a22d4c65aad1ae2da07f078197e7394\nMon Mar 2 09:24:32 2026 -0800\nIf a 'const struct foo __user *ptr' is used for the address passed to\nscoped_user_read_access() then you get a warning/error\n\n uaccess.h:691:1: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]\n\nfor the\n\n void __user *_tmpptr = __scoped_user_access_begin(mode, uptr, size, elbl)\n\nassignment.\n\nFix by using 'auto' for both _tmpptr and the redeclaration of uptr.\nReplace the CLASS() with explicit __cleanup() functions on uptr.\n\nFixes: e497310b4ffb (\"uaccess: Provide scoped user access regions\")\nSigned-off-by: David Laight <david.laight.linux@gmail.com>\nReviewed-and-tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n"
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in update_io_ticks (2) block 19 2 457d 456d 0/29 auto-obsoleted due to no activity on 2025/03/20 05:19
upstream KASAN: slab-use-after-free Read in update_io_ticks block 19 1 561d 557d 0/29 auto-obsoleted due to no activity on 2024/11/27 03:17
upstream KASAN: slab-use-after-free Read in update_io_ticks (3) block 19 1 215d 211d 0/29 auto-obsoleted due to no activity on 2025/11/17 16:37

Sample crash report:
I/O error, dev loop0, sector 50 op 0x0:(READ) flags 0x800000 phys_seg 1 prio class 2
==================================================================
BUG: KASAN: slab-use-after-free in update_io_ticks+0xa9/0x280 block/blk-core.c:1028
Read of size 8 at addr ffff888031f11728 by task kworker/u4:7/1040

CPU: 0 UID: 0 PID: 1040 Comm: kworker/u4:7 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: loop0 loop_workfn
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xba/0x230 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 update_io_ticks+0xa9/0x280 block/blk-core.c:1028
 blk_account_io_done+0x18b/0x7b0 block/blk-mq.c:1082
 __blk_mq_end_request_acct block/blk-mq.c:1156 [inline]
 __blk_mq_end_request+0x2ae/0x630 block/blk-mq.c:1162
 lo_rw_aio_complete drivers/block/loop.c:337 [inline]
 lo_rw_aio+0xcde/0xf00 drivers/block/loop.c:409
 do_req_filebacked drivers/block/loop.c:435 [inline]
 loop_handle_cmd drivers/block/loop.c:1925 [inline]
 loop_process_work+0x958/0x11a0 drivers/block/loop.c:1960
 process_one_work kernel/workqueue.c:3275 [inline]
 process_scheduled_works+0xb02/0x1830 kernel/workqueue.c:3358
 worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439
 kthread+0x388/0x470 kernel/kthread.c:467
 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 4711:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 unpoison_slab_object mm/kasan/common.c:340 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4515 [inline]
 slab_alloc_node mm/slub.c:4844 [inline]
 kmem_cache_alloc_lru_noprof+0x2b8/0x640 mm/slub.c:4863
 bdev_alloc_inode+0x29/0x90 block/bdev.c:380
 alloc_inode+0x6a/0x1b0 fs/inode.c:347
 new_inode+0x22/0x170 fs/inode.c:1185
 bdev_alloc+0x26/0x380 block/bdev.c:477
 add_partition+0x1c3/0x8e0 block/partitions/core.c:327
 blk_add_partition block/partitions/core.c:565 [inline]
 blk_add_partitions block/partitions/core.c:634 [inline]
 bdev_disk_changed+0xbab/0x1550 block/partitions/core.c:694
 blkdev_get_whole+0x380/0x510 block/bdev.c:764
 bdev_open+0x31e/0xd30 block/bdev.c:973
 bdev_file_open_by_dev+0x1be/0x240 block/bdev.c:1075
 disk_scan_partitions+0x1c1/0x2c0 block/genhd.c:387
 blkdev_common_ioctl+0x1ce4/0x3250 block/ioctl.c:719
 blkdev_ioctl+0x528/0x740 block/ioctl.c:798
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 15:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2692 [inline]
 slab_free mm/slub.c:6143 [inline]
 kmem_cache_free+0x187/0x630 mm/slub.c:6273
 rcu_do_batch kernel/rcu/tree.c:2617 [inline]
 rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
 handle_softirqs+0x22a/0x870 kernel/softirq.c:622
 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1063
 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
 kthread+0x388/0x470 kernel/kthread.c:467
 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 __call_rcu_common kernel/rcu/tree.c:3131 [inline]
 call_rcu+0xee/0x890 kernel/rcu/tree.c:3251
 destroy_inode fs/inode.c:402 [inline]
 evict+0x95b/0xb10 fs/inode.c:870
 device_release+0x9e/0x1d0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x228/0x560 lib/kobject.c:737
 bdev_disk_changed+0x292/0x1550 block/partitions/core.c:675
 __loop_clr_fd drivers/block/loop.c:1164 [inline]
 lo_release+0x547/0x840 drivers/block/loop.c:1751
 bdev_release+0x536/0x650 block/bdev.c:-1
 blkdev_release+0x15/0x20 block/fops.c:705
 __fput+0x44f/0xa70 fs/file_table.c:469
 fput_close_sync+0x11f/0x240 fs/file_table.c:574
 __do_sys_close fs/open.c:1509 [inline]
 __se_sys_close fs/open.c:1494 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1494
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888031f11700
 which belongs to the cache bdev_cache of size 2776
The buggy address is located 40 bytes inside of
 freed 2776-byte region [ffff888031f11700, ffff888031f121d8)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x31f10
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888044b7b281
flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000040 ffff888030414b40 dead000000000122 0000000000000000
raw: 0000000000000000 00000008000b000b 00000000f5000000 ffff888044b7b281
head: 04fff00000000040 ffff888030414b40 dead000000000122 0000000000000000
head: 0000000000000000 00000008000b000b 00000000f5000000 ffff888044b7b281
head: 04fff00000000003 ffffea0000c7c401 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_RECLAIMABLE|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 15439559208, free_ts 0
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889
 prep_new_page mm/page_alloc.c:1897 [inline]
 get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250
 alloc_slab_page mm/slub.c:3269 [inline]
 allocate_slab+0x77/0x660 mm/slub.c:3458
 new_slab mm/slub.c:3516 [inline]
 refill_objects+0x331/0x3c0 mm/slub.c:7153
 refill_sheaf mm/slub.c:2818 [inline]
 __pcs_replace_empty_main+0x2b9/0x620 mm/slub.c:4592
 alloc_from_pcs mm/slub.c:4695 [inline]
 slab_alloc_node mm/slub.c:4829 [inline]
 kmem_cache_alloc_lru_noprof+0x37c/0x640 mm/slub.c:4863
 bdev_alloc_inode+0x29/0x90 block/bdev.c:380
 alloc_inode+0x6a/0x1b0 fs/inode.c:347
 new_inode+0x22/0x170 fs/inode.c:1185
 bdev_alloc+0x26/0x380 block/bdev.c:477
 __alloc_disk_node+0x11d/0x5b0 block/genhd.c:1465
 __blk_alloc_disk+0x105/0x1d0 block/genhd.c:1519
 pmem_attach_disk+0x4d1/0xe10 drivers/nvdimm/pmem.c:509
 nvdimm_bus_probe+0x331/0x6c0 drivers/nvdimm/bus.c:91
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x267/0xaf0 drivers/base/dd.c:661
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888031f11600: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
 ffff888031f11680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888031f11700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff888031f11780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888031f11800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/03 12:17 upstream af4e9ef3d784 28b83e23 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in update_io_ticks
* Struck through repros no longer work on HEAD.