KASAN: slab-use-after-free Read in android_work

Status: premoderation: reported on 2026/07/31 00:15
Reported-by: syzbot+56952e68c2c1a380bfa3@syzkaller.appspotmail.com
First crash: 7d14h, last: 7d14h
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 KASAN: use-after-free Read in android_work 19 1 8d04h 8d04h 0/2 premoderation: reported on 2026/07/30 10:01

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in kobject_uevent_env+0xc7/0x7e0 lib/kobject_uevent.c:498
Read of size 8 at addr ffff88811b4e5020 by task kworker/1:5/391

CPU: 1 UID: 0 PID: 391 Comm: kworker/1:5 Not tainted syzkaller #0 0b31bef96cff8e44f9e14c4f768eb06c85e3b290
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: events android_work
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
 print_address_description+0x71/0x210 mm/kasan/report.c:377
 print_report+0x4a/0x70 mm/kasan/report.c:481
 kasan_report+0x162/0x1a0 mm/kasan/report.c:594
 __asan_report_load8_noabort+0x18/0x20 mm/kasan/report_generic.c:381
 kobject_uevent_env+0xc7/0x7e0 lib/kobject_uevent.c:498
 android_work+0x2dc/0x470 drivers/usb/gadget/android_configfs_uevent.c:102
 process_one_work kernel/workqueue.c:3273 [inline]
 process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354
 worker_thread+0xc99/0x13f0 kernel/workqueue.c:3435
 kthread+0x2c7/0x360 kernel/kthread.c:389
 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Allocated by task 4015:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_alloc_info+0x3a/0x50 mm/kasan/generic.c:565
 poison_kmalloc_redzone mm/kasan/common.c:379 [inline]
 __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396
 kasan_kmalloc include/linux/kasan.h:261 [inline]
 __do_kmalloc_node mm/slub.c:4395 [inline]
 __kmalloc_node_noprof+0x252/0x500 mm/slub.c:4401
 __kvmalloc_node_noprof+0x128/0x300 mm/util.c:672
 iterate_tty_write drivers/tty/tty_io.c:997 [inline]
 file_tty_write+0x2c5/0xa50 drivers/tty/tty_io.c:1090
 tty_write+0x40/0x50 drivers/tty/tty_io.c:1111
 do_iter_readv_writev+0x62c/0x820 fs/read_write.c:-1
 vfs_writev+0x4a5/0xe90 fs/read_write.c:1076
 do_writev+0x151/0x2e0 fs/read_write.c:1123
 __do_sys_writev fs/read_write.c:1196 [inline]
 __se_sys_writev fs/read_write.c:1193 [inline]
 __x64_sys_writev+0x81/0x90 fs/read_write.c:1193
 x64_sys_call+0x1fbb/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:21
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

Freed by task 31:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_free_info+0x44/0x50 mm/kasan/generic.c:579
 poison_slab_object mm/kasan/common.c:249 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:266
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2445 [inline]
 slab_free mm/slub.c:4714 [inline]
 kfree+0x158/0x440 mm/slub.c:4875
 kvfree+0x39/0x50 mm/util.c:716
 free_tty_struct drivers/tty/tty_io.c:173 [inline]
 release_one_tty+0x291/0x2c0 drivers/tty/tty_io.c:1542
 process_one_work kernel/workqueue.c:3273 [inline]
 process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354
 worker_thread+0xc99/0x13f0 kernel/workqueue.c:3435
 kthread+0x2c7/0x360 kernel/kthread.c:389
 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

The buggy address belongs to the object at ffff88811b4e5000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 32 bytes inside of
 freed 1024-byte region [ffff88811b4e5000, ffff88811b4e5400)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b4e0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x4000000000000040(head|zone=1)
page_type: f5(slab)
raw: 4000000000000040 ffff888100041dc0 ffffea0004cbc400 dead000000000002
raw: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000
head: 4000000000000040 ffff888100041dc0 ffffea0004cbc400 dead000000000002
head: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000
head: 4000000000000003 ffffea00046d3801 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 99, tgid 99 (klogd), ts 38692684943, free_ts 38650328928
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook+0x37d/0x3b0 mm/page_alloc.c:1863
 prep_new_page+0x2d/0x180 mm/page_alloc.c:1871
 get_page_from_freelist+0x4aea/0x4ba0 mm/page_alloc.c:3948
 __alloc_pages_noprof+0x35a/0x7e0 mm/page_alloc.c:5315
 alloc_slab_page+0x6b/0x1e0 mm/slub.c:-1
 allocate_slab+0x69/0x430 mm/slub.c:2687
 new_slab mm/slub.c:2741 [inline]
 ___slab_alloc+0x591/0x8c0 mm/slub.c:3934
 __slab_alloc mm/slub.c:4025 [inline]
 __slab_alloc_node mm/slub.c:4078 [inline]
 slab_alloc_node mm/slub.c:4239 [inline]
 __do_kmalloc_node mm/slub.c:4394 [inline]
 __kmalloc_node_track_caller_noprof+0x2e3/0x4f0 mm/slub.c:4414
 kmalloc_reserve+0x144/0x4f0 net/core/skbuff.c:618
 __alloc_skb+0x13f/0x360 net/core/skbuff.c:687
 alloc_skb include/linux/skbuff.h:1363 [inline]
 alloc_skb_with_frags+0xd0/0x8b0 net/core/skbuff.c:6617
 sock_alloc_send_pskb+0x883/0x9a0 net/core/sock.c:2923
 unix_dgram_sendmsg+0x63a/0x1a90 net/unix/af_unix.c:2040
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 __sys_sendto+0x68d/0x700 net/socket.c:2216
 __do_sys_sendto net/socket.c:2228 [inline]
 __se_sys_sendto net/socket.c:2224 [inline]
 __x64_sys_sendto+0xe9/0x100 net/socket.c:2224
 x64_sys_call+0x2c2c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:45
page last free pid 405 tgid 405 stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1390 [inline]
 free_unref_page+0xbb8/0xf70 mm/page_alloc.c:2876
 __free_pages+0x6b/0x3b0 mm/page_alloc.c:5402
 __free_slab+0xb2/0x110 mm/slub.c:2758
 free_slab+0x18/0xe0 mm/slub.c:2781
 discard_slab mm/slub.c:2787 [inline]
 __put_partials+0x115/0x150 mm/slub.c:3256
 put_cpu_partial+0x91/0xc0 mm/slub.c:3331
 __slab_free+0x1cf/0x2a0 mm/slub.c:4584
 do_slab_free mm/slub.c:4666 [inline]
 ___cache_free+0xc9/0xe0 mm/slub.c:4781
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0xb5/0x130 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x14f/0x180 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x28/0x90 mm/kasan/common.c:331
 kasan_slab_alloc include/linux/kasan.h:251 [inline]
 slab_post_alloc_hook mm/slub.c:4202 [inline]
 slab_alloc_node mm/slub.c:4251 [inline]
 __kmalloc_cache_noprof+0x1d9/0x470 mm/slub.c:4421
 kmalloc_noprof include/linux/slab.h:881 [inline]
 usb_control_msg+0x83/0x490 drivers/usb/core/message.c:157
 hub_set_address drivers/usb/core/hub.c:4777 [inline]
 hub_port_init+0xf71/0x2810 drivers/usb/core/hub.c:5082
 hub_port_connect drivers/usb/core/hub.c:5503 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5714 [inline]
 port_event drivers/usb/core/hub.c:5878 [inline]
 hub_event+0x2408/0x4360 drivers/usb/core/hub.c:5960
 process_one_work kernel/workqueue.c:3273 [inline]
 process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354

Memory state around the buggy address:
 ffff88811b4e4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88811b4e4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811b4e5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                               ^
 ffff88811b4e5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88811b4e5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
 : Failed to send disconnected uevent

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/31 00:14 android16-6.12 f1c9c21d1c2f aaffb173 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in android_work
* Struck through repros no longer work on HEAD.