[Android 5.10] KASAN: use-after-free Read in worker_thread (2)

0 views
Skip to first unread message

syzbot

unread,
Nov 6, 2026, 8:13:46 AM (3 days ago) Nov 6
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f61a392235e0 Merge 5.10.272 into android13-5.10-lts
git tree: android13-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=12418e55580000
kernel config: https://syzkaller.appspot.com/x/.config?x=40fa24cc6888ca30
dashboard link: https://syzkaller.appspot.com/bug?extid=f11752b2c94491a79069
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16418e55580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11418e55580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1067764b73c1/disk-f61a3922.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/eda1b07ee362/vmlinux-f61a3922.xz
kernel image: https://storage.googleapis.com/syzbot-assets/109d1701bea2/bzImage-f61a3922.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f11752...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in worker_thread+0xa63/0x13c0 kernel/workqueue.c:2445
Read of size 8 at addr ffff8881202839e0 by task kworker/1:1/25

CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Workqueue: 0x0 (kdmflush)
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:77
dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:435 [inline]
kasan_report+0x100/0x140 mm/kasan/report.c:452
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
worker_thread+0xa63/0x13c0 kernel/workqueue.c:2445
kthread+0x324/0x3b0 kernel/kthread.c:313
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

Allocated by task 298:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:430 [inline]
__kasan_slab_alloc+0xb7/0xe0 mm/kasan/common.c:463
kasan_slab_alloc include/linux/kasan.h:244 [inline]
slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580
slab_alloc_node mm/slub.c:2952 [inline]
slab_alloc mm/slub.c:2960 [inline]
kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965
mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513
mempool_alloc+0x128/0x490 mm/mempool.c:393
bio_alloc_bioset+0x196/0x570 block/bio.c:486
alloc_io drivers/md/dm.c:590 [inline]
init_clone_info drivers/md/dm.c:1578 [inline]
__split_and_process_bio drivers/md/dm.c:1595 [inline]
dm_submit_bio+0x200/0x1160 drivers/md/dm.c:1680
__submit_bio block/blk-core.c:927 [inline]
__submit_bio_noacct block/blk-core.c:975 [inline]
submit_bio_noacct+0x466/0xe50 block/blk-core.c:1054
submit_bio+0x342/0x710 block/blk-core.c:1123
submit_bh_wbc+0x5f8/0x6e0 fs/buffer.c:3085
submit_bh fs/buffer.c:3091 [inline]
ll_rw_block+0x1ed/0x250 fs/buffer.c:-1
__block_write_begin_int+0x76d/0x15a0 fs/buffer.c:2072
__block_write_begin fs/buffer.c:2092 [inline]
block_write_begin+0x54/0xd0 fs/buffer.c:2151
blkdev_write_begin+0x3c/0x50 fs/block_dev.c:660
generic_perform_write+0x2ce/0x540 mm/filemap.c:3509
__generic_file_write_iter+0x24b/0x480 mm/filemap.c:3638
blkdev_write_iter+0x2f2/0x3f0 fs/block_dev.c:1929
call_write_iter include/linux/fs.h:2072 [inline]
new_sync_write fs/read_write.c:518 [inline]
vfs_write+0x770/0xd70 fs/read_write.c:605
ksys_pwrite64 fs/read_write.c:712 [inline]
__do_sys_pwrite64 fs/read_write.c:722 [inline]
__se_sys_pwrite64 fs/read_write.c:719 [inline]
__x64_sys_pwrite64+0x194/0x220 fs/read_write.c:719
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 298:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
kasan_slab_free include/linux/kasan.h:220 [inline]
slab_free_hook mm/slub.c:1600 [inline]
slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626
slab_free mm/slub.c:3208 [inline]
kmem_cache_free+0x100/0x2d0 mm/slub.c:3224
mempool_free_slab+0x1d/0x30 mm/mempool.c:520
mempool_free+0xd5/0x330 mm/mempool.c:502
bio_free+0x25c/0x360 block/bio.c:266
bio_put+0xbf/0x110 block/bio.c:-1
free_io drivers/md/dm.c:613 [inline]
dm_io_dec_pending+0x353/0x990 drivers/md/dm.c:892
__split_and_process_bio drivers/md/dm.c:1643 [inline]
dm_submit_bio+0x8db/0x1160 drivers/md/dm.c:1680
__submit_bio block/blk-core.c:927 [inline]
__submit_bio_noacct block/blk-core.c:975 [inline]
submit_bio_noacct+0x466/0xe50 block/blk-core.c:1054
submit_bio+0x342/0x710 block/blk-core.c:1123
submit_bh_wbc+0x5f8/0x6e0 fs/buffer.c:3085
submit_bh fs/buffer.c:3091 [inline]
ll_rw_block+0x1ed/0x250 fs/buffer.c:-1
__block_write_begin_int+0x76d/0x15a0 fs/buffer.c:2072
__block_write_begin fs/buffer.c:2092 [inline]
block_write_begin+0x54/0xd0 fs/buffer.c:2151
blkdev_write_begin+0x3c/0x50 fs/block_dev.c:660
generic_perform_write+0x2ce/0x540 mm/filemap.c:3509
__generic_file_write_iter+0x24b/0x480 mm/filemap.c:3638
blkdev_write_iter+0x2f2/0x3f0 fs/block_dev.c:1929
call_write_iter include/linux/fs.h:2072 [inline]
new_sync_write fs/read_write.c:518 [inline]
vfs_write+0x770/0xd70 fs/read_write.c:605
ksys_pwrite64 fs/read_write.c:712 [inline]
__do_sys_pwrite64 fs/read_write.c:722 [inline]
__se_sys_pwrite64 fs/read_write.c:719 [inline]
__x64_sys_pwrite64+0x194/0x220 fs/read_write.c:719
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb

Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
__kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
insert_work+0x51/0x320 kernel/workqueue.c:1352
__queue_work+0x91f/0xca0 kernel/workqueue.c:1518
queue_work_on+0xe6/0x140 kernel/workqueue.c:1545
queue_work include/linux/workqueue.h:515 [inline]
kcryptd_queue_read drivers/md/dm-crypt.c:1882 [inline]
crypt_map+0x5ea/0xc90 drivers/md/dm-crypt.c:3403
__map_bio+0x133/0x7a0 drivers/md/dm.c:1279
__clone_and_map_data_bio drivers/md/dm.c:1473 [inline]
__split_and_process_non_flush+0x71f/0x9a0 drivers/md/dm.c:1564
__split_and_process_bio drivers/md/dm.c:1608 [inline]
dm_submit_bio+0x7f4/0x1160 drivers/md/dm.c:1680
__submit_bio block/blk-core.c:927 [inline]
__submit_bio_noacct block/blk-core.c:975 [inline]
submit_bio_noacct+0x466/0xe50 block/blk-core.c:1054
submit_bio+0x342/0x710 block/blk-core.c:1123
submit_bh_wbc+0x5f8/0x6e0 fs/buffer.c:3085
submit_bh fs/buffer.c:3091 [inline]
ll_rw_block+0x1ed/0x250 fs/buffer.c:-1
__block_write_begin_int+0x76d/0x15a0 fs/buffer.c:2072
__block_write_begin fs/buffer.c:2092 [inline]
block_write_begin+0x54/0xd0 fs/buffer.c:2151
blkdev_write_begin+0x3c/0x50 fs/block_dev.c:660
generic_perform_write+0x2ce/0x540 mm/filemap.c:3509
__generic_file_write_iter+0x24b/0x480 mm/filemap.c:3638
blkdev_write_iter+0x2f2/0x3f0 fs/block_dev.c:1929
call_write_iter include/linux/fs.h:2072 [inline]
new_sync_write fs/read_write.c:518 [inline]
vfs_write+0x770/0xd70 fs/read_write.c:605
ksys_pwrite64 fs/read_write.c:712 [inline]
__do_sys_pwrite64 fs/read_write.c:722 [inline]
__se_sys_pwrite64 fs/read_write.c:719 [inline]
__x64_sys_pwrite64+0x194/0x220 fs/read_write.c:719
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb

The buggy address belongs to the object at ffff8881202839c0
which belongs to the cache bio-3 of size 1176
The buggy address is located 32 bytes inside of
1176-byte region [ffff8881202839c0, ffff888120283e58)
The buggy address belongs to the page:
page:ffffea000480a000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x120280
head:ffffea000480a000 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff88810b6c7c80
raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 298, ts 24816687824, free_ts 0
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2456 [inline]
prep_new_page+0x176/0x190 mm/page_alloc.c:2462
get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254
__alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1813 [inline]
new_slab+0x84/0x3f0 mm/slub.c:1874
new_slab_objects mm/slub.c:2632 [inline]
___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796
__slab_alloc+0x63/0xa0 mm/slub.c:2836
slab_alloc_node mm/slub.c:2918 [inline]
slab_alloc mm/slub.c:2960 [inline]
kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965
mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513
mempool_init_node+0x1e3/0x4a0 mm/mempool.c:202
mempool_init+0x3c/0x50 mm/mempool.c:231
mempool_init_slab_pool include/linux/mempool.h:62 [inline]
bioset_init+0x418/0x5f0 block/bio.c:1602
bioset_init_from_src+0xb3/0x120 block/bio.c:1637
__bind_mempools drivers/md/dm.c:1964 [inline]
__bind drivers/md/dm.c:2038 [inline]
dm_swap_table+0x442/0x600 drivers/md/dm.c:2421
do_resume drivers/md/dm-ioctl.c:1088 [inline]
dev_suspend+0x13e/0x5d0 drivers/md/dm-ioctl.c:1131
ctl_ioctl drivers/md/dm-ioctl.c:1925 [inline]
dm_ctl_ioctl+0x8ee/0xca0 drivers/md/dm-ioctl.c:1947
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:739
page_owner free stack trace missing

Memory state around the buggy address:
ffff888120283880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888120283900: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888120283980: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
^
ffff888120283a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888120283a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 0 P4D 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 25 Comm: kworker/1:1 Tainted: G B syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Workqueue: kcryptd_io/253:0 kcryptd_io_read_work
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc900001afa78 EFLAGS: 00010282
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffffffff81886bdf
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000092800
RBP: ffffc900001afbd8 R08: ffffc900001afb47 R09: ffffc900001afb20
R10: dffffc0000000000 R11: fffff52000035f69 R12: 0000000000092800
R13: 1ffff11020d735a6 R14: 0000000000000000 R15: ffff888106b9ad30
FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001067e6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
mempool_alloc+0x128/0x490 mm/mempool.c:393
bio_alloc_bioset+0x196/0x570 block/bio.c:486
bio_clone_fast+0x28/0x240 block/bio.c:711
kcryptd_io_read+0x78/0x4e0 drivers/md/dm-crypt.c:1848
kcryptd_io_read_work+0x3b/0xa0 drivers/md/dm-crypt.c:1872
process_one_work+0x6fd/0xbc0 kernel/workqueue.c:2301
worker_thread+0xa8e/0x13c0 kernel/workqueue.c:2447
kthread+0x324/0x3b0 kernel/kthread.c:313
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
Modules linked in:
CR2: 0000000000000000
---[ end trace 40eb09e41e3bff85 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc900001afa78 EFLAGS: 00010282
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffffffff81886bdf
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000092800
RBP: ffffc900001afbd8 R08: ffffc900001afb47 R09: ffffc900001afb20
R10: dffffc0000000000 R11: fffff52000035f69 R12: 0000000000092800
R13: 1ffff11020d735a6 R14: 0000000000000000 R15: ffff888106b9ad30
FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001067e6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages