================================================================== BUG: KASAN: use-after-free in batadv_interface_tx+0x160a/0x18b0 net/batman-adv/soft-interface.c:226 Read of size 2 at addr ffff888098e960cb by task syz-executor1/4078 CPU: 1 PID: 4078 Comm: syz-executor1 Not tainted 4.20.0-rc7+ #361 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+0x1d3/0x2c6 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:443 batadv_interface_tx+0x160a/0x18b0 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+0x36c/0x6a0 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+0x298a/0x6ad0 net/packet/af_packet.c:2957 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 __sys_sendto+0x3d7/0x670 net/socket.c:1788 __do_sys_sendto net/socket.c:1800 [inline] __se_sys_sendto net/socket.c:1796 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1796 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4579b9 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:00007f2495359c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000004579b9 RDX: 000000000000000e RSI: 0000000020000180 RDI: 0000000000000006 RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f249535a6d4 R13: 00000000004c4e37 R14: 00000000004d8640 R15: 00000000ffffffff Allocated by task 3912: 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 alloc_skb include/linux/skbuff.h:1011 [inline] alloc_skb_with_frags+0x133/0x7c0 net/core/skbuff.c:5288 sock_alloc_send_pskb+0x865/0xab0 net/core/sock.c:2091 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2108 __ip_append_data.isra.50+0x1b7e/0x3310 net/ipv4/ip_output.c:998 ip_append_data.part.52+0xef/0x170 net/ipv4/ip_output.c:1220 ip_append_data+0x6d/0x90 net/ipv4/ip_output.c:1209 icmp_push_reply+0x18e/0x510 net/ipv4/icmp.c:375 icmp_send+0x151c/0x1bb0 net/ipv4/icmp.c:736 __udp4_lib_rcv+0x2412/0x3230 net/ipv4/udp.c:2313 udp_rcv+0x21/0x30 net/ipv4/udp.c:2472 ip_protocol_deliver_rcu+0xb6/0xa20 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x234/0x380 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x1e9/0x750 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1f9/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xed/0x600 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5083 process_backlog+0x217/0x760 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x7c5/0x1950 net/core/dev.c:6412 __do_softirq+0x30c/0xb2e kernel/softirq.c:292 Freed by task 3912: 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] consume_skb+0x1b6/0x570 net/core/skbuff.c:701 icmp_rcv+0xf72/0x1630 net/ipv4/icmp.c:1068 ip_protocol_deliver_rcu+0xb6/0xa20 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x234/0x380 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x1e9/0x750 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1f9/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xed/0x600 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5083 process_backlog+0x217/0x760 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x7c5/0x1950 net/core/dev.c:6412 __do_softirq+0x30c/0xb2e kernel/softirq.c:292 The buggy address belongs to the object at ffff888098e96040 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 139 bytes inside of 224-byte region [ffff888098e96040, ffff888098e96120) The buggy address belongs to the page: page:ffffea000263a580 count:1 mapcount:0 mapping:ffff88821b70d0c0 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000172aa88 ffffea0001bedf08 ffff88821b70d0c0 raw: 0000000000000000 ffff888098e96040 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888098e95f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888098e96000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888098e96080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888098e96100: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff888098e96180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================