syzbot


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

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Fix commit: 81225b2ea161 ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header
First crash: 1267d, last: 790d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: failed (error log, bisect log)
  
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit C error 1 605d 605d 0/1 upstream: reported C repro on 2022/08/30 13:48
linux-4.19 KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit C error 4 444d 1244d 0/1 upstream: reported C repro on 2020/11/30 08:36
upstream Internal error in ipvlan_queue_xmit net 3 173d 205d 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 606d 1189d 22/26 fixed on 2023/02/24 13:50
upstream KMSAN: uninit-value in ipvlan_queue_xmit (2) net C 2 48d 9d03h 2/26 upstream: reported C repro on 2024/04/18 07:05
linux-4.19 KASAN: use-after-free Read in ipvlan_queue_xmit (2) C error 2 606d 1074d 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 631d 1229d 22/26 fixed on 2023/02/24 13:51
Last patch testing requests (5)
Created Duration User Patch Repo Result
2022/09/30 15:30 16m retest repro upstream OK log
2022/09/30 12:30 16m retest repro upstream OK log
2022/09/17 11:29 10m retest repro net-next-old report log
2022/09/17 08:29 10m retest repro net-next-old report log
2022/09/16 20:29 16m retest repro net-old OK log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in ether_addr_equal include/linux/etherdevice.h:329 [inline]
BUG: KASAN: slab-out-of-bounds in ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:599 [inline]
BUG: KASAN: slab-out-of-bounds in ipvlan_queue_xmit+0x158f/0x18a0 drivers/net/ipvlan/ipvlan_core.c:645
Read of size 4 at addr ffff888023e137ff by task syz-executor749/8604

CPU: 0 PID: 8604 Comm: syz-executor749 Not tainted 5.12.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x141/0x1d7 lib/dump_stack.c:120
 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232
 __kasan_report mm/kasan/report.c:399 [inline]
 kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416
 ether_addr_equal include/linux/etherdevice.h:329 [inline]
 ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:599 [inline]
 ipvlan_queue_xmit+0x158f/0x18a0 drivers/net/ipvlan/ipvlan_core.c:645
 ipvlan_start_xmit+0x45/0x190 drivers/net/ipvlan/ipvlan_main.c:222
 __netdev_start_xmit include/linux/netdevice.h:4944 [inline]
 netdev_start_xmit include/linux/netdevice.h:4958 [inline]
 __dev_direct_xmit+0x527/0x730 net/core/dev.c:4313
 dev_direct_xmit include/linux/netdevice.h:2958 [inline]
 packet_direct_xmit+0x1a5/0x280 net/packet/af_packet.c:244
 packet_snd net/packet/af_packet.c:3006 [inline]
 packet_sendmsg+0x241c/0x5300 net/packet/af_packet.c:3031
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:674
 __sys_sendto+0x21c/0x320 net/socket.c:1977
 __do_sys_sendto net/socket.c:1989 [inline]
 __se_sys_sendto net/socket.c:1985 [inline]
 __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1985
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x443aa9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcc0f427a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000443aa9
RDX: 000000000000000e RSI: 0000000020000080 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000020000040 R09: 0000000000000014
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcc0f427d0
R13: 00000000000f4240 R14: 0000000000010f36 R15: 00007ffcc0f427c4

Allocated by task 6372:
 kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:427 [inline]
 __kasan_slab_alloc+0x75/0x90 mm/kasan/common.c:460
 kasan_slab_alloc include/linux/kasan.h:223 [inline]
 slab_post_alloc_hook mm/slab.h:516 [inline]
 slab_alloc_node mm/slub.c:2907 [inline]
 slab_alloc mm/slub.c:2915 [inline]
 kmem_cache_alloc+0x155/0x370 mm/slub.c:2920
 shmem_alloc_inode+0x18/0x40 mm/shmem.c:3772
 alloc_inode+0x61/0x230 fs/inode.c:234
 new_inode_pseudo fs/inode.c:928 [inline]
 new_inode+0x27/0x2f0 fs/inode.c:957
 shmem_get_inode+0x195/0xc20 mm/shmem.c:2305
 shmem_mknod+0x5a/0x1f0 mm/shmem.c:2862
 lookup_open.isra.0+0xfef/0x13d0 fs/namei.c:3219
 open_last_lookups fs/namei.c:3289 [inline]
 path_openat+0x9b4/0x27e0 fs/namei.c:3495
 do_filp_open+0x17e/0x3c0 fs/namei.c:3525
 do_sys_openat2+0x16d/0x420 fs/open.c:1187
 do_sys_open fs/open.c:1203 [inline]
 __do_sys_open fs/open.c:1211 [inline]
 __se_sys_open fs/open.c:1207 [inline]
 __x64_sys_open+0x119/0x1c0 fs/open.c:1207
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

The buggy address belongs to the object at ffff888023e132a0
 which belongs to the cache shmem_inode_cache of size 1312
The buggy address is located 63 bytes to the right of
 1312-byte region [ffff888023e132a0, ffff888023e137c0)
The buggy address belongs to the page:
page:ffffea00008f8400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23e10
head:ffffea00008f8400 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff8880109bda00
raw: 0000000000000000 0000000000160016 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888023e13680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888023e13700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888023e13780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
                                                                ^
 ffff888023e13800: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
 ffff888023e13880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/09 11:18 net-next-old 4438669eb703 6a81331a .config console log report syz C ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
2020/11/06 14:04 net-next-old c9448e828d11 64069d48 .config console log report syz C ci-upstream-net-kasan-gce
2022/02/26 13:27 upstream 9137eda53752 45a13a73 .config console log report syz C ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
2021/05/12 08:05 upstream 88b06399c9c7 b3c3bb8e .config console log report syz C ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
2021/04/09 11:21 net-old 864db232dc70 6a81331a .config console log report syz C ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
2022/01/09 06:00 net-old 6dc9a23e2906 2ca0d385 .config console log report info ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
2021/07/13 17:07 net-old 71ce9d92fc70 fa0594c3 .config console log report info ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
2021/10/30 08:42 net-next-old 28131d896d6d 098b5d53 .config console log report info ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in ipvlan_queue_xmit
* Struck through repros no longer work on HEAD.