================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: slab-use-after-free in tty_port_kopened include/linux/tty_port.h:229 [inline] BUG: KASAN: slab-use-after-free in check_tty_count+0x1a5/0x330 drivers/tty/tty_io.c:288 Read of size 8 at addr ffff8881023ff900 by task syz-executor362/320 CPU: 0 UID: 0 PID: 320 Comm: syz-executor362 Not tainted syzkaller #0 1b627ac51616646c2b03e03cc27ccf1d06a70c9d Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __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 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x25a/0x2b0 mm/kasan/generic.c:189 __kasan_check_read+0x15/0x20 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] tty_port_kopened include/linux/tty_port.h:229 [inline] check_tty_count+0x1a5/0x330 drivers/tty/tty_io.c:288 tty_release+0x89/0x11e0 drivers/tty/tty_io.c:1737 __fput+0x20b/0xa30 fs/file_table.c:447 ____fput+0x20/0x30 fs/file_table.c:475 task_work_run+0x1e8/0x260 kernel/task_work.c:246 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0xa46/0x2850 kernel/exit.c:955 do_group_exit+0x21f/0x2f0 kernel/exit.c:1098 __do_sys_exit_group kernel/exit.c:1109 [inline] __se_sys_exit_group kernel/exit.c:1107 [inline] __x64_sys_exit_group+0x43/0x50 kernel/exit.c:1107 x64_sys_call+0x2ed2/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:232 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 RIP: 0033:0x7fabdfdacd45 Code: Unable to access opcode bytes at 0x7fabdfdacd1b. RSP: 002b:00007ffd613b13c8 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fabdfdacd45 RDX: 00000000000000e7 RSI: ffffffffffffffd0 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 00007ffd613b1460 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fabdfe5d120 R14: 00007fabdfe5f548 R15: 00007fabdfe5f560 Allocated by task 323: 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] __kmalloc_cache_noprof+0x23c/0x470 mm/slub.c:4426 kmalloc_noprof include/linux/slab.h:881 [inline] kzalloc_noprof include/linux/slab.h:1017 [inline] gs_port_alloc drivers/usb/gadget/function/u_serial.c:1181 [inline] gserial_alloc_line_no_console+0x245/0x770 drivers/usb/gadget/function/u_serial.c:1261 obex_alloc_inst+0x9b/0x190 drivers/usb/gadget/function/f_obex.c:434 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xfa/0x320 drivers/usb/gadget/functions.c:44 function_make+0x125/0x370 drivers/usb/gadget/configfs.c:631 configfs_mkdir+0x526/0xb70 fs/configfs/dir.c:1339 vfs_mkdir+0x591/0x810 fs/namei.c:4265 do_mkdirat+0x240/0x530 fs/namei.c:4288 __do_sys_mkdirat fs/namei.c:4303 [inline] __se_sys_mkdirat fs/namei.c:4301 [inline] __x64_sys_mkdirat+0x8b/0xa0 fs/namei.c:4301 x64_sys_call+0x2ba8/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:259 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 324: 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 gserial_free_port+0x244/0x2e0 drivers/usb/gadget/function/u_serial.c:1225 gserial_free_line+0x9f/0x1b0 drivers/usb/gadget/function/u_serial.c:1242 obex_free_inst+0x3d/0x60 drivers/usb/gadget/function/f_obex.c:420 usb_put_function_instance+0x9f/0xc0 drivers/usb/gadget/functions.c:77 obex_attr_release+0x19/0x30 drivers/usb/gadget/function/f_obex.c:390 config_item_cleanup fs/configfs/item.c:128 [inline] config_item_release fs/configfs/item.c:137 [inline] kref_put include/linux/kref.h:65 [inline] config_item_put+0x175/0x240 fs/configfs/item.c:149 configfs_rmdir+0x8e8/0x9b0 fs/configfs/dir.c:1550 vfs_rmdir+0x3db/0x560 fs/namei.c:4348 do_rmdir+0x29a/0x590 fs/namei.c:4407 __do_sys_rmdir fs/namei.c:4426 [inline] __se_sys_rmdir fs/namei.c:4424 [inline] __x64_sys_rmdir+0x4b/0x60 fs/namei.c:4424 x64_sys_call+0xaf7/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:85 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 The buggy address belongs to the object at ffff8881023ff800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 256 bytes inside of freed 1024-byte region [ffff8881023ff800, ffff8881023ffc00) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023f8 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 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 head: 4000000000000040 ffff888100041dc0 dead000000000100 dead000000000122 head: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 head: 4000000000000003 ffffea000408fe01 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 13, tgid 13 (kworker/u8:1), ts 2511112504, free_ts 0 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_noprof+0x2e7/0x500 mm/slub.c:4401 kmalloc_node_noprof include/linux/slab.h:908 [inline] blk_alloc_flush_queue+0x11e/0x3e0 block/blk-flush.c:490 blk_mq_alloc_hctx block/blk-mq.c:4093 [inline] blk_mq_alloc_and_init_hctx+0x694/0x1060 block/blk-mq.c:4554 blk_mq_realloc_hw_ctxs+0x19f/0x940 block/blk-mq.c:4587 blk_mq_init_allocated_queue+0x3e1/0x1700 block/blk-mq.c:4641 blk_mq_alloc_queue+0x1c7/0x2f0 block/blk-mq.c:4454 scsi_alloc_sdev+0x75d/0xcc0 drivers/scsi/scsi_scan.c:337 scsi_probe_and_add_lun+0x1e9/0x3e60 drivers/scsi/scsi_scan.c:1207 __scsi_scan_target+0x1f1/0xc20 drivers/scsi/scsi_scan.c:1754 page_owner free stack trace missing Memory state around the buggy address: ffff8881023ff800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881023ff880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881023ff900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881023ff980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881023ffa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ WARNING: CPU: 0 PID: 320 at drivers/usb/gadget/function/u_serial.c:691 gs_close+0x181/0x9c0 drivers/usb/gadget/function/u_serial.c:691 Modules linked in: CPU: 0 UID: 0 PID: 320 Comm: syz-executor362 Tainted: G B syzkaller #0 1b627ac51616646c2b03e03cc27ccf1d06a70c9d Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:gs_close+0x181/0x9c0 drivers/usb/gadget/function/u_serial.c:691 Code: 26 cc fd 41 ff cc 42 0f b6 04 2b 84 c0 0f 85 da 06 00 00 48 8b 44 24 20 44 89 20 48 8b 5c 24 38 e9 d1 02 00 00 e8 7f 26 cc fd <0f> 0b 48 8b 5c 24 38 e9 c0 02 00 00 e8 6e 26 cc fd 49 8d bf 78 02 RSP: 0018:ffffc9000137fa00 EFLAGS: 00010093 RAX: ffffffff83bb4b41 RBX: 1ffff1102047ff18 RCX: ffff888109305f00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000137fb20 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff5200026ff30 R12: 0000000000000000 R13: dffffc0000000000 R14: 1ffff9200026ff48 R15: ffff8881023ff800 FS: 0000000000000000(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fabdfd57fd0 CR3: 0000000108be2000 CR4: 00000000003526b0 Call Trace: tty_release+0x32f/0x11e0 drivers/tty/tty_io.c:1754 __fput+0x20b/0xa30 fs/file_table.c:447 ____fput+0x20/0x30 fs/file_table.c:475 task_work_run+0x1e8/0x260 kernel/task_work.c:246 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0xa46/0x2850 kernel/exit.c:955 do_group_exit+0x21f/0x2f0 kernel/exit.c:1098 __do_sys_exit_group kernel/exit.c:1109 [inline] __se_sys_exit_group kernel/exit.c:1107 [inline] __x64_sys_exit_group+0x43/0x50 kernel/exit.c:1107 x64_sys_call+0x2ed2/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:232 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 RIP: 0033:0x7fabdfdacd45 Code: Unable to access opcode bytes at 0x7fabdfdacd1b. RSP: 002b:00007ffd613b13c8 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fabdfdacd45 RDX: 00000000000000e7 RSI: ffffffffffffffd0 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 00007ffd613b1460 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fabdfe5d120 R14: 00007fabdfe5f548 R15: 00007fabdfe5f560 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 1 PID: 320 at kernel/workqueue.c:918 work_offqd_unpack kernel/workqueue.c:918 [inline] WARNING: CPU: 1 PID: 320 at kernel/workqueue.c:918 __cancel_work+0x1a2/0x1f0 kernel/workqueue.c:4384 Modules linked in: CPU: 1 UID: 0 PID: 320 Comm: syz-executor362 Tainted: G B W syzkaller #0 1b627ac51616646c2b03e03cc27ccf1d06a70c9d Tainted: [B]=BAD_PAGE, [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:work_offqd_unpack kernel/workqueue.c:918 [inline] RIP: 0010:__cancel_work+0x1a2/0x1f0 kernel/workqueue.c:4384 Code: 8b 04 25 28 00 00 00 48 3b 45 d0 75 49 0f b6 45 c7 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc e8 4e 70 31 00 <0f> 0b e9 d5 fe ff ff e8 42 70 31 00 0f 0b e9 65 ff ff ff 80 3d b2 RSP: 0018:ffffc9000137fa08 EFLAGS: 00010093 RAX: ffffffff81560172 RBX: 1ffff1102047ff01 RCX: ffff888109305f00 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000000 RBP: ffffc9000137fa48 R08: 0000000000000007 R09: 00000000fffffffb R10: dffffc0000000000 R11: ffffed102047ff01 R12: 0000000000000002 R13: 03fe017100000145 R14: ffff8881023ff808 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fabdfd58d58 CR3: 0000000105fd2000 CR4: 00000000003526b0 Call Trace: __cancel_work_sync kernel/workqueue.c:4399 [inline] cancel_work_sync+0x22/0xe0 kernel/workqueue.c:4448 tty_buffer_cancel_work+0x1d/0x30 drivers/tty/tty_buffer.c:622 release_tty+0x49f/0x900 drivers/tty/tty_io.c:1597 tty_release_struct+0xc3/0xe0 drivers/tty/tty_io.c:1701 tty_release+0xbc3/0x11e0 drivers/tty/tty_io.c:1861 __fput+0x20b/0xa30 fs/file_table.c:447 ____fput+0x20/0x30 fs/file_table.c:475 task_work_run+0x1e8/0x260 kernel/task_work.c:246 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0xa46/0x2850 kernel/exit.c:955 do_group_exit+0x21f/0x2f0 kernel/exit.c:1098 __do_sys_exit_group kernel/exit.c:1109 [inline] __se_sys_exit_group kernel/exit.c:1107 [inline] __x64_sys_exit_group+0x43/0x50 kernel/exit.c:1107 x64_sys_call+0x2ed2/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:232 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 RIP: 0033:0x7fabdfdacd45 Code: Unable to access opcode bytes at 0x7fabdfdacd1b. RSP: 002b:00007ffd613b13c8 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fabdfdacd45 RDX: 00000000000000e7 RSI: ffffffffffffffd0 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 00007ffd613b1460 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fabdfe5d120 R14: 00007fabdfe5f548 R15: 00007fabdfe5f560 ---[ end trace 0000000000000000 ]---