================================================================== BUG: KASAN: use-after-free in __tcp_hdrlen include/linux/tcp.h:35 [inline] BUG: KASAN: use-after-free in tcp_hdrlen include/linux/tcp.h:40 [inline] BUG: KASAN: use-after-free in qdisc_pkt_len_init net/core/dev.c:3171 [inline] BUG: KASAN: use-after-free in __dev_queue_xmit+0x297c/0x2b50 net/core/dev.c:3477 Read of size 2 at addr ffff8801d67e52d8 by task syz-executor7/7049 CPU: 0 PID: 7049 Comm: syz-executor7 Not tainted 4.15.0-rc6-mm1+ #52 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+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23b/0x360 mm/kasan/report.c:412 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:431 __tcp_hdrlen include/linux/tcp.h:35 [inline] tcp_hdrlen include/linux/tcp.h:40 [inline] qdisc_pkt_len_init net/core/dev.c:3171 [inline] __dev_queue_xmit+0x297c/0x2b50 net/core/dev.c:3477 dev_queue_xmit+0x17/0x20 net/core/dev.c:3566 packet_snd net/packet/af_packet.c:2944 [inline] packet_sendmsg+0x3aed/0x60b0 net/packet/af_packet.c:2969 sock_sendmsg_nosec net/socket.c:628 [inline] sock_sendmsg+0xca/0x110 net/socket.c:638 sock_write_iter+0x31a/0x5d0 net/socket.c:907 call_write_iter include/linux/fs.h:1775 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x23/0x9a RIP: 0033:0x452ac9 RSP: 002b:00007f67d20a0c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452ac9 RDX: 0000000000000062 RSI: 00000000202a3f5e RDI: 0000000000000015 RBP: 000000000000034b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2fa8 R13: 00000000ffffffff R14: 00007f67d20a16d4 R15: 0000000000000000 Allocated by task 5434: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 __do_kmalloc_node mm/slab.c:3669 [inline] __kmalloc_node_track_caller+0x47/0x70 mm/slab.c:3683 __kmalloc_reserve.isra.39+0x41/0xd0 net/core/skbuff.c:137 __alloc_skb+0x13b/0x780 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:983 [inline] alloc_skb_with_frags+0x10d/0x750 net/core/skbuff.c:5151 sock_alloc_send_pskb+0x787/0x9b0 net/core/sock.c:2088 unix_dgram_sendmsg+0x52d/0x1610 net/unix/af_unix.c:1682 unix_seqpacket_sendmsg+0xf3/0x160 net/unix/af_unix.c:2063 sock_sendmsg_nosec net/socket.c:628 [inline] sock_sendmsg+0xca/0x110 net/socket.c:638 ___sys_sendmsg+0x320/0x8b0 net/socket.c:2018 __sys_sendmmsg+0x1ee/0x620 net/socket.c:2108 SYSC_sendmmsg net/socket.c:2139 [inline] SyS_sendmmsg+0x35/0x60 net/socket.c:2134 entry_SYSCALL_64_fastpath+0x23/0x9a Freed by task 5434: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kfree+0xd9/0x260 mm/slab.c:3800 skb_free_head+0x74/0xb0 net/core/skbuff.c:550 skb_release_data+0x58c/0x790 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] kfree_skb+0x15d/0x4c0 net/core/skbuff.c:659 unix_dgram_sendmsg+0xcbd/0x1610 net/unix/af_unix.c:1819 unix_seqpacket_sendmsg+0xf3/0x160 net/unix/af_unix.c:2063 sock_sendmsg_nosec net/socket.c:628 [inline] sock_sendmsg+0xca/0x110 net/socket.c:638 ___sys_sendmsg+0x320/0x8b0 net/socket.c:2018 __sys_sendmmsg+0x1ee/0x620 net/socket.c:2108 SYSC_sendmmsg net/socket.c:2139 [inline] SyS_sendmmsg+0x35/0x60 net/socket.c:2134 entry_SYSCALL_64_fastpath+0x23/0x9a The buggy address belongs to the object at ffff8801d67e5280 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 88 bytes inside of 512-byte region [ffff8801d67e5280, ffff8801d67e5480) The buggy address belongs to the page: page:ffffea000759f940 count:1 mapcount:0 mapping:ffff8801d67e5000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801d67e5000 0000000000000000 0000000100000006 raw: ffffea000759f920 ffffea000759f9a0 ffff8801dac00940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d67e5180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801d67e5200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801d67e5280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d67e5300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d67e5380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================