syzbot


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

Status: closed as invalid on 2019/05/01 15:55
Subsystems: net
[Documentation on labels]
First crash: 1816d, last: 1816d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in skb_gro_receive (2) net C done 5 1814d 1814d 12/26 fixed on 2019/05/27 12:48

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in skb_gro_receive+0xf5f/0x10e0 net/core/skbuff.c:3826
Read of size 16 at addr ffff88809b98fff0 by task syz-executor.5/9232

CPU: 1 PID: 9232 Comm: syz-executor.5 Not tainted 5.1.0-rc7+ #91
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+0x172/0x1f0 lib/dump_stack.c:113
 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187
 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
 __asan_report_load16_noabort+0x14/0x20 mm/kasan/generic_report.c:133
 skb_gro_receive+0xf5f/0x10e0 net/core/skbuff.c:3826
 udp_gro_receive_segment net/ipv4/udp_offload.c:382 [inline]
 call_gro_receive include/linux/netdevice.h:2349 [inline]
 udp_gro_receive+0xb61/0xfd0 net/ipv4/udp_offload.c:414
 udp4_gro_receive+0x763/0xeb0 net/ipv4/udp_offload.c:478
 inet_gro_receive+0xe72/0x1110 net/ipv4/af_inet.c:1510
 dev_gro_receive+0x1cd0/0x23c0 net/core/dev.c:5581
 napi_gro_frags+0x36b/0xd10 net/core/dev.c:5843
 tun_get_user+0x2f24/0x3fb0 drivers/net/tun.c:1981
 tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:2027
 call_write_iter include/linux/fs.h:1866 [inline]
 do_iter_readv_writev+0x5e1/0x8e0 fs/read_write.c:681
 do_iter_write fs/read_write.c:957 [inline]
 do_iter_write+0x184/0x610 fs/read_write.c:938
 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1002
 do_writev+0x15e/0x370 fs/read_write.c:1037
 __do_sys_writev fs/read_write.c:1110 [inline]
 __se_sys_writev fs/read_write.c:1107 [inline]
 __x64_sys_writev+0x75/0xb0 fs/read_write.c:1107
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458c61
Code: 75 14 b8 14 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 e4 b9 fb ff c3 48 83 ec 08 e8 1a 2d 00 00 48 89 04 24 b8 14 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 63 2d 00 00 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007f59d449dba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 000000000000002a RCX: 0000000000458c61
RDX: 0000000000000001 RSI: 00007f59d449dc00 RDI: 00000000000000f0
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 00007f59d449e6d4
R13: 00000000004c76b6 R14: 00000000004dd610 R15: 00000000ffffffff

Allocated by task 8967:
 save_stack+0x45/0xd0 mm/kasan/common.c:75
 set_track mm/kasan/common.c:87 [inline]
 __kasan_kmalloc mm/kasan/common.c:497 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470
 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505
 slab_post_alloc_hook mm/slab.h:437 [inline]
 slab_alloc mm/slab.c:3393 [inline]
 kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3555
 getname_flags fs/namei.c:138 [inline]
 getname_flags+0xd6/0x5b0 fs/namei.c:128
 getname+0x1a/0x20 fs/namei.c:209
 do_sys_open+0x2c9/0x5d0 fs/open.c:1063
 __do_sys_openat fs/open.c:1096 [inline]
 __se_sys_openat fs/open.c:1090 [inline]
 __x64_sys_openat+0x9d/0x100 fs/open.c:1090
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 8967:
 save_stack+0x45/0xd0 mm/kasan/common.c:75
 set_track mm/kasan/common.c:87 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467
 __cache_free mm/slab.c:3499 [inline]
 kmem_cache_free+0x86/0x260 mm/slab.c:3765
 putname+0xef/0x130 fs/namei.c:259
 do_sys_open+0x318/0x5d0 fs/open.c:1078
 __do_sys_openat fs/open.c:1096 [inline]
 __se_sys_openat fs/open.c:1090 [inline]
 __x64_sys_openat+0x9d/0x100 fs/open.c:1090
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88809b98ed00
 which belongs to the cache names_cache of size 4096
The buggy address is located 752 bytes to the right of
 4096-byte region [ffff88809b98ed00, ffff88809b98fd00)
The buggy address belongs to the page:
page:ffffea00026e6380 count:1 mapcount:0 mapping:ffff88821bc45b00 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea000255a088 ffffea00022f7b88 ffff88821bc45b00
raw: 0000000000000000 ffff88809b98ed00 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88809b98fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88809b98ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88809b98ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                             ^
 ffff88809b990000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88809b990080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/29 20:59 upstream 80871482fd5c b617407b .config console log report ci-upstream-kasan-gce-selinux-root
* Struck through repros no longer work on HEAD.