syzbot


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

Status: auto-closed as invalid on 2020/08/25 03:19
Reported-by: syzbot+af6dcbfcd80595aaea81@syzkaller.appspotmail.com
First crash: 1603d, last: 1470d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in rdma_listen rdma 30 1709d 2086d 0/26 auto-closed as invalid on 2019/12/30 17:46

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in __list_add_valid+0x93/0xa0 lib/list_debug.c:26
Read of size 8 at addr ffff8880a0f25cd8 by task syz-executor.3/22417

CPU: 0 PID: 22417 Comm: syz-executor.3 Not tainted 4.14.177-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+0x13e/0x194 lib/dump_stack.c:58
 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393
 __list_add_valid+0x93/0xa0 lib/list_debug.c:26
 __list_add include/linux/list.h:60 [inline]
 list_add_tail include/linux/list.h:93 [inline]
 cma_listen_on_all drivers/infiniband/core/cma.c:2321 [inline]
 rdma_listen+0x580/0x800 drivers/infiniband/core/cma.c:3320
 ucma_listen+0x10b/0x160 drivers/infiniband/core/ucma.c:1078
 ucma_write+0x206/0x2c0 drivers/infiniband/core/ucma.c:1672
 __vfs_write+0xe4/0x630 fs/read_write.c:480
 vfs_write+0x192/0x4e0 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xf2/0x210 fs/read_write.c:582
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c829
RSP: 002b:00007faa43a6ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000050bb40 RCX: 000000000045c829
RDX: 0000000000000010 RSI: 0000000020000040 RDI: 0000000000000004
RBP: 000000000078bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000cc2 R14: 00000000004ceed4 R15: 00007faa43a6f6d4

Allocated by task 21768:
 save_stack+0x32/0xa0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc mm/kasan/kasan.c:551 [inline]
 kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529
 kmem_cache_alloc+0x127/0x770 mm/slab.c:3552
 getname_flags fs/namei.c:138 [inline]
 getname_flags+0xc8/0x560 fs/namei.c:128
 user_path_at_empty+0x2a/0x50 fs/namei.c:2631
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x160 fs/stat.c:185
 vfs_fstatat include/linux/fs.h:3072 [inline]
 SYSC_newfstatat+0x8a/0xf0 fs/stat.c:364
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 21768:
 save_stack+0x32/0xa0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x75/0xc0 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
 filename_lookup+0x23a/0x380 fs/namei.c:2386
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x160 fs/stat.c:185
 vfs_fstatat include/linux/fs.h:3072 [inline]
 SYSC_newfstatat+0x8a/0xf0 fs/stat.c:364
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

The buggy address belongs to the object at ffff8880a0f245c0
 which belongs to the cache names_cache of size 4096
The buggy address is located 1816 bytes to the right of
 4096-byte region [ffff8880a0f245c0, ffff8880a0f255c0)
The buggy address belongs to the page:
page:ffffea000283c900 count:1 mapcount:0 mapping:ffff8880a0f245c0 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff8880a0f245c0 0000000000000000 0000000100000001
raw: ffffea0002116120 ffffea00025f8ca0 ffff8880aa587e40 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a0f25b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a0f25c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a0f25c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                    ^
 ffff8880a0f25d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a0f25d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/27 03:19 linux-4.14.y 050272a0423e 0ce7569e .config console log report ci2-linux-4-14
2020/01/29 02:21 linux-4.14.y 9a95f25269bd c8e81ce4 .config console log report ci2-linux-4-14
2019/12/16 19:10 linux-4.14.y a844dc4c5442 0ae38e44 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.