syzbot


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

Status: auto-closed as invalid on 2019/12/30 17:46
Subsystems: rdma
[Documentation on labels]
Reported-by: syzbot+c92378b32760a4eef756@syzkaller.appspotmail.com
First crash: 2184d, last: 1700d
Discussions (11)
Title Replies (including bot) Last reply
[PATCH 4.19 00/54] 4.19.115-rc1 review 70 (70) 2020/05/27 20:33
[PATCH AUTOSEL 5.4 001/108] net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware 111 (111) 2020/04/17 17:18
[PATCH AUTOSEL 5.6 001/149] net: hns3: drop the WQ_MEM_RECLAIM flag when allocating WQ 152 (152) 2020/04/17 17:06
[PATCH 5.6 00/38] 5.6.4-rc1 review 44 (44) 2020/04/14 10:36
[PATCH 5.5 00/44] 5.5.17-rc1 review 48 (48) 2020/04/14 10:36
[PATCH 5.4 00/41] 5.4.32-rc1 review 45 (45) 2020/04/14 10:36
[PATCH AUTOSEL 5.5 001/121] net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware 122 (122) 2020/04/12 01:16
[PATCH AUTOSEL 4.19 01/66] net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware 67 (67) 2020/04/12 01:16
Reminder: 11 open syzbot bugs in RDMA subsystem 1 (1) 2019/07/24 01:48
Reminder: 11 open syzbot bugs in RDMA subsystem 1 (1) 2019/06/25 05:48
KASAN: slab-out-of-bounds Read in rdma_listen 0 (1) 2018/08/20 04:13
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in rdma_listen 3 1461d 1594d 0/1 auto-closed as invalid on 2020/08/25 03:19

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

CPU: 1 PID: 28295 Comm: syz-executor.4 Not tainted 5.3.0-rc6+ #148
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+0xd4/0x306 mm/kasan/report.c:351
 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482
 kasan_report+0x12/0x17 mm/kasan/common.c:618
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
 __list_add_valid+0x9a/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:2508 [inline]
 rdma_listen+0x6b7/0x970 drivers/infiniband/core/cma.c:3562
 ucma_listen+0x14d/0x1c0 drivers/infiniband/core/ucma.c:1092
 ucma_write+0x2d7/0x3c0 drivers/infiniband/core/ucma.c:1684
 __vfs_write+0x8a/0x110 fs/read_write.c:494
 vfs_write+0x268/0x5d0 fs/read_write.c:558
 ksys_write+0x220/0x290 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:620
 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459879
Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f481c64cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459879
RDX: 0000000000000010 RSI: 0000000020000240 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f481c64d6d4
R13: 00000000004c97f7 R14: 00000000004e0db0 R15: 00000000ffffffff

Allocated by task 3906:
 save_stack+0x23/0x90 mm/kasan/common.c:69
 set_track mm/kasan/common.c:77 [inline]
 __kasan_kmalloc mm/kasan/common.c:493 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:466
 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:507
 __do_kmalloc mm/slab.c:3655 [inline]
 __kmalloc+0x163/0x770 mm/slab.c:3664
 kmalloc include/linux/slab.h:557 [inline]
 tomoyo_realpath_from_path+0xcd/0x7b0 security/tomoyo/realpath.c:277
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822
 tomoyo_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129
 security_inode_getattr+0xf2/0x150 security/security.c:1182
 vfs_getattr+0x25/0x70 fs/stat.c:115
 vfs_statx_fd+0x71/0xc0 fs/stat.c:145
 vfs_fstat include/linux/fs.h:3204 [inline]
 __do_sys_newfstat+0x9b/0x120 fs/stat.c:378
 __se_sys_newfstat fs/stat.c:375 [inline]
 __x64_sys_newfstat+0x54/0x80 fs/stat.c:375
 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 3906:
 save_stack+0x23/0x90 mm/kasan/common.c:69
 set_track mm/kasan/common.c:77 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/common.c:455
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:463
 __cache_free mm/slab.c:3425 [inline]
 kfree+0x10a/0x2c0 mm/slab.c:3756
 tomoyo_realpath_from_path+0x1de/0x7b0 security/tomoyo/realpath.c:319
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822
 tomoyo_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129
 security_inode_getattr+0xf2/0x150 security/security.c:1182
 vfs_getattr+0x25/0x70 fs/stat.c:115
 vfs_statx_fd+0x71/0xc0 fs/stat.c:145
 vfs_fstat include/linux/fs.h:3204 [inline]
 __do_sys_newfstat+0x9b/0x120 fs/stat.c:378
 __se_sys_newfstat fs/stat.c:375 [inline]
 __x64_sys_newfstat+0x54/0x80 fs/stat.c:375
 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88805c664e00
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 2464 bytes to the left of
 4096-byte region [ffff88805c664e00, ffff88805c665e00)
The buggy address belongs to the page:
page:ffffea0001719900 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea0001582a08 ffffea000170a788 ffff8880aa402000
raw: 0000000000000000 ffff88805c664e00 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88805c664300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88805c664380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88805c664400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                       ^
 ffff88805c664480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88805c664500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (30):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/01 17:45 upstream eea173097dfb bad3cce2 .config console log report ci-upstream-kasan-gce
2019/08/29 18:24 upstream 6525771f58cb fd37b39e .config console log report ci-upstream-kasan-gce
2019/08/01 02:12 upstream 4010b622f1d2 c692b5bd .config console log report ci-upstream-kasan-gce
2019/02/26 14:08 upstream 7d762d69145a a36ecd98 .config console log report ci-upstream-kasan-gce
2019/02/24 16:55 upstream e60b5f79bd75 7a06e792 .config console log report ci-upstream-kasan-gce
2019/02/16 00:10 upstream 5ded5871030e f42dee6d .config console log report ci-upstream-kasan-gce-root
2019/02/06 14:04 upstream 8834f5600cf3 d25487bc .config console log report ci-upstream-kasan-gce-root
2019/01/19 06:02 upstream 2339e91d0e66 2103a236 .config console log report ci-upstream-kasan-gce-root
2019/01/11 10:39 upstream 1bdbe2274920 80dde172 .config console log report ci-upstream-kasan-gce
2018/12/24 11:23 upstream 8fe28cb58bcb be79df56 .config console log report ci-upstream-kasan-gce-selinux-root
2018/12/09 05:59 upstream 8214bdf7d3e6 c7918378 .config console log report ci-upstream-kasan-gce-root
2018/12/08 03:27 upstream 5f179793f0a7 65ed2472 .config console log report ci-upstream-kasan-gce
2018/11/05 20:43 upstream 651022382c7f 8bd6bd63 .config console log report ci-upstream-kasan-gce-selinux-root
2018/08/17 12:16 upstream 5c60a7389d79 9ccc1d45 .config console log report ci-upstream-kasan-gce
2018/08/14 16:15 upstream 10f3e23f07cb 7a88b141 .config console log report ci-upstream-kasan-gce
2018/08/10 07:33 upstream 112cbae26d18 1fb62d58 .config console log report ci-upstream-kasan-gce
2018/08/09 08:12 upstream fedb8da96355 2eeda842 .config console log report ci-upstream-kasan-gce
2018/07/09 18:18 upstream 1e4b044d2251 f25e5770 .config console log report ci-upstream-kasan-gce
2018/07/05 11:45 upstream fc36def997cf f525fd72 .config console log report ci-upstream-kasan-gce
2018/06/05 10:41 upstream 716a685fdb89 a316ff92 .config console log report ci-upstream-kasan-gce
2018/06/01 11:21 upstream 0512e0134582 2f93b54f .config console log report ci-upstream-kasan-gce
2018/11/25 14:48 upstream e195ca6cb6f2 3d3ec907 .config console log report ci-upstream-kasan-gce-386
2018/07/18 00:30 upstream 30b06abfb92b 6d5bd5b5 .config console log report ci-upstream-kasan-gce-386
2018/07/03 06:08 upstream d0fbad0aec1d 317fc8ea .config console log report ci-upstream-kasan-gce-386
2018/06/30 20:07 upstream 1904148a361a dba0b50e .config console log report ci-upstream-kasan-gce-386
2018/06/29 20:48 upstream 2cd3ae212973 dba0b50e .config console log report ci-upstream-kasan-gce-386
2018/06/27 06:45 upstream 813835028e9a b0294c53 .config console log report ci-upstream-kasan-gce-386
2018/06/02 23:49 upstream 4277e6b9fd44 2f93b54f .config console log report ci-upstream-kasan-gce-386
2018/05/05 14:51 upstream c1c07416cdd4 6a0382b5 .config console log report ci-upstream-kasan-gce-386
2018/12/16 12:24 linux-next d14b746c6c1c def91db3 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.