syzbot


KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit

Status: upstream: reported C repro on 2022/08/30 13:48
Reported-by: syzbot+ec1a3196612411080dbc@syzkaller.appspotmail.com
First crash: 636d, last: 636d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit net C error error 8 821d 1298d 22/26 fixed on 2023/02/24 13:50
linux-4.19 KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit C error 4 474d 1274d 0/1 upstream: reported C repro on 2020/11/30 08:36
upstream Internal error in ipvlan_queue_xmit net 3 204d 236d 0/26 auto-obsoleted due to no activity on 2024/02/04 03:58
upstream KMSAN: uninit-value in ipvlan_queue_xmit net C 2 637d 1219d 22/26 fixed on 2023/02/24 13:50
upstream KMSAN: uninit-value in ipvlan_queue_xmit (2) net C 2 79d 40d 26/26 fixed on 2024/05/22 23:26
linux-4.19 KASAN: use-after-free Read in ipvlan_queue_xmit (2) C error 2 636d 1105d 0/1 upstream: reported C repro on 2021/05/18 15:37
upstream KASAN: use-after-free Read in ipvlan_queue_xmit (3) net C error error 8 662d 1260d 22/26 fixed on 2023/02/24 13:51
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/03/06 19:32 1m retest repro linux-4.14.y error OK

Sample crash report:
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
IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
==================================================================
BUG: KASAN: slab-out-of-bounds in ether_addr_equal include/linux/etherdevice.h:321 [inline]
BUG: KASAN: slab-out-of-bounds in ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:542 [inline]
BUG: KASAN: slab-out-of-bounds in ipvlan_queue_xmit+0x1323/0x15a0 drivers/net/ipvlan/ipvlan_core.c:583
Read of size 4 at addr ffff8880b024dc7f by task syz-executor308/7955

CPU: 1 PID: 7955 Comm: syz-executor308 Not tainted 4.14.291-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 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:4054 [inline]
 netdev_start_xmit include/linux/netdevice.h:4063 [inline]
 packet_direct_xmit+0x410/0x610 net/packet/af_packet.c:269
 packet_snd+0x13aa/0x26f0 net/packet/af_packet.c:3032
 packet_sendmsg+0x12ed/0x33a0 net/packet/af_packet.c:3061
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 SYSC_sendto net/socket.c:1763 [inline]
 SyS_sendto+0x1c7/0x2c0 net/socket.c:1731
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f66a6a59d79
RSP: 002b:00007ffcdf89c728 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007ffcdf89c748 RCX: 00007f66a6a59d79
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 0000000000000003 R08: 00000000200000c0 R09: 0000000000000014
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcdf89c770
R13: 00007ffcdf89c770 R14: 00007f66a6a9c3be R15: 00007ffcdf89c750

Allocated by task 6222:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
 getname_flags+0xc8/0x550 fs/namei.c:138
 getname fs/namei.c:209 [inline]
 SYSC_renameat2 fs/namei.c:4571 [inline]
 SyS_renameat2+0x17b/0xad0 fs/namei.c:4535
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 6222:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
 putname+0xcd/0x110 fs/namei.c:259
 SYSC_renameat2 fs/namei.c:4665 [inline]
 SyS_renameat2+0x214/0xad0 fs/namei.c:4535
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff8880b024c340
 which belongs to the cache names_cache of size 4096
The buggy address is located 2367 bytes to the right of
 4096-byte region [ffff8880b024c340, ffff8880b024d340)
The buggy address belongs to the page:
page:ffffea0002c09300 count:1 mapcount:0 mapping:ffff8880b024c340 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880b024c340 0000000000000000 0000000100000001
raw: ffffea0002cd0c20 ffffea0002bd3020 ffff88823f8c1200 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b024db00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880b024db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880b024dc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
 ffff8880b024dc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880b024dd00: 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
2022/08/30 13:47 linux-4.14.y e548869f356f 4a380809 .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
* Struck through repros no longer work on HEAD.