netlink: 76 bytes leftover after parsing attributes in process `syz-executor.0'. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ================================================================== 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 ffff88808f8576b0 by task syz-executor.5/3016 CPU: 1 PID: 3016 Comm: syz-executor.5 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 sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403 qdisc_run include/net/pkt_sched.h:120 [inline] __dev_xmit_skb net/core/dev.c:3451 [inline] __dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip6_finish_output2+0xde7/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_initial_cr.part.0+0x106/0x150 net/ipv6/mcast.c:2098 mld_send_initial_cr net/ipv6/mcast.c:1196 [inline] mld_dad_timer_expire+0x183/0x5e0 net/ipv6/mcast.c:2117 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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:184 Code: 48 c7 c0 88 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 2f 48 83 3d 7c 31 d8 01 00 74 15 48 89 df 57 9d <0f> 1f 44 00 00 eb b2 e8 fb eb e6 f8 eb c0 0f 0b 0f 0b 48 c7 c7 88 RSP: 0018:ffff88804c2c7890 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3051 RBX: 0000000000000286 RCX: 1ffff1100992a1ba RDX: dffffc0000000000 RSI: ffff88804c950dd8 RDI: 0000000000000286 RBP: ffffffff89f888d8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880aa945040 R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000 __rcu_read_unlock+0x158/0x160 kernel/rcu/tree_plugin.h:428 rcu_read_unlock include/linux/rcupdate.h:680 [inline] find_get_entry+0x4d7/0x8a0 mm/filemap.c:1491 pagecache_get_page+0x56/0xd50 mm/filemap.c:1564 find_lock_page include/linux/pagemap.h:297 [inline] hugetlb_no_page+0x1e2/0x1090 mm/hugetlb.c:3833 hugetlb_fault+0xc48/0x11a0 mm/hugetlb.c:4038 handle_mm_fault+0x902/0xb10 mm/memory.c:4334 __do_page_fault+0x68e/0xd60 arch/x86/mm/fault.c:1412 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1205 RIP: 0010:do_strncpy_from_user lib/strncpy_from_user.c:55 [inline] RIP: 0010:strncpy_from_user+0x27a/0x350 lib/strncpy_from_user.c:119 Code: fd 45 84 e4 74 77 e8 85 02 da fd 48 83 c3 01 48 83 ed 01 31 ff 48 89 ee e8 03 04 da fd 48 85 ed 74 42 e8 69 02 da fd 45 31 ff <45> 8a 64 1d 00 31 ff 44 89 fe e8 c7 03 da fd 45 85 ff 74 85 49 c7 RSP: 0018:ffff88804c2c7dd0 EFLAGS: 00050246 RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc90006030000 RDX: 0000000000001004 RSI: ffffffff83888307 RDI: 0000000000000007 RBP: 0000000000000fe0 R08: 0000000000000fe0 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000020000040 R14: ffff8880a59fa2a0 R15: 0000000000000000 getname_flags+0x113/0x590 fs/namei.c:151 do_sys_open+0x26c/0x520 fs/open.c:1079 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f0a025be059 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:00007f0a00f33168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f0a026d0f60 RCX: 00007f0a025be059 RDX: 0000000000000001 RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007f0a0261808d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc61bb86df R14: 00007f0a00f33300 R15: 0000000000022000 Allocated by task 3040: __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 3037: __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 ffff88808f856e80 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2096 bytes inside of 4096-byte region [ffff88808f856e80, ffff88808f857e80) The buggy address belongs to the page: page:ffffea00023e1580 count:1 mapcount:0 mapping:ffff88813bff0dc0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002a7c988 ffffea000129bd08 ffff88813bff0dc0 raw: 0000000000000000 ffff88808f856e80 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808f857580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808f857600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808f857680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808f857700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808f857780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 48 c7 c0 88 82 f1 89 mov $0xffffffff89f18288,%rax 7: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx e: fc ff df 11: 48 c1 e8 03 shr $0x3,%rax 15: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) 19: 75 2f jne 0x4a 1b: 48 83 3d 7c 31 d8 01 cmpq $0x0,0x1d8317c(%rip) # 0x1d8319f 22: 00 23: 74 15 je 0x3a 25: 48 89 df mov %rbx,%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: eb b2 jmp 0xffffffe3 31: e8 fb eb e6 f8 callq 0xf8e6ec31 36: eb c0 jmp 0xfffffff8 38: 0f 0b ud2 3a: 0f 0b ud2 3c: 48 rex.W 3d: c7 .byte 0xc7 3e: c7 (bad) 3f: 88 .byte 0x88