em28xx 5-1:0.108: Config register raw data: 0xfffffffb em28xx 5-1:0.108: AC97 chip type couldn't be determined em28xx 5-1:0.108: No AC97 audio processor ================================================================== BUG: KASAN: slab-use-after-free in __list_add_valid_or_report+0xe0/0x100 lib/list_debug.c:32 Read of size 8 at addr ffff8880286d0250 by task kworker/2:2/825 CPU: 2 PID: 825 Comm: kworker/2:2 Not tainted 6.8.0-rc1-syzkaller-g610347effc2e #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 __list_add_valid_or_report+0xe0/0x100 lib/list_debug.c:32 __list_add_valid include/linux/list.h:88 [inline] __list_add include/linux/list.h:150 [inline] list_add_tail include/linux/list.h:183 [inline] em28xx_init_extension+0x48/0x1f0 drivers/media/usb/em28xx/em28xx-core.c:1113 em28xx_init_dev.constprop.0+0x1977/0x3080 drivers/media/usb/em28xx/em28xx-cards.c:3627 em28xx_usb_probe+0x10d7/0x3730 drivers/media/usb/em28xx/em28xx-cards.c:3982 usb_probe_interface+0x307/0x930 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x234/0xc90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830 __device_attach_driver+0x1d4/0x300 drivers/base/dd.c:958 bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532 device_add+0x117e/0x1aa0 drivers/base/core.c:3625 usb_set_configuration+0x10cb/0x1c40 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0xad/0x110 drivers/usb/core/generic.c:254 usb_probe_device+0xec/0x350 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x234/0xc90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830 __device_attach_driver+0x1d4/0x300 drivers/base/dd.c:958 bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532 device_add+0x117e/0x1aa0 drivers/base/core.c:3625 usb_new_device+0xd80/0x19f0 drivers/usb/core/hub.c:2596 hub_port_connect drivers/usb/core/hub.c:5465 [inline] hub_port_connect_change drivers/usb/core/hub.c:5605 [inline] port_event drivers/usb/core/hub.c:5765 [inline] hub_event+0x2dac/0x4e10 drivers/usb/core/hub.c:5847 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Allocated by task 5531: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] kmem_cache_alloc_bulk+0x435/0x940 mm/slub.c:4655 mt_alloc_bulk lib/maple_tree.c:167 [inline] mas_alloc_nodes+0x39b/0x860 lib/maple_tree.c:1264 mas_node_count_gfp+0x105/0x130 lib/maple_tree.c:1322 mas_preallocate+0x3bb/0x1010 lib/maple_tree.c:5508 vma_iter_prealloc mm/internal.h:1147 [inline] __split_vma+0x477/0x1190 mm/mmap.c:2346 do_vmi_align_munmap+0x35f/0x1ad0 mm/mmap.c:2547 do_vmi_munmap+0x20e/0x450 mm/mmap.c:2693 mmap_region+0x17f/0x2aa0 mm/mmap.c:2744 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x422/0x5b0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 16: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x129/0x350 mm/slub.c:4363 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:586 __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683 mas_topiary_node lib/maple_tree.c:2526 [inline] mas_topiary_replace+0x171e/0x3600 lib/maple_tree.c:2632 mas_wmb_replace lib/maple_tree.c:2648 [inline] mas_split.isra.0+0xab8/0x11a0 lib/maple_tree.c:3395 mas_commit_b_node.isra.0+0x894/0x14e0 lib/maple_tree.c:3448 mas_wr_bnode+0x187/0x220 lib/maple_tree.c:4160 mas_wr_modify lib/maple_tree.c:4198 [inline] mas_wr_store_entry.isra.0+0x6c4/0x1610 lib/maple_tree.c:4231 mas_store_prealloc+0xb6/0x2a0 lib/maple_tree.c:5437 vma_complete+0x8ff/0xdf0 mm/mmap.c:532 __split_vma+0xd66/0x1190 mm/mmap.c:2379 do_vmi_align_munmap+0x2c2/0x1ad0 mm/mmap.c:2534 do_vmi_munmap+0x20e/0x450 mm/mmap.c:2693 mmap_region+0x17f/0x2aa0 mm/mmap.c:2744 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x422/0x5b0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff8880286d0200 which belongs to the cache maple_node of size 256 The buggy address is located 80 bytes inside of freed 256-byte region [ffff8880286d0200, ffff8880286d0300) The buggy address belongs to the physical page: page:ffffea0000a1b400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x286d0 head:ffffea0000a1b400 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888013050c80 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5531, tgid 5531 (rm), ts 100041590403, free_ts 99419016782 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __kmem_cache_alloc_bulk mm/slub.c:4574 [inline] kmem_cache_alloc_bulk+0x27a/0x940 mm/slub.c:4648 mt_alloc_bulk lib/maple_tree.c:167 [inline] mas_alloc_nodes+0x39b/0x860 lib/maple_tree.c:1264 mas_node_count_gfp+0x105/0x130 lib/maple_tree.c:1322 mas_preallocate+0x3bb/0x1010 lib/maple_tree.c:5508 vma_iter_prealloc mm/internal.h:1147 [inline] __split_vma+0x477/0x1190 mm/mmap.c:2346 do_vmi_align_munmap+0x35f/0x1ad0 mm/mmap.c:2547 do_vmi_munmap+0x20e/0x450 mm/mmap.c:2693 mmap_region+0x17f/0x2aa0 mm/mmap.c:2744 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x422/0x5b0 mm/mmap.c:1425 page last free pid 825 tgid 825 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x51f/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 __folio_put+0xeb/0x110 mm/swap.c:127 em28xx_free_device drivers/media/usb/em28xx/em28xx-cards.c:3514 [inline] kref_put include/linux/kref.h:65 [inline] em28xx_usb_disconnect+0x4eb/0x640 drivers/media/usb/em28xx/em28xx-cards.c:4148 usb_unbind_interface+0x1dd/0x8d0 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:569 [inline] device_remove+0x11f/0x170 drivers/base/dd.c:561 __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295 bus_remove_device+0x22c/0x420 drivers/base/bus.c:574 device_del+0x39a/0xa50 drivers/base/core.c:3814 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416 usb_disconnect+0x2e1/0x910 drivers/usb/core/hub.c:2257 hub_port_connect drivers/usb/core/hub.c:5305 [inline] hub_port_connect_change drivers/usb/core/hub.c:5605 [inline] port_event drivers/usb/core/hub.c:5765 [inline] hub_event+0x1db7/0x4e10 drivers/usb/core/hub.c:5847 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 Memory state around the buggy address: ffff8880286d0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880286d0180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880286d0200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880286d0280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880286d0300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================