================================================================== 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 ffff8880363ef0b8 by task kworker/1:3/5874 CPU: 1 UID: 0 PID: 5874 Comm: kworker/1:3 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 10628: 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_noprof+0x322/0x820 mm/slub.c:5387 _kmalloc_noprof include/linux/slab.h:973 [inline] sk_prot_alloc+0x10b/0x2a0 net/core/sock.c:2252 sk_alloc+0x36/0xe80 net/core/sock.c:2308 __netlink_create+0x5e/0x2c0 net/netlink/af_netlink.c:627 netlink_create+0x29b/0x610 net/netlink/af_netlink.c:685 __sock_create+0x339/0x860 net/socket.c:1651 sock_create net/socket.c:1709 [inline] __sys_socket_create net/socket.c:1746 [inline] __sys_socket+0x14d/0x260 net/socket.c:1793 __do_sys_socket net/socket.c:1807 [inline] __se_sys_socket net/socket.c:1805 [inline] __x64_sys_socket+0x72/0xb0 net/socket.c:1805 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 Freed by task 10614: 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 sk_prot_free net/core/sock.c:2291 [inline] __sk_destruct+0x88c/0xab0 net/core/sock.c:2391 sk_destruct+0xc8/0xf0 net/core/sock.c:2419 __sk_free+0xf4/0x3e0 net/core/sock.c:2430 sk_free+0x61/0x90 net/core/sock.c:2441 deferred_put_nlk_sk+0xbe/0x110 net/netlink/af_netlink.c:715 rcu_do_batch kernel/rcu/tree.c:2645 [inline] rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2897 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 Last potentially related work creation: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556 __call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3159 netlink_release+0xb38/0x1ff0 net/netlink/af_netlink.c:797 __sock_release+0xb3/0x260 net/socket.c:710 sock_close+0x1c/0x30 net/socket.c:1501 __fput+0x3ff/0xb50 fs/file_table.c:512 task_work_run+0x150/0x240 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x1d8/0x6f0 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x666/0x870 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880363ef000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 184 bytes inside of freed 2048-byte region [ffff8880363ef000, ffff8880363ef800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880363ee000 pfn:0x363e8 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 ffffea00015c9610 ffffea0000b56410 raw: ffff8880363ee000 0000000800080005 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801bc42f00 ffffea00015c9610 ffffea0000b56410 head: ffff8880363ee000 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5784, tgid 5784 (syz-executor), ts 373876904991, free_ts 370681055536 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] __kmalloc_cache_noprof+0x479/0x6c0 mm/slub.c:5511 _kmalloc_noprof include/linux/slab.h:969 [inline] _kzalloc_noprof include/linux/slab.h:1290 [inline] batadv_hardif_add_interface net/batman-adv/hard-interface.c:878 [inline] batadv_hard_if_event+0x14bf/0x3870 net/batman-adv/hard-interface.c:1087 notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2250 call_netdevice_notifiers_extack net/core/dev.c:2288 [inline] call_netdevice_notifiers net/core/dev.c:2302 [inline] register_netdevice+0x1998/0x25a0 net/core/dev.c:11484 veth_newlink+0x44a/0xa00 drivers/net/veth.c:1892 rtnl_newlink_create net/core/rtnetlink.c:3913 [inline] __rtnl_newlink net/core/rtnetlink.c:4044 [inline] rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076 netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345 page last free pid 5772 tgid 5772 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 __folio_put+0x3b4/0x5f0 mm/swap.c:112 folio_put include/linux/mm.h:2124 [inline] put_page include/linux/mm.h:2193 [inline] put_netmem include/net/netmem.h:394 [inline] skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x649/0x8e0 net/core/skbuff.c:1110 skb_release_all net/core/skbuff.c:1191 [inline] napi_consume_skb+0x1a6/0x320 net/core/skbuff.c:1540 skb_defer_free_flush+0x1f1/0x290 net/core/dev.c:6868 net_rx_action+0x3ca/0xf20 net/core/dev.c:7936 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] ip_finish_output2+0xf4a/0x2400 net/ipv4/ip_output.c:236 __ip_finish_output.part.0+0x444/0x6f0 net/ipv4/ip_output.c:314 __ip_finish_output net/ipv4/ip_output.c:302 [inline] ip_finish_output net/ipv4/ip_output.c:324 [inline] NF_HOOK_COND include/linux/netfilter.h:307 [inline] ip_output+0x39b/0xc10 net/ipv4/ip_output.c:437 dst_output include/net/dst.h:470 [inline] ip_local_out+0x193/0x1f0 net/ipv4/ip_output.c:131 __ip_queue_xmit+0x885/0x1e90 net/ipv4/ip_output.c:533 __tcp_transmit_skb+0x3506/0x4f20 net/ipv4/tcp_output.c:1716 Memory state around the buggy address: ffff8880363eef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880363ef000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880363ef080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880363ef100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880363ef180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================