================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:263 [inline] BUG: KASAN: use-after-free in dev_queue_xmit_nit+0x87e/0xa20 net/core/dev.c:2004 Read of size 8 at addr ffff88809143f0b0 by task syz-executor.1/17824 CPU: 1 PID: 17824 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __read_once_size include/linux/compiler.h:263 [inline] dev_queue_xmit_nit+0x87e/0xa20 net/core/dev.c:2004 xmit_one net/core/dev.c:3252 [inline] dev_hard_start_xmit+0xaa/0x920 net/core/dev.c:3272 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 neigh_connected_output+0x3e8/0x5e0 net/core/neighbour.c:1403 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] NF_HOOK include/linux/netfilter.h:289 [inline] mld_sendpack+0x674/0x1060 net/ipv6/mcast.c:1681 mld_send_cr net/ipv6/mcast.c:1977 [inline] mld_ifc_timer_expire+0x616/0xdf0 net/ipv6/mcast.c:2476 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:__rcu_read_unlock+0xfc/0x160 kernel/rcu/tree_plugin.h:430 Code: 83 c0 03 38 d0 7c 04 84 d2 75 62 8b 83 74 03 00 00 85 c0 75 69 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 0f b6 04 02 <84> c0 74 04 3c 03 7e 42 c7 83 70 03 00 00 00 00 00 00 e9 34 ff ff RSP: 0018:ffff8880af956b98 EFLAGS: 00000a06 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff888052e4e440 RCX: 0000000000000000 RDX: 1ffff1100a5c9cf6 RSI: ffff888052e4ecf0 RDI: 0000000000000001 RBP: ffff888052e4e7b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8ae32dc0 R13: dffffc0000000000 R14: ffffffff8b28d238 R15: ffff8880af2ae140 rcu_read_unlock include/linux/rcupdate.h:680 [inline] rtnl_fill_ifinfo+0x26d1/0x36d0 net/core/rtnetlink.c:1694 rtmsg_ifinfo_build_skb+0xcd/0x1a0 net/core/rtnetlink.c:3357 rtmsg_ifinfo_event net/core/rtnetlink.c:3389 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3380 [inline] rtmsg_ifinfo+0x83/0x120 net/core/rtnetlink.c:3398 netdev_state_change net/core/dev.c:1351 [inline] netdev_state_change+0x114/0x130 net/core/dev.c:1342 do_setlink+0x2c8a/0x3540 net/core/rtnetlink.c:2661 rtnl_group_changelink net/core/rtnetlink.c:2925 [inline] rtnl_newlink+0xbc9/0x15c0 net/core/rtnetlink.c:3083 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fbb03f01109 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fbb02876168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fbb04013f60 RCX: 00007fbb03f01109 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 00007fbb03f5b05d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff01e6094f R14: 00007fbb02876300 R15: 0000000000022000 Allocated by task 17834: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] sk_prot_alloc+0x1e2/0x2d0 net/core/sock.c:1483 sk_alloc+0x36/0xec0 net/core/sock.c:1537 packet_create+0x117/0x850 net/packet/af_packet.c:3259 __sock_create+0x3d8/0x740 net/socket.c:1365 sock_create net/socket.c:1416 [inline] __sys_socket+0xef/0x200 net/socket.c:1458 __do_sys_socket net/socket.c:1467 [inline] __se_sys_socket net/socket.c:1465 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1465 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 17835: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 sk_prot_free net/core/sock.c:1520 [inline] __sk_destruct+0x684/0x8a0 net/core/sock.c:1602 sk_destruct net/core/sock.c:1617 [inline] __sk_free+0x165/0x3b0 net/core/sock.c:1628 sk_free+0x3b/0x50 net/core/sock.c:1639 sock_put include/net/sock.h:1713 [inline] packet_release+0x890/0xb70 net/packet/af_packet.c:3088 __sock_release+0xcd/0x2a0 net/socket.c:599 sock_close+0x15/0x20 net/socket.c:1214 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xbf3/0x2be0 kernel/exit.c:870 do_group_exit+0x125/0x310 kernel/exit.c:967 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809143e880 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2096 bytes inside of 4096-byte region [ffff88809143e880, ffff88809143f880) The buggy address belongs to the page: page:ffffea0002450f80 count:1 mapcount:0 mapping:ffff88813bff0dc0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea00014c6488 ffffea0001555988 ffff88813bff0dc0 raw: 0000000000000000 ffff88809143e880 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809143ef80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809143f000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809143f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809143f100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809143f180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 83 c0 03 add $0x3,%eax 3: 38 d0 cmp %dl,%al 5: 7c 04 jl 0xb 7: 84 d2 test %dl,%dl 9: 75 62 jne 0x6d b: 8b 83 74 03 00 00 mov 0x374(%rbx),%eax 11: 85 c0 test %eax,%eax 13: 75 69 jne 0x7e 15: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1c: fc ff df 1f: 48 89 ea mov %rbp,%rdx 22: 48 c1 ea 03 shr $0x3,%rdx 26: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax * 2a: 84 c0 test %al,%al <-- trapping instruction 2c: 74 04 je 0x32 2e: 3c 03 cmp $0x3,%al 30: 7e 42 jle 0x74 32: c7 83 70 03 00 00 00 movl $0x0,0x370(%rbx) 39: 00 00 00 3c: e9 .byte 0xe9 3d: 34 ff xor $0xff,%al 3f: ff .byte 0xff