netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. Started in network mode Own node identity e0000002, cluster identity 4711 New replicast peer: 172.20.20.187 ================================================================== BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:43 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:983 [inline] BUG: KASAN: use-after-free in kfree_skb+0xb7/0x580 net/core/skbuff.c:655 Read of size 4 at addr ffff8881c2d260d4 by task syz-executor1/16409 CPU: 0 PID: 16409 Comm: syz-executor1 Not tainted 4.20.0-rc6+ #354 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] refcount_read include/linux/refcount.h:43 [inline] skb_unref include/linux/skbuff.h:983 [inline] kfree_skb+0xb7/0x580 net/core/skbuff.c:655 tipc_udp_send_msg+0x5af/0x680 net/tipc/udp_media.c:249 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:504 tipc_enable_bearer+0xc5e/0xf10 net/tipc/bearer.c:329 __tipc_nl_bearer_enable+0x37c/0x4a0 net/tipc/bearer.c:900 sctp: [Deprecated]: syz-executor3 (pid 16388) Use of int in max_burst socket option. Use struct sctp_assoc_value instead tipc_nl_bearer_enable+0x22/0x30 net/tipc/bearer.c:908 genl_family_rcv_msg+0x8a7/0x11a0 net/netlink/genetlink.c:601 genl_rcv_msg+0xc6/0x168 net/netlink/genetlink.c:626 netlink_rcv_skb+0x16c/0x430 net/netlink/af_netlink.c:2477 genl_rcv+0x28/0x40 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x59f/0x750 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2116 __sys_sendmsg+0x11d/0x280 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457669 Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f41713d9c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457669 RDX: 0000000000000010 RSI: 00000000200003c0 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f41713da6d4 R13: 00000000004c4252 R14: 00000000004d71d0 R15: 00000000ffffffff Allocated by task 16409: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc_node+0x144/0x730 mm/slab.c:3644 __alloc_skb+0x119/0x760 net/core/skbuff.c:196 __pskb_copy_fclone+0x159/0xe80 net/core/skbuff.c:1390 __pskb_copy include/linux/skbuff.h:1067 [inline] pskb_copy include/linux/skbuff.h:2929 [inline] tipc_udp_send_msg+0x457/0x680 net/tipc/udp_media.c:241 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:504 tipc_enable_bearer+0xc5e/0xf10 net/tipc/bearer.c:329 __tipc_nl_bearer_enable+0x37c/0x4a0 net/tipc/bearer.c:900 tipc_nl_bearer_enable+0x22/0x30 net/tipc/bearer.c:908 genl_family_rcv_msg+0x8a7/0x11a0 net/netlink/genetlink.c:601 genl_rcv_msg+0xc6/0x168 net/netlink/genetlink.c:626 netlink_rcv_skb+0x16c/0x430 net/netlink/af_netlink.c:2477 genl_rcv+0x28/0x40 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x59f/0x750 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2116 __sys_sendmsg+0x11d/0x280 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 16409: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3760 kfree_skbmem+0x14e/0x230 net/core/skbuff.c:585 __kfree_skb net/core/skbuff.c:642 [inline] kfree_skb+0x1c3/0x580 net/core/skbuff.c:659 tipc_udp_xmit.isra.14+0x41e/0xee0 net/tipc/udp_media.c:207 tipc_udp_send_msg+0x3a1/0x680 net/tipc/udp_media.c:247 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:504 tipc_enable_bearer+0xc5e/0xf10 net/tipc/bearer.c:329 __tipc_nl_bearer_enable+0x37c/0x4a0 net/tipc/bearer.c:900 tipc_nl_bearer_enable+0x22/0x30 net/tipc/bearer.c:908 genl_family_rcv_msg+0x8a7/0x11a0 net/netlink/genetlink.c:601 genl_rcv_msg+0xc6/0x168 net/netlink/genetlink.c:626 netlink_rcv_skb+0x16c/0x430 net/netlink/af_netlink.c:2477 genl_rcv+0x28/0x40 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x59f/0x750 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2116 __sys_sendmsg+0x11d/0x280 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881c2d26000 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 212 bytes inside of 224-byte region [ffff8881c2d26000, ffff8881c2d260e0) The buggy address belongs to the page: page:ffffea00070b4980 count:1 mapcount:0 mapping:ffff8881d9a1d0c0 index:0xffff8881c2d26140 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0006f539c8 ffffea0007641688 ffff8881d9a1d0c0 raw: ffff8881c2d26140 ffff8881c2d26000 000000010000000a 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c2d25f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881c2d26000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c2d26080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8881c2d26100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881c2d26180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: double-free or invalid-free in skb_free_head+0x93/0xb0 net/core/skbuff.c:553 CPU: 0 PID: 16409 Comm: syz-executor1 Tainted: G B 4.20.0-rc6+ #354 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_invalid_free+0x64/0xa0 mm/kasan/report.c:336 __kasan_slab_free+0x13a/0x150 mm/kasan/kasan.c:501 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 skb_free_head+0x93/0xb0 net/core/skbuff.c:553 skb_release_data+0x706/0x990 net/core/skbuff.c:573 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] kfree_skb+0x1bb/0x580 net/core/skbuff.c:659 tipc_udp_send_msg+0x5af/0x680 net/tipc/udp_media.c:249 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:504 tipc_disc_timeout+0xb2b/0xfc0 net/tipc/discover.c:332 call_timer_fn+0x272/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e5/0xc70 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x308/0xb7e kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1cb/0x760 arch/x86/kernel/apic/apic.c:1061 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:761 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xaf/0xd0 kernel/locking/spinlock.c:184 Code: f0 00 72 89 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 28 48 83 3d 08 22 91 01 00 74 15 48 89 df 57 9d <0f> 1f 44 00 00 eb ad e8 0c 9e 1f f9 eb bb 0f 0b 0f 0b e8 ea 61 e2 RSP: 0018:ffff8881b9376de8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 0000000000000286 RCX: ffffc9000fe54000 RDX: 1ffffffff12e401e RSI: ffffffff8185acd4 RDI: 0000000000000286 RBP: ffff8881b9376df8 R08: ffff8881d8e24200 R09: fffffbfff130732c R10: fffffbfff130732c R11: ffffffff89839963 R12: ffffffff89839960 R13: 0000000000000000 R14: ffff8881c2d260d4 R15: ffff8881c2d260d4 spin_unlock_irqrestore include/linux/spinlock.h:384 [inline] kasan_end_report+0x32/0x4f mm/kasan/report.c:178 kasan_report_error mm/kasan/report.c:359 [inline] kasan_report.cold.8+0x76/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] refcount_read include/linux/refcount.h:43 [inline] skb_unref include/linux/skbuff.h:983 [inline] kfree_skb+0xb7/0x580 net/core/skbuff.c:655 tipc_udp_send_msg+0x5af/0x680 net/tipc/udp_media.c:249 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:504 tipc_enable_bearer+0xc5e/0xf10 net/tipc/bearer.c:329 __tipc_nl_bearer_enable+0x37c/0x4a0 net/tipc/bearer.c:900 tipc_nl_bearer_enable+0x22/0x30 net/tipc/bearer.c:908 genl_family_rcv_msg+0x8a7/0x11a0 net/netlink/genetlink.c:601 genl_rcv_msg+0xc6/0x168 net/netlink/genetlink.c:626 netlink_rcv_skb+0x16c/0x430 net/netlink/af_netlink.c:2477 genl_rcv+0x28/0x40 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x59f/0x750 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2116 __sys_sendmsg+0x11d/0x280 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457669 Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f41713d9c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457669 RDX: 0000000000000010 RSI: 00000000200003c0 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f41713da6d4 R13: 00000000004c4252 R14: 00000000004d71d0 R15: 00000000ffffffff Allocated by task 16409: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3684 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3698 __kmalloc_reserve.isra.41+0x41/0xe0 net/core/skbuff.c:140 __alloc_skb+0x155/0x760 net/core/skbuff.c:208 __pskb_copy_fclone+0x159/0xe80 net/core/skbuff.c:1390 __pskb_copy include/linux/skbuff.h:1067 [inline] pskb_copy include/linux/skbuff.h:2929 [inline] tipc_udp_send_msg+0x457/0x680 net/tipc/udp_media.c:241 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:504 tipc_disc_timeout+0xb2b/0xfc0 net/tipc/discover.c:332 call_timer_fn+0x272/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e5/0xc70 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x308/0xb7e kernel/softirq.c:292 Freed by task 16409: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 skb_free_head+0x93/0xb0 net/core/skbuff.c:553 skb_release_data+0x706/0x990 net/core/skbuff.c:573 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] kfree_skb+0x1bb/0x580 net/core/skbuff.c:659 tipc_udp_xmit.isra.14+0x41e/0xee0 net/tipc/udp_media.c:207 tipc_udp_send_msg+0x3a1/0x680 net/tipc/udp_media.c:247 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:504 tipc_disc_timeout+0xb2b/0xfc0 net/tipc/discover.c:332 call_timer_fn+0x272/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e5/0xc70 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x308/0xb7e kernel/softirq.c:292 The buggy address belongs to the object at ffff888192828dc0 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff888192828dc0, ffff8881928291c0) The buggy address belongs to the page: page:ffffea00064a0a00 count:1 mapcount:0 mapping:ffff8881da800ac0 index:0xffff888192829240 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0006635f08 ffffea00063d1408 ffff8881da800ac0 raw: ffff888192829240 ffff888192828040 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888192828c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888192828d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888192828d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888192828e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888192828e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================