================================================================== BUG: KASAN: slab-use-after-free in stub_recv_cmd_submit drivers/usb/usbip/stub_rx.c:609 [inline] BUG: KASAN: slab-use-after-free in stub_rx_pdu drivers/usb/usbip/stub_rx.c:688 [inline] BUG: KASAN: slab-use-after-free in stub_rx_loop+0x2965/0x2ee0 drivers/usb/usbip/stub_rx.c:707 Read of size 4 at addr ffff88801faa4db0 by task stub_rx/5328 CPU: 0 UID: 0 PID: 5328 Comm: stub_rx 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 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 stub_recv_cmd_submit drivers/usb/usbip/stub_rx.c:609 [inline] stub_rx_pdu drivers/usb/usbip/stub_rx.c:688 [inline] stub_rx_loop+0x2965/0x2ee0 drivers/usb/usbip/stub_rx.c:707 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5328: 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:4612 [inline] slab_alloc_node mm/slub.c:4945 [inline] kmem_cache_alloc_noprof+0x2a0/0x5f0 mm/slub.c:4959 stub_priv_alloc drivers/usb/usbip/stub_rx.c:314 [inline] stub_recv_cmd_submit drivers/usb/usbip/stub_rx.c:490 [inline] stub_rx_pdu drivers/usb/usbip/stub_rx.c:688 [inline] stub_rx_loop+0xad9/0x2ee0 drivers/usb/usbip/stub_rx.c:707 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 5329: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/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:2705 [inline] slab_free mm/slub.c:6405 [inline] kmem_cache_free+0x182/0x650 mm/slub.c:6532 stub_send_ret_submit drivers/usb/usbip/stub_tx.c:333 [inline] stub_tx_loop+0x1b16/0x2800 drivers/usb/usbip/stub_tx.c:437 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88801faa4d80 which belongs to the cache stub_priv of size 64 The buggy address is located 48 bytes inside of freed 64-byte region [ffff88801faa4d80, ffff88801faa4dc0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88801faa4e00 pfn:0x1faa4 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff888033f933c0 ffff888032d00c48 ffff888032d00c48 raw: ffff88801faa4e00 000000080020001c 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5328, tgid 5328 (stub_rx), ts 106274200390, free_ts 106188681443 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3294 [inline] allocate_slab+0x79/0x5e0 mm/slub.c:3408 new_slab mm/slub.c:3454 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7338 refill_sheaf mm/slub.c:2832 [inline] __pcs_replace_empty_main+0x2bf/0x6b0 mm/slub.c:4703 alloc_from_pcs mm/slub.c:4801 [inline] slab_alloc_node mm/slub.c:4933 [inline] kmem_cache_alloc_noprof+0x382/0x5f0 mm/slub.c:4959 stub_priv_alloc drivers/usb/usbip/stub_rx.c:314 [inline] stub_recv_cmd_submit drivers/usb/usbip/stub_rx.c:490 [inline] stub_rx_pdu drivers/usb/usbip/stub_rx.c:688 [inline] stub_rx_loop+0xad9/0x2ee0 drivers/usb/usbip/stub_rx.c:707 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 75 tgid 75 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] free_unref_folios+0xd84/0x14a0 mm/page_alloc.c:3011 shrink_folio_list+0x4b16/0x5330 mm/vmscan.c:1582 evict_folios+0x3821/0x4b40 mm/vmscan.c:4835 try_to_shrink_lruvec+0xb4f/0xed0 mm/vmscan.c:4983 shrink_one+0x233/0x730 mm/vmscan.c:5024 shrink_many mm/vmscan.c:5087 [inline] lru_gen_shrink_node mm/vmscan.c:5165 [inline] shrink_node+0x3303/0x3b60 mm/vmscan.c:6154 kswapd_shrink_node mm/vmscan.c:7008 [inline] balance_pgdat mm/vmscan.c:7186 [inline] kswapd+0x17b6/0x31c0 mm/vmscan.c:7462 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88801faa4c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801faa4d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801faa4d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88801faa4e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801faa4e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================