================================================================== BUG: KASAN: slab-use-after-free in __intf_to_usbdev include/linux/usb.h:752 [inline] BUG: KASAN: slab-use-after-free in uea_upload_pre_firmware+0x3bd/0x3d0 drivers/usb/atm/ueagle-atm.c:598 Read of size 8 at addr ffff888037a030b8 by task kworker/2:2/1046 CPU: 2 UID: 0 PID: 1046 Comm: kworker/2:2 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: events request_firmware_work_func Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 __intf_to_usbdev include/linux/usb.h:752 [inline] uea_upload_pre_firmware+0x3bd/0x3d0 drivers/usb/atm/ueagle-atm.c:598 request_firmware_work_func+0x13f/0x440 drivers/base/firmware_loader/main.c:1164 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322 process_scheduled_works kernel/workqueue.c:3405 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 9: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5362 [inline] __kmalloc_node_track_caller_noprof+0x331/0x830 mm/slub.c:5497 kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:637 __alloc_skb+0x185/0x710 net/core/skbuff.c:715 alloc_skb include/linux/skbuff.h:1384 [inline] mld_newpack.isra.0+0x18e/0xa20 net/ipv6/mcast.c:1789 add_grhead+0x299/0x340 net/ipv6/mcast.c:1900 add_grec+0x1389/0x1930 net/ipv6/mcast.c:2039 mld_send_cr net/ipv6/mcast.c:2164 [inline] mld_ifc_work+0x3c5/0xc10 net/ipv6/mcast.c:2710 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322 process_scheduled_works kernel/workqueue.c:3405 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 9: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/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] kfree+0x22b/0x6c0 mm/slub.c:6720 skb_kfree_head net/core/skbuff.c:1077 [inline] skb_free_head+0xb9/0x160 net/core/skbuff.c:1089 skb_release_data+0x6c5/0x8e0 net/core/skbuff.c:1116 skb_release_all net/core/skbuff.c:1191 [inline] __kfree_skb net/core/skbuff.c:1205 [inline] sk_skb_reason_drop+0x102/0x1b0 net/core/skbuff.c:1244 kfree_skb_reason include/linux/skbuff.h:1323 [inline] kfree_skb include/linux/skbuff.h:1332 [inline] ip6_mc_input+0x832/0xf50 net/ipv6/ip6_input.c:638 dst_input include/net/dst.h:480 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:119 [inline] NF_HOOK include/linux/netfilter.h:318 [inline] NF_HOOK include/linux/netfilter.h:312 [inline] ipv6_rcv+0x34c/0x3d0 net/ipv6/ip6_input.c:351 __netif_receive_skb_one_core+0x12d/0x1e0 net/core/dev.c:6212 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6325 process_backlog+0x37a/0x1580 net/core/dev.c:6676 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7735 napi_poll net/core/dev.c:7798 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:7955 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622 do_softirq kernel/softirq.c:523 [inline] do_softirq+0xac/0xe0 kernel/softirq.c:510 __local_bh_enable_ip+0xf8/0x120 kernel/softirq.c:450 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:914 [inline] __dev_queue_xmit+0xa27/0x4970 net/core/dev.c:4913 dev_queue_xmit include/linux/netdevice.h:3446 [inline] neigh_hh_output include/net/neighbour.h:544 [inline] neigh_output include/net/neighbour.h:558 [inline] ip6_finish_output2+0xfd4/0x1ce0 net/ipv6/ip6_output.c:136 __ip6_finish_output+0x357/0xdf0 net/ipv6/ip6_output.c:208 ip6_finish_output net/ipv6/ip6_output.c:219 [inline] NF_HOOK_COND include/linux/netfilter.h:307 [inline] ip6_output+0x2aa/0xa60 net/ipv6/ip6_output.c:246 dst_output include/net/dst.h:470 [inline] NF_HOOK include/linux/netfilter.h:318 [inline] NF_HOOK.constprop.0+0x115/0x5a0 include/linux/netfilter.h:312 mld_sendpack+0x8f7/0xec0 net/ipv6/mcast.c:1869 mld_send_cr net/ipv6/mcast.c:2170 [inline] mld_ifc_work+0x75a/0xc10 net/ipv6/mcast.c:2710 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322 process_scheduled_works kernel/workqueue.c:3405 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 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 ffff888037a03000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 184 bytes inside of freed 2048-byte region [ffff888037a03000, ffff888037a03800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888037a05000 pfn:0x37a00 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801bc42f00 ffffea0000975c10 ffffea00009cd810 raw: ffff888037a05000 0000000800080005 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801bc42f00 ffffea0000975c10 ffffea00009cd810 head: ffff888037a05000 0000000800080005 00000000f5000000 0000000000000000 head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 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 56, tgid 56 (kworker/1:1), ts 204222921462, free_ts 204026492076 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3294 [inline] allocate_slab mm/slub.c:3408 [inline] new_slab+0xa2/0x650 mm/slub.c:3454 refill_objects+0xe3/0x410 mm/slub.c:7338 refill_sheaf mm/slub.c:2832 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4703 alloc_from_pcs mm/slub.c:4801 [inline] slab_alloc_node mm/slub.c:4933 [inline] __do_kmalloc_node mm/slub.c:5361 [inline] __kmalloc_node_track_caller_noprof+0x679/0x830 mm/slub.c:5497 kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:637 __alloc_skb+0x185/0x710 net/core/skbuff.c:715 alloc_skb include/linux/skbuff.h:1384 [inline] mld_newpack.isra.0+0x18e/0xa20 net/ipv6/mcast.c:1789 add_grhead+0x299/0x340 net/ipv6/mcast.c:1900 add_grec+0x1389/0x1930 net/ipv6/mcast.c:2039 mld_send_cr net/ipv6/mcast.c:2164 [inline] mld_ifc_work+0x3c5/0xc10 net/ipv6/mcast.c:2710 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322 process_scheduled_works kernel/workqueue.c:3405 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486 kthread+0x370/0x450 kernel/kthread.c:436 page last free pid 13036 tgid 13034 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 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] __do_kmalloc_node mm/slub.c:5361 [inline] __kmalloc_noprof+0x2bf/0x820 mm/slub.c:5387 _kmalloc_noprof include/linux/slab.h:973 [inline] tomoyo_realpath_from_path+0xb6/0x690 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x23c/0x580 security/tomoyo/file.c:728 security_file_ioctl+0xd3/0x230 security/security.c:2512 __do_sys_ioctl fs/ioctl.c:591 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0xb7/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888037a02f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888037a03000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888037a03080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888037a03100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888037a03180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================