protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:183 [inline] BUG: KASAN: use-after-free in dev_queue_xmit_nit+0x7cb/0x940 net/core/dev.c:1929 Read of size 8 at addr ffff888067608b68 by task syz-executor.1/20467 CPU: 1 PID: 20467 Comm: syz-executor.1 Not tainted 4.14.148 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x197 lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __read_once_size include/linux/compiler.h:183 [inline] dev_queue_xmit_nit+0x7cb/0x940 net/core/dev.c:1929 xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0xa7/0x8b0 net/core/dev.c:3025 __dev_queue_xmit+0x1d95/0x25e0 net/core/dev.c:3525 dev_queue_xmit+0x18/0x20 net/core/dev.c:3558 hsr_xmit net/hsr/hsr_forward.c:237 [inline] hsr_forward_do net/hsr/hsr_forward.c:295 [inline] hsr_forward_skb+0xbbe/0x1940 net/hsr/hsr_forward.c:373 send_hsr_supervision_frame+0x892/0xec0 net/hsr/hsr_device.c:319 hsr_announce+0xf5/0x340 net/hsr/hsr_device.c:348 call_timer_fn+0x161/0x670 kernel/time/timer.c:1279 expire_timers kernel/time/timer.c:1318 [inline] __run_timers kernel/time/timer.c:1634 [inline] __run_timers kernel/time/timer.c:1602 [inline] run_timer_softirq+0x5b4/0x1570 kernel/time/timer.c:1647 __do_softirq+0x244/0x9a0 kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x160/0x1b0 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x146/0x5e0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x96/0xa0 arch/x86/entry/entry_64.S:792 RIP: 0010:__rcu_read_unlock+0x103/0x170 kernel/rcu/update.c:262 RSP: 0018:ffff88806163f7c8 EFLAGS: 00000a02 ORIG_RAX: ffffffffffffff10 RAX: 0000000000000000 RBX: ffff888091514380 RCX: ffffc9000725f000 RDX: 1ffff110122a28e0 RSI: ffffffff829cc828 RDI: ffff888091514704 RBP: ffff88806163f7d8 R08: 1ffff1100c2c7f05 R09: ffffed100c2c7f08 R10: ffffed100c2c7f07 R11: 0000000000000003 R12: ffff888091514700 R13: 00000000000000e0 R14: ffff88806163f8c8 R15: ffff88806163f828 rcu_read_unlock include/linux/rcupdate.h:684 [inline] avc_has_perm_noaudit security/selinux/avc.c:1118 [inline] avc_has_perm+0x27d/0x4b0 security/selinux/avc.c:1144 sock_has_perm+0x1e2/0x280 security/selinux/hooks.c:4373 selinux_socket_sendmsg+0x36/0x40 security/selinux/hooks.c:4628 security_socket_sendmsg+0x7d/0xb0 security/security.c:1378 sock_sendmsg+0x47/0x110 net/socket.c:653 ___sys_sendmsg+0x349/0x840 net/socket.c:2062 __sys_sendmmsg+0x152/0x3a0 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x35/0x60 net/socket.c:2178 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459a59 RSP: 002b:00007f5764d1fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459a59 RDX: 03fffffffffffff1 RSI: 0000000020003040 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5764d206d4 R13: 00000000004c7494 R14: 00000000004dd050 R15: 00000000ffffffff Allocated by task 20436: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x7a0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] sk_prot_alloc+0x171/0x2a0 net/core/sock.c:1467 sk_alloc+0x39/0xd70 net/core/sock.c:1521 packet_create+0xfa/0x820 net/packet/af_packet.c:3264 __sock_create+0x2f6/0x620 net/socket.c:1275 sock_create net/socket.c:1315 [inline] SYSC_socket net/socket.c:1345 [inline] SyS_socket+0xd3/0x170 net/socket.c:1325 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 20433: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 sk_prot_free net/core/sock.c:1504 [inline] __sk_destruct+0x450/0x580 net/core/sock.c:1581 sk_destruct+0xa4/0xd0 net/core/sock.c:1596 __sk_free+0x54/0x230 net/core/sock.c:1604 sk_free+0x35/0x40 net/core/sock.c:1615 sock_put include/net/sock.h:1653 [inline] packet_release+0x8ba/0xb50 net/packet/af_packet.c:3093 __sock_release+0xce/0x2b0 net/socket.c:602 sock_close+0x1b/0x30 net/socket.c:1139 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888067608380 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 2024 bytes inside of 2048-byte region [ffff888067608380, ffff888067608b80) The buggy address belongs to the page: page:ffffea00019d8200 count:1 mapcount:0 mapping:ffff888067608380 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff888067608380 0000000000000000 0000000100000003 raw: ffffea000219fda0 ffffea00019fe020 ffff8880aa800c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888067608a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888067608a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888067608b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888067608b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888067608c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================