================================================================== BUG: KASAN: slab-out-of-bounds in batadv_interface_tx+0x1194/0x1880 net/batman-adv/soft-interface.c:226 Read of size 2 at addr ffff88808feb878b by task syz-executor1/20849 CPU: 0 PID: 20849 Comm: syz-executor1 Not tainted 4.20.0+ #18 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+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/generic_report.c:145 batadv_interface_tx+0x1194/0x1880 net/batman-adv/soft-interface.c:226 __netdev_start_xmit include/linux/netdevice.h:4382 [inline] netdev_start_xmit include/linux/netdevice.h:4391 [inline] dev_direct_xmit+0x368/0x670 net/core/dev.c:3930 packet_direct_xmit+0xfb/0x170 net/packet/af_packet.c:246 packet_snd net/packet/af_packet.c:2932 [inline] packet_sendmsg+0x2754/0x6860 net/packet/af_packet.c:2957 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:631 ___sys_sendmsg+0x409/0x910 net/socket.c:2116 __sys_sendmmsg+0x246/0x6f0 net/socket.c:2211 __do_sys_sendmmsg net/socket.c:2240 [inline] __se_sys_sendmmsg net/socket.c:2237 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2237 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457ec9 Code: 6d 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 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ff5d3e19c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000457ec9 RDX: 0000000000000001 RSI: 0000000020008a80 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff5d3e1a6d4 R13: 00000000004c4ce5 R14: 00000000004d85d8 R15: 00000000ffffffff Allocated by task 8102: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] kasan_kmalloc mm/kasan/common.c:482 [inline] kasan_kmalloc+0xcf/0xe0 mm/kasan/common.c:455 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:397 kmem_cache_alloc_node+0x144/0x710 mm/slab.c:3631 __alloc_skb+0xf4/0x730 net/core/skbuff.c:196 alloc_skb_fclone include/linux/skbuff.h:1053 [inline] sk_stream_alloc_skb+0x147/0x9b0 net/ipv4/tcp.c:874 tcp_sendmsg_locked+0xe6e/0x3e80 net/ipv4/tcp.c:1286 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1443 inet_sendmsg+0x1af/0x740 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:631 sock_write_iter+0x379/0x5e0 net/socket.c:900 call_write_iter include/linux/fs.h:1862 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x764/0xb40 fs/read_write.c:487 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0x105/0x260 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8102: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:444 kasan_slab_free+0xe/0x10 mm/kasan/common.c:452 __cache_free mm/slab.c:3485 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3747 kfree_skbmem+0x100/0x230 net/core/skbuff.c:606 __kfree_skb net/core/skbuff.c:642 [inline] consume_skb net/core/skbuff.c:701 [inline] consume_skb+0x194/0x550 net/core/skbuff.c:695 __dev_kfree_skb_any+0xa4/0xd0 net/core/dev.c:2813 dev_consume_skb_any include/linux/netdevice.h:3591 [inline] free_old_xmit_skbs+0xca/0x200 drivers/net/virtio_net.c:1346 start_xmit+0x1b4/0x17c0 drivers/net/virtio_net.c:1517 __netdev_start_xmit include/linux/netdevice.h:4382 [inline] netdev_start_xmit include/linux/netdevice.h:4391 [inline] xmit_one net/core/dev.c:3278 [inline] dev_hard_start_xmit+0x261/0xc70 net/core/dev.c:3294 sch_direct_xmit+0x452/0x1100 net/sched/sch_generic.c:327 qdisc_restart net/sched/sch_generic.c:390 [inline] __qdisc_run+0x606/0x19d0 net/sched/sch_generic.c:398 qdisc_run include/net/pkt_sched.h:121 [inline] qdisc_run include/net/pkt_sched.h:118 [inline] __dev_xmit_skb net/core/dev.c:3473 [inline] __dev_queue_xmit+0x29d0/0x3a60 net/core/dev.c:3832 dev_queue_xmit+0x18/0x20 net/core/dev.c:3897 neigh_hh_output include/net/neighbour.h:498 [inline] neigh_output include/net/neighbour.h:506 [inline] ip_finish_output2+0x11f1/0x1a00 net/ipv4/ip_output.c:229 ip_finish_output+0x7e4/0xf60 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_output+0x226/0x880 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:444 [inline] ip_local_out+0xc4/0x1b0 net/ipv4/ip_output.c:124 __ip_queue_xmit+0x99a/0x1ee0 net/ipv4/ip_output.c:505 ip_queue_xmit+0x5a/0x70 include/net/ip.h:198 __tcp_transmit_skb+0x1add/0x3af0 net/ipv4/tcp_output.c:1160 tcp_transmit_skb net/ipv4/tcp_output.c:1176 [inline] tcp_write_xmit+0x108a/0x5bb0 net/ipv4/tcp_output.c:2401 __tcp_push_pending_frames+0xb4/0x350 net/ipv4/tcp_output.c:2577 tcp_push+0x632/0x8c0 net/ipv4/tcp.c:735 tcp_sendmsg_locked+0x2f79/0x3e80 net/ipv4/tcp.c:1406 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1443 inet_sendmsg+0x1af/0x740 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:631 sock_write_iter+0x379/0x5e0 net/socket.c:900 call_write_iter include/linux/fs.h:1862 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x764/0xb40 fs/read_write.c:487 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0x105/0x260 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808feb8540 which belongs to the cache skbuff_fclone_cache of size 456 The buggy address is located 131 bytes to the right of 456-byte region [ffff88808feb8540, ffff88808feb8708) The buggy address belongs to the page: page:ffffea00023fae00 count:1 mapcount:0 mapping:ffff88821b6ae240 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00028029c8 ffffea0002658a48 ffff88821b6ae240 raw: 0000000000000000 ffff88808feb8040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808feb8680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808feb8700: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808feb8780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff88808feb8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808feb8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================