syzbot


KASAN: use-after-free Read in ipvlan_queue_xmit (2)

Status: upstream: reported C repro on 2021/05/18 15:37
Reported-by: syzbot+efee3dc8792f4e1b8242@syzkaller.appspotmail.com
First crash: 1299d, last: 830d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in ipvlan_queue_xmit net 1 1739d 1739d 0/28 closed as invalid on 2020/05/30 17:14
upstream KASAN: use-after-free Read in ipvlan_queue_xmit (2) net 1 1556d 1556d 0/28 auto-closed as invalid on 2020/12/01 23:50
linux-4.19 KASAN: use-after-free Read in ipvlan_queue_xmit 1 1454d 1454d 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 856d 1453d 22/28 fixed on 2023/02/24 13:51
linux-4.14 KASAN: use-after-free Read in ipvlan_queue_xmit C 2 657d 1484d 0/1 upstream: reported C repro on 2020/11/14 09:46
linux-4.14 KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit C error 1 830d 830d 0/1 upstream: reported C repro on 2022/08/30 13:48
upstream KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit net C error error 8 1015d 1492d 22/28 fixed on 2023/02/24 13:50
upstream Internal error in ipvlan_queue_xmit net 3 397d 429d 0/28 auto-obsoleted due to no activity on 2024/02/04 03:58
linux-4.19 KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit C error 4 668d 1468d 0/1 upstream: reported C repro on 2020/11/30 08:36
upstream KMSAN: uninit-value in ipvlan_queue_xmit net C 2 830d 1413d 22/28 fixed on 2023/02/24 13:50
upstream KMSAN: uninit-value in ipvlan_queue_xmit (2) net C 2 272d 233d 25/28 fixed on 2024/05/22 23:26
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2021/10/15 17:30 11m bisect fix linux-4.19.y error job log
2021/09/15 17:07 22m bisect fix linux-4.19.y OK (0) job log log
2021/08/16 16:42 24m bisect fix linux-4.19.y OK (0) job log log
2021/07/17 16:14 27m bisect fix linux-4.19.y OK (0) job log log
2021/06/17 15:36 23m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready
batman_adv: batadv0: Interface activated: batadv_slave_1
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:605 [inline]
BUG: KASAN: use-after-free in ipvlan_queue_xmit+0x9d2/0x18e0 drivers/net/ipvlan/ipvlan_core.c:651
Read of size 4 at addr ffff8880aac32cff by task syz-executor303/8134

CPU: 0 PID: 8134 Comm: syz-executor303 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432
 ether_addr_equal include/linux/etherdevice.h:321 [inline]
 ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:605 [inline]
 ipvlan_queue_xmit+0x9d2/0x18e0 drivers/net/ipvlan/ipvlan_core.c:651
 ipvlan_start_xmit+0x4f/0x190 drivers/net/ipvlan/ipvlan_main.c:290
 __netdev_start_xmit include/linux/netdevice.h:4349 [inline]
 netdev_start_xmit include/linux/netdevice.h:4363 [inline]
 dev_direct_xmit+0x3f9/0x6d0 net/core/dev.c:3905
 packet_snd net/packet/af_packet.c:2988 [inline]
 packet_sendmsg+0x25ae/0x7720 net/packet/af_packet.c:3013
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 __sys_sendto+0x21a/0x320 net/socket.c:1899
 __do_sys_sendto net/socket.c:1911 [inline]
 __se_sys_sendto net/socket.c:1907 [inline]
 __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1907
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f925b4f69b9
Code: 28 c3 e8 aa 15 00 00 66 2e 0f 1f 84 00 00 00 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe8c619388 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f925b579e90 RCX: 00007f925b4f69b9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 0000000000000003 R08: 00000000200000c0 R09: 0000000000000014
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe8c6193f0
R13: 00007ffe8c619420 R14: 00007ffe8c619400 R15: 0000000000000001

Allocated by task 6348:
 kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
 getname_flags+0xce/0x590 fs/namei.c:140
 user_path_at_empty+0x2a/0x50 fs/namei.c:2609
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0x113/0x210 fs/stat.c:185
 vfs_stat include/linux/fs.h:3132 [inline]
 __do_sys_newstat fs/stat.c:337 [inline]
 __se_sys_newstat+0x96/0x120 fs/stat.c:333
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 6348:
 __cache_free mm/slab.c:3503 [inline]
 kmem_cache_free+0x7f/0x260 mm/slab.c:3765
 putname+0xe1/0x120 fs/namei.c:261
 filename_lookup+0x3d0/0x5a0 fs/namei.c:2358
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0x113/0x210 fs/stat.c:185
 vfs_stat include/linux/fs.h:3132 [inline]
 __do_sys_newstat fs/stat.c:337 [inline]
 __se_sys_newstat+0x96/0x120 fs/stat.c:333
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880aac32a00
 which belongs to the cache names_cache of size 4096
The buggy address is located 767 bytes inside of
 4096-byte region [ffff8880aac32a00, ffff8880aac33a00)
The buggy address belongs to the page:
page:ffffea0002ab0c80 count:1 mapcount:0 mapping:ffff88823b843380 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002ab1388 ffffea0002ab9208 ffff88823b843380
raw: 0000000000000000 ffff8880aac32a00 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880aac32b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880aac32c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880aac32c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                                ^
 ffff8880aac32d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880aac32d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/30 10:20 linux-4.19.y 3f8a27f9e27b 4a380809 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in ipvlan_queue_xmit
2021/05/18 15:36 linux-4.19.y 3c8c23092588 a343ba6b .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in ipvlan_queue_xmit
* Struck through repros no longer work on HEAD.