Unknown ioctl 1076391951 ================================================================== 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 ffff88804707a970 by task syz-executor.2/9196 CPU: 1 PID: 9196 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 IPVS: ftp: loaded support on port[0] = 21 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 hsr_xmit net/hsr/hsr_forward.c:237 [inline] hsr_forward_do net/hsr/hsr_forward.c:295 [inline] hsr_forward_skb+0xd2d/0x1c30 net/hsr/hsr_forward.c:373 hsr_dev_xmit+0x6b/0xa0 net/hsr/hsr_device.c:242 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/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] ndisc_send_skb+0xa24/0x1720 net/ipv6/ndisc.c:491 ndisc_send_rs+0x131/0x690 net/ipv6/ndisc.c:685 addrconf_rs_timer+0x384/0x6a0 net/ipv6/addrconf.c:3835 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:__read_once_size include/linux/compiler.h:263 [inline] RIP: 0010:__rcu_read_unlock+0xd9/0x160 kernel/rcu/tree_plugin.h:427 Code: 80 48 8d bb 74 03 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 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 RSP: 0018:ffff88804eb47378 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: ffff8880aad46100 RCX: ffffffff816d11b9 RDX: 0000000000000000 RSI: ffffffff816d117a RDI: ffff8880aad46474 RBP: ffff8880aad46470 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000074071 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880b59c3e40 R15: 00000000000000a0 rcu_read_unlock include/linux/rcupdate.h:680 [inline] is_bpf_text_address+0xdf/0x1b0 kernel/bpf/core.c:548 kernel_text_address kernel/extable.c:152 [inline] kernel_text_address+0xbd/0xf0 kernel/extable.c:122 __kernel_text_address+0x9/0x30 kernel/extable.c:107 unwind_get_return_address arch/x86/kernel/unwind_orc.c:297 [inline] unwind_get_return_address+0x51/0x90 arch/x86/kernel/unwind_orc.c:292 __save_stack_trace+0xaf/0x190 arch/x86/kernel/stacktrace.c:45 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 kmem_cache_zalloc include/linux/slab.h:699 [inline] __kernfs_new_node+0xd2/0x680 fs/kernfs/dir.c:633 kernfs_new_node+0x92/0x120 fs/kernfs/dir.c:693 __kernfs_create_file+0x51/0x340 fs/kernfs/file.c:992 sysfs_add_file_mode_ns+0x226/0x540 fs/sysfs/file.c:307 create_files fs/sysfs/group.c:63 [inline] internal_create_group+0x355/0xb20 fs/sysfs/group.c:147 sysfs_create_group fs/sysfs/group.c:173 [inline] sysfs_create_groups fs/sysfs/group.c:200 [inline] sysfs_create_groups+0x98/0x140 fs/sysfs/group.c:190 device_add_groups drivers/base/core.c:1301 [inline] device_add_attrs drivers/base/core.c:1449 [inline] device_add+0x877/0x16d0 drivers/base/core.c:2139 netdev_register_kobject+0x181/0x430 net/core/net-sysfs.c:1806 register_netdevice+0xb46/0x10f0 net/core/dev.c:8730 register_netdev+0x2d/0x50 net/core/dev.c:8859 loopback_net_init+0x73/0x160 drivers/net/loopback.c:218 ops_init+0xb3/0x410 net/core/net_namespace.c:129 setup_net+0x2c2/0x720 net/core/net_namespace.c:316 copy_net_ns+0x1f7/0x340 net/core/net_namespace.c:439 create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x36c/0x9a0 kernel/fork.c:2542 __do_sys_unshare kernel/fork.c:2610 [inline] __se_sys_unshare kernel/fork.c:2608 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:2608 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f73b7c9e059 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:00007f73b6613168 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 00007f73b7db0f60 RCX: 00007f73b7c9e059 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000042000000 RBP: 00007f73b7cf808d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe951bcc2f R14: 00007f73b6613300 R15: 0000000000022000 Allocated by task 9248: __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 9248: __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 ffff88804707a140 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2096 bytes inside of 4096-byte region [ffff88804707a140, ffff88804707b140) The buggy address belongs to the page: page:ffffea00011c1e80 count:1 mapcount:0 mapping:ffff88813bff0dc0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002ce7908 ffffea0002beed08 ffff88813bff0dc0 raw: 0000000000000000 ffff88804707a140 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804707a800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Unknown ioctl 35156 ffff88804707a880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804707a900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804707a980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804707aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 80 48 8d bb orb $0xbb,-0x73(%rax) 4: 74 03 je 0x9 6: 00 00 add %al,(%rax) 8: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax f: fc ff df 12: 48 89 fa mov %rdi,%rdx 15: 48 c1 ea 03 shr $0x3,%rdx 19: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx 1d: 48 89 f8 mov %rdi,%rax 20: 83 e0 07 and $0x7,%eax 23: 83 c0 03 add $0x3,%eax 26: 38 d0 cmp %dl,%al 28: 7c 04 jl 0x2e * 2a: 84 d2 test %dl,%dl <-- trapping instruction 2c: 75 62 jne 0x90 2e: 8b 83 74 03 00 00 mov 0x374(%rbx),%eax 34: 85 c0 test %eax,%eax 36: 75 69 jne 0xa1 38: 48 rex.W 39: b8 00 00 00 00 mov $0x0,%eax 3e: 00 fc add %bh,%ah