syzbot


KASAN: use-after-free Read in ipvlan_queue_xmit

Status: closed as invalid on 2020/05/30 17:14
Subsystems: net
[Documentation on labels]
First crash: 1550d, last: 1550d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in ipvlan_queue_xmit (2) net 1 1367d 1367d 0/26 auto-closed as invalid on 2020/12/01 23:50
linux-4.19 KASAN: use-after-free Read in ipvlan_queue_xmit (2) C error 2 641d 1110d 0/1 upstream: reported C repro on 2021/05/18 15:37
linux-4.19 KASAN: use-after-free Read in ipvlan_queue_xmit 1 1265d 1265d 0/1 auto-closed as invalid on 2021/04/13 03:52
upstream KASAN: use-after-free Read in ipvlan_queue_xmit (3) net C error error 8 667d 1264d 22/26 fixed on 2023/02/24 13:51
linux-4.14 KASAN: use-after-free Read in ipvlan_queue_xmit C 2 468d 1295d 0/1 upstream: reported C repro on 2020/11/14 09:46

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in is_multicast_ether_addr include/linux/etherdevice.h:118 [inline]
BUG: KASAN: use-after-free in ipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:502 [inline]
BUG: KASAN: use-after-free in ipvlan_xmit_mode_l3 drivers/net/ipvlan/ipvlan_core.c:584 [inline]
BUG: KASAN: use-after-free in ipvlan_queue_xmit+0x14ea/0x17d0 drivers/net/ipvlan/ipvlan_core.c:647
Read of size 4 at addr ffff8880939a0fff by task syz-executor.3/13976

CPU: 1 PID: 13976 Comm: syz-executor.3 Not tainted 5.6.0-rc2-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+0x197/0x210 lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506
 kasan_report+0x12/0x20 mm/kasan/common.c:641
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:134
 is_multicast_ether_addr include/linux/etherdevice.h:118 [inline]
 ipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:502 [inline]
 ipvlan_xmit_mode_l3 drivers/net/ipvlan/ipvlan_core.c:584 [inline]
 ipvlan_queue_xmit+0x14ea/0x17d0 drivers/net/ipvlan/ipvlan_core.c:647
 ipvlan_start_xmit+0x50/0x190 drivers/net/ipvlan/ipvlan_main.c:210
 __netdev_start_xmit include/linux/netdevice.h:4523 [inline]
 netdev_start_xmit include/linux/netdevice.h:4537 [inline]
 dev_direct_xmit+0x419/0x630 net/core/dev.c:4116
 packet_direct_xmit+0x1a9/0x250 net/packet/af_packet.c:240
 packet_snd net/packet/af_packet.c:2967 [inline]
 packet_sendmsg+0x25f7/0x6210 net/packet/af_packet.c:2992
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:672
 __sys_sendto+0x262/0x380 net/socket.c:1998
 __do_sys_sendto net/socket.c:2010 [inline]
 __se_sys_sendto net/socket.c:2006 [inline]
 __x64_sys_sendto+0xe1/0x1a0 net/socket.c:2006
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c479
Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f8e79fb7c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f8e79fb86d4 RCX: 000000000045c479
RDX: 000000000000000e RSI: 0000000020000080 RDI: 0000000000000004
RBP: 000000000076bfc0 R08: 00000000200000c0 R09: 0000000000000014
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000a0b R14: 00000000004cc806 R15: 000000000076bfcc

Allocated by task 8385:
 save_stack+0x23/0x90 mm/kasan/common.c:72
 set_track mm/kasan/common.c:80 [inline]
 __kasan_kmalloc mm/kasan/common.c:515 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488
 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529
 __do_kmalloc_node mm/slab.c:3616 [inline]
 __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3630
 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:142
 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:210
 alloc_skb include/linux/skbuff.h:1081 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:324 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:376 [inline]
 nsim_dev_trap_report_work+0x25c/0xaf0 drivers/net/netdevsim/dev.c:415
 process_one_work+0xa05/0x17a0 kernel/workqueue.c:2264
 worker_thread+0x98/0xe40 kernel/workqueue.c:2410
 kthread+0x361/0x430 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

Freed by task 8385:
 save_stack+0x23/0x90 mm/kasan/common.c:72
 set_track mm/kasan/common.c:80 [inline]
 kasan_set_free_info mm/kasan/common.c:337 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485
 __cache_free mm/slab.c:3426 [inline]
 kfree+0x10a/0x2c0 mm/slab.c:3757
 skb_free_head+0x93/0xb0 net/core/skbuff.c:590
 skb_release_data+0x43c/0x8b0 net/core/skbuff.c:610
 skb_release_all+0x4d/0x60 net/core/skbuff.c:664
 __kfree_skb net/core/skbuff.c:678 [inline]
 consume_skb net/core/skbuff.c:837 [inline]
 consume_skb+0xfb/0x410 net/core/skbuff.c:831
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:390 [inline]
 nsim_dev_trap_report_work+0x7cb/0xaf0 drivers/net/netdevsim/dev.c:415
 process_one_work+0xa05/0x17a0 kernel/workqueue.c:2264
 worker_thread+0x98/0xe40 kernel/workqueue.c:2410
 kthread+0x361/0x430 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

The buggy address belongs to the object at ffff8880939a0000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 4095 bytes inside of
 4096-byte region [ffff8880939a0000, ffff8880939a1000)
The buggy address belongs to the page:
page:ffffea00024e6800 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0
flags: 0xfffe0000010200(slab|head)
raw: 00fffe0000010200 ffffea00025e6708 ffffea0001686a08 ffff8880aa402000
raw: 0000000000000000 ffff8880939a0000 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880939a0e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880939a0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880939a0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                                ^
 ffff8880939a1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880939a1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/04 17:32 net-next-old 3b3e808cd883 c88c7b75 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.