================================================================== BUG: KASAN: use-after-free in atomic_sub_return include/asm-generic/atomic-instrumented.h:159 [inline] BUG: KASAN: use-after-free in skb_release_data+0x113/0x8b0 net/core/skbuff.c:599 Write of size 4 at addr ffff88809386cce0 by task syz-executor.3/30849 CPU: 1 PID: 30849 Comm: syz-executor.3 Not tainted 5.7.0-rc7-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:382 __kasan_report.cold+0x20/0x38 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x141/0x190 mm/kasan/generic.c:192 atomic_sub_return include/asm-generic/atomic-instrumented.h:159 [inline] skb_release_data+0x113/0x8b0 net/core/skbuff.c:599 skb_release_all+0x46/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] kfree_skb net/core/skbuff.c:696 [inline] kfree_skb+0xfa/0x410 net/core/skbuff.c:690 sit_tunnel_xmit net/ipv6/sit.c:1094 [inline] sit_tunnel_xmit+0x351/0x27c0 net/ipv6/sit.c:1068 __netdev_start_xmit include/linux/netdevice.h:4607 [inline] netdev_start_xmit include/linux/netdevice.h:4621 [inline] xmit_one net/core/dev.c:3545 [inline] dev_hard_start_xmit+0x1a4/0x9b0 net/core/dev.c:3561 __dev_queue_xmit+0x25e1/0x30a0 net/core/dev.c:4120 packet_sendmsg_spkt+0xdf6/0x1420 net/packet/af_packet.c:1992 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e6/0x810 net/socket.c:2352 ___sys_sendmsg+0x100/0x170 net/socket.c:2406 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45ca69 Code: 0d b7 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 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fb8938c7c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000500dc0 RCX: 000000000045ca69 RDX: 0000000030000010 RSI: 0000000020016b80 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009fd R14: 00000000004ccd99 R15: 00007fb8938c86d4 Allocated by task 30849: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 __kmalloc_reserve.isra.0+0x39/0xe0 net/core/skbuff.c:142 __alloc_skb+0xef/0x5a0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1083 [inline] sock_wmalloc+0xd0/0x120 net/core/sock.c:2205 packet_sendmsg_spkt+0x499/0x1420 net/packet/af_packet.c:1939 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e6/0x810 net/socket.c:2352 ___sys_sendmsg+0x100/0x170 net/socket.c:2406 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 30849: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 skb_free_head+0x8b/0xa0 net/core/skbuff.c:590 skb_release_data+0x42e/0x8b0 net/core/skbuff.c:610 skb_release_all+0x46/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0xf3/0x400 net/core/skbuff.c:831 packet_rcv+0xec/0x13e0 net/packet/af_packet.c:2154 dev_queue_xmit_nit+0x7e6/0xaa0 net/core/dev.c:2344 xmit_one net/core/dev.c:3541 [inline] dev_hard_start_xmit+0xbb/0x9b0 net/core/dev.c:3561 __dev_queue_xmit+0x25e1/0x30a0 net/core/dev.c:4120 packet_sendmsg_spkt+0xdf6/0x1420 net/packet/af_packet.c:1992 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e6/0x810 net/socket.c:2352 ___sys_sendmsg+0x100/0x170 net/socket.c:2406 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff88809386cc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 224 bytes inside of 512-byte region [ffff88809386cc00, ffff88809386ce00) The buggy address belongs to the page: page:ffffea00024e1b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027dc148 ffffea00027beec8 ffff8880aa000a80 raw: 0000000000000000 ffff88809386c000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809386cb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809386cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809386cc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809386cd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809386cd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================