net_ratelimit: 4 callbacks suppressed protocol 88fb is buggy, dev hsr_slave_0 ================================================================== 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 ffff8880595839e8 by task kworker/u4:5/7214 CPU: 1 PID: 7214 Comm: kworker/u4:5 Not tainted 4.14.138 #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x19c 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:1064 apic_timer_interrupt+0x96/0xa0 arch/x86/entry/entry_64.S:792 RIP: 0010:__read_once_size include/linux/compiler.h:183 [inline] RIP: 0010:__rcu_read_unlock+0xd6/0x170 kernel/rcu/update.c:259 RSP: 0018:ffff888058917cd0 EFLAGS: 00000a03 ORIG_RAX: ffffffffffffff10 RAX: ffff888059360384 RBX: ffff888059360000 RCX: 1ffffffff0ea63a5 RDX: 0000000000000000 RSI: ffffffff869d2b40 RDI: ffff888059360384 RBP: ffff888058917ce0 R08: 0000000000000000 R09: ffff8880593608f0 R10: ffff8880593608d0 R11: ffff888059360000 R12: ffff888059360380 R13: 0000000000000362 R14: 0000000000000000 R15: dffffc0000000000 rcu_read_unlock include/linux/rcupdate.h:684 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:420 [inline] batadv_nc_worker+0x1bb/0x6d0 net/batman-adv/network-coding.c:726 process_one_work+0x863/0x1600 kernel/workqueue.c:2114 worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248 kthread+0x319/0x430 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 13687: 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:3257 __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 13684: 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+0x493/0x5d0 net/core/sock.c:1583 sk_destruct+0x67/0x80 net/core/sock.c:1591 __sk_free+0x54/0x230 net/core/sock.c:1599 sk_free+0x35/0x40 net/core/sock.c:1610 sock_put include/net/sock.h:1653 [inline] packet_release+0x8ba/0xb50 net/packet/af_packet.c:3086 __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 ffff888059583200 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 2024 bytes inside of 2048-byte region [ffff888059583200, ffff888059583a00) The buggy address belongs to the page: page:ffffea0001656080 count:1 mapcount:0 mapping:ffff888059582100 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff888059582100 0000000000000000 0000000100000003 raw: ffffea00016a4ba0 ffffea000287d720 ffff8880aa800c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready ffff888059583880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888059583900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888059583980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888059583a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888059583a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================