================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:147 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:1359 [inline] BUG: KASAN: use-after-free in kfree_skb_reason+0x2f/0x110 net/core/skbuff.c:772 Read of size 4 at addr ffff88801cbbe9a4 by task syz-executor.3/3648 CPU: 1 PID: 3648 Comm: syz-executor.3 Not tainted 5.19.0-rc4-syzkaller-00125-ga175eca0f3d7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/18/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] skb_unref include/linux/skbuff.h:1359 [inline] kfree_skb_reason+0x2f/0x110 net/core/skbuff.c:772 kfree_skb include/linux/skbuff.h:1375 [inline] ath9k_hif_usb_reg_in_cb+0x4c5/0x640 drivers/net/wireless/ath/ath9k/hif_usb.c:770 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747 dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x29b/0x9c2 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:on_stack arch/x86/include/asm/stacktrace.h:56 [inline] RIP: 0010:stack_access_ok+0x5b/0x1d0 arch/x86/kernel/unwind_orc.c:342 Code: 8e 47 01 00 00 8b 0b 85 c9 74 65 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2c 01 00 00 <48> 8d 7b 10 4c 8b 6b 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 RSP: 0018:ffffc9000320f3a8 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: ffffc9000320f450 RCX: 0000000000000001 RDX: 1ffff92000641e8b RSI: ffffc9000320fde8 RDI: ffffc9000320f458 RBP: ffffc9000320fde8 R08: ffffffff8eb98542 R09: ffffc9000320f484 R10: fffff52000641e95 R11: ffffc9000320fdf0 R12: 0000000000000008 R13: ffffc9000320f450 R14: ffffc9000320fde8 R15: ffffffff8eb98546 deref_stack_reg arch/x86/kernel/unwind_orc.c:352 [inline] unwind_next_frame+0x12b4/0x1cc0 arch/x86/kernel/unwind_orc.c:600 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x166/0x1a0 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1754 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1780 slab_free mm/slub.c:3536 [inline] kfree+0xd6/0x4d0 mm/slub.c:4584 kvfree+0x42/0x50 mm/util.c:655 translate_table+0xb92/0x1750 net/ipv6/netfilter/ip6_tables.c:730 do_replace net/ipv6/netfilter/ip6_tables.c:1153 [inline] do_ip6t_set_ctl+0x56e/0xb90 net/ipv6/netfilter/ip6_tables.c:1639 nf_setsockopt+0x83/0xe0 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x122/0x180 net/ipv6/ipv6_sockglue.c:1026 tcp_setsockopt+0x136/0x2520 net/ipv4/tcp.c:3675 __sys_setsockopt+0x2db/0x6a0 net/socket.c:2254 __do_sys_setsockopt net/socket.c:2265 [inline] __se_sys_setsockopt net/socket.c:2262 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2262 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fdbf768a75a Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 36 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdbf7ccf688 EFLAGS: 00000202 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000029 RCX: 00007fdbf768a75a RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007fdbf7ccf6b0 R08: 0000000000000558 R09: fefefefefefefeff R10: 00007fdbf776b940 R11: 0000000000000202 R12: 00007fdbf7ccf710 R13: 0000000000000003 R14: 00007fdbf7ccf6ac R15: 00007fdbf776b8e0 Allocated by task 26: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:750 [inline] slab_alloc_node mm/slub.c:3243 [inline] kmem_cache_alloc_node+0x255/0x3f0 mm/slub.c:3293 __alloc_skb+0x215/0x340 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1426 [inline] ath9k_hif_usb_alloc_reg_in_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:963 [inline] ath9k_hif_usb_alloc_urbs+0x91d/0x1050 drivers/net/wireless/ath/ath9k/hif_usb.c:1022 ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1108 [inline] ath9k_hif_usb_firmware_cb+0x148/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1241 request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1107 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 Freed by task 3648: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x166/0x1a0 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1754 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1780 slab_free mm/slub.c:3536 [inline] kmem_cache_free+0xdd/0x5a0 mm/slub.c:3553 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:700 kfree_skb_reason+0x85/0x110 include/linux/refcount.h:279 kfree_skb include/linux/skbuff.h:1375 [inline] ath9k_htc_rx_msg+0x1f0/0xb70 drivers/net/wireless/ath/ath9k/htc_hst.c:456 ath9k_hif_usb_reg_in_cb+0x1ac/0x640 drivers/net/wireless/ath/ath9k/hif_usb.c:739 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747 dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x29b/0x9c2 kernel/softirq.c:571 The buggy address belongs to the object at ffff88801cbbe8c0 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 228 bytes inside of 240-byte region [ffff88801cbbe8c0, ffff88801cbbe9b0) The buggy address belongs to the physical page: page:ffffea000072ef80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1cbbe flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000099cf00 dead000000000004 ffff888140acc500 raw: 0000000000000000 00000000000c000c 00000001ffffffff 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 2977, tgid 2977 (udevd), ts 15691899652, free_ts 15679885996 prep_new_page mm/page_alloc.c:2456 [inline] get_page_from_freelist+0x1290/0x3b70 mm/page_alloc.c:4198 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5426 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1824 [inline] allocate_slab+0x26c/0x3c0 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x9c4/0xe20 mm/slub.c:3031 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3118 slab_alloc_node mm/slub.c:3209 [inline] kmem_cache_alloc_node+0x122/0x3f0 mm/slub.c:3293 __alloc_skb+0x215/0x340 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1426 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1191 [inline] netlink_sendmsg+0x9a2/0xe10 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 ____sys_sendmsg+0x6eb/0x810 net/socket.c:2488 ___sys_sendmsg+0xf3/0x170 net/socket.c:2542 __sys_sendmsg net/socket.c:2571 [inline] __do_sys_sendmsg net/socket.c:2580 [inline] __se_sys_sendmsg net/socket.c:2578 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2578 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1371 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1421 free_unref_page_prepare mm/page_alloc.c:3343 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3438 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:446 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:750 [inline] slab_alloc_node mm/slub.c:3243 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x204/0x3b0 mm/slub.c:3268 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags include/linux/audit.h:323 [inline] getname+0x8e/0xd0 fs/namei.c:218 do_sys_openat2+0xf5/0x4c0 fs/open.c:1272 do_sys_open fs/open.c:1294 [inline] __do_sys_openat fs/open.c:1310 [inline] __se_sys_openat fs/open.c:1305 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1305 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Memory state around the buggy address: ffff88801cbbe880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88801cbbe900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801cbbe980: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff88801cbbea00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801cbbea80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 8e 47 01 mov 0x1(%rdi),%es 3: 00 00 add %al,(%rax) 5: 8b 0b mov (%rbx),%ecx 7: 85 c9 test %ecx,%ecx 9: 74 65 je 0x70 b: 48 8d 7b 08 lea 0x8(%rbx),%rdi f: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 16: fc ff df 19: 48 89 fa mov %rdi,%rdx 1c: 48 c1 ea 03 shr $0x3,%rdx 20: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 24: 0f 85 2c 01 00 00 jne 0x156 * 2a: 48 8d 7b 10 lea 0x10(%rbx),%rdi <-- trapping instruction 2e: 4c 8b 6b 08 mov 0x8(%rbx),%r13 32: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 39: fc ff df 3c: 48 89 fa mov %rdi,%rdx 3f: 48 rex.W