syzbot


KASAN: use-after-free Read in ipvlan_queue_xmit

Status: upstream: reported C repro on 2020/11/14 09:46
Reported-by: syzbot+7c0ed21eeb1e307756cc@syzkaller.appspotmail.com
First crash: 1316d, last: 489d
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 net 1 1570d 1570d 0/27 closed as invalid on 2020/05/30 17:14
upstream KASAN: use-after-free Read in ipvlan_queue_xmit (2) net 1 1388d 1388d 0/27 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 662d 1131d 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 1286d 1286d 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 688d 1285d 22/27 fixed on 2023/02/24 13:51
Fix bisection attempts (25)
Created Duration User Patch Repo Result
2023/02/19 05:32 35m bisect fix linux-4.14.y job log (0) log
2023/01/19 23:08 21m bisect fix linux-4.14.y job log (0) log
2022/10/26 20:44 23m bisect fix linux-4.14.y job log (0) log
2022/09/17 08:55 21m bisect fix linux-4.14.y job log (0) log
2022/08/18 07:26 22m bisect fix linux-4.14.y job log (0) log
2022/07/19 06:54 21m bisect fix linux-4.14.y job log (0) log
2022/06/19 06:19 21m bisect fix linux-4.14.y job log (0) log
2022/05/20 05:50 29m bisect fix linux-4.14.y job log (0) log
2022/04/20 05:29 20m bisect fix linux-4.14.y job log (0) log
2022/03/20 22:38 22m bisect fix linux-4.14.y job log (0) log
2022/02/18 22:14 23m bisect fix linux-4.14.y job log (0) log
2022/01/19 21:48 26m bisect fix linux-4.14.y job log (0) log
2021/12/20 21:05 25m bisect fix linux-4.14.y job log (0) log
2021/11/20 20:17 24m bisect fix linux-4.14.y job log (0) log
2021/10/21 19:52 24m bisect fix linux-4.14.y job log (0) log
2021/09/21 19:00 26m bisect fix linux-4.14.y job log (0) log
2021/08/22 16:03 28m bisect fix linux-4.14.y job log (0) log
2021/07/23 15:37 25m bisect fix linux-4.14.y job log (0) log
2021/06/23 15:17 20m bisect fix linux-4.14.y job log (0) log
2021/05/24 14:49 27m bisect fix linux-4.14.y job log (0) log
2021/04/24 12:59 28m bisect fix linux-4.14.y job log (0) log
2021/03/25 05:57 20m bisect fix linux-4.14.y job log (0) log
2021/02/23 05:36 20m bisect fix linux-4.14.y job log (0) log
2021/02/19 02:38 18m bisect fix linux-4.14.y error job log (0)
2021/01/18 14:34 22m bisect fix linux-4.14.y job log (0) log

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready
batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
==================================================================
BUG: KASAN: use-after-free in ether_addr_equal include/linux/etherdevice.h:321 [inline]
BUG: KASAN: use-after-free in ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:542 [inline]
BUG: KASAN: use-after-free in ipvlan_queue_xmit+0x1323/0x15a0 drivers/net/ipvlan/ipvlan_core.c:583
Read of size 4 at addr ffff8880b08e4abf by task syz-executor717/7972

CPU: 0 PID: 7972 Comm: syz-executor717 Not tainted 4.14.212-syzkaller #0
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+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429
 ether_addr_equal include/linux/etherdevice.h:321 [inline]
 ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:542 [inline]
 ipvlan_queue_xmit+0x1323/0x15a0 drivers/net/ipvlan/ipvlan_core.c:583
 ipvlan_start_xmit+0x4f/0x180 drivers/net/ipvlan/ipvlan_main.c:286
 __netdev_start_xmit include/linux/netdevice.h:4039 [inline]
 netdev_start_xmit include/linux/netdevice.h:4048 [inline]
 packet_direct_xmit+0x410/0x610 net/packet/af_packet.c:269
 packet_snd+0x1393/0x21e0 net/packet/af_packet.c:3024
 packet_sendmsg+0x1139/0x2aca net/packet/af_packet.c:3049
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 sock_write_iter+0x22c/0x370 net/socket.c:925
 call_write_iter include/linux/fs.h:1778 [inline]
 aio_write+0x2ed/0x560 fs/aio.c:1553
 io_submit_one fs/aio.c:1641 [inline]
 do_io_submit+0x847/0x1570 fs/aio.c:1709
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x449669
RSP: 002b:00007fff4ee97858 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000449669
RDX: 0000000020000080 RSI: 0000000000000001 RDI: 00007facdef08000
RBP: 00316e616c767069 R08: 00000000000000ff R09: 00000000000000ff
R10: 00000000000000ff R11: 0000000000000246 R12: 00007fff4ee978e0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

The buggy address belongs to the page:
page:ffffea0002c23900 count:0 mapcount:0 mapping:          (null) index:0xffff8880b08e4400
flags: 0xfff00000000000()
raw: 00fff00000000000 0000000000000000 ffff8880b08e4400 00000000ffffffff
raw: dead000000000100 dead000000000200 ffff88823f8bb200 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b08e4980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880b08e4a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880b08e4a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                        ^
 ffff8880b08e4b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880b08e4b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/19 08:50 linux-4.14.y 3f2ecb86cb90 04201c06 .config console log report syz C ci2-linux-4-14
2020/11/14 09:45 linux-4.14.y 27ce4f2a6817 1bf9a662 .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.