general protection fault in rdma_init_qp_attr (2)

12 views
Skip to first unread message

syzbot

unread,
Mar 23, 2018, 4:01:04 PM3/23/18
to dasaratharama...@intel.com, dled...@redhat.com, j...@ziepe.ca, leo...@mellanox.com, linux-...@vger.kernel.org, linux...@vger.kernel.org, ma...@mellanox.com, mo...@mellanox.com, pa...@mellanox.com, syzkall...@googlegroups.com
Hello,

syzbot hit the following crash on upstream commit
f36b7534b83357cf52e747905de6d65b4f7c2512 (Fri Mar 23 01:48:43 2018 +0000)
Merge branch 'akpm' (patches from Andrew)
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=7b62c837c2516f8f38c8

So far this crash happened 14 times on upstream.
C reproducer is attached.
syzkaller reproducer is attached.
Raw console output is attached.
.config is attached.
compiler: gcc (GCC) 7.1.1 20170620

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+7b62c8...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

audit: type=1400 audit(1521831694.945:6): avc: denied { map } for
pid=4084 comm="bash" path="/bin/bash" dev="sda1" ino=1457
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
audit: type=1400 audit(1521831701.351:7): avc: denied { map } for
pid=4098 comm="syzkaller148426" path="/root/syzkaller148426363" dev="sda1"
ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 4098 Comm: syzkaller148426 Not tainted 4.16.0-rc6+ #363
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:rdma_cap_ib_cm include/rdma/ib_verbs.h:2661 [inline]
RIP: 0010:rdma_init_qp_attr+0x8b/0x720 drivers/infiniband/core/cma.c:1025
RSP: 0018:ffff8801cc797840 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8801bb4976c0 RCX: ffffffff841bbf8f
RDX: 0000000000000029 RSI: ffff8801cc7979c8 RDI: 0000000000000148
RBP: ffff8801cc797880 R08: ffffed00398f2f4e R09: ffff8801cc7979cc
R10: 0000000000000000 R11: ffffed00398f2f4d R12: ffff8801cc7979c8
R13: ffff8801cc797908 R14: 0000000000000000 R15: ffff8801cc7978c8
FS: 00000000007b0880(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055c67ffbb0f0 CR3: 00000001cc38a006 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ucma_init_qp_attr+0x251/0x440 drivers/infiniband/core/ucma.c:1172
ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1649
__vfs_write+0xef/0x970 fs/read_write.c:480
vfs_write+0x189/0x510 fs/read_write.c:544
SYSC_write fs/read_write.c:589 [inline]
SyS_write+0xef/0x220 fs/read_write.c:581
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x43fdc9
RSP: 002b:00007ffe0daacb28 EFLAGS: 00000217 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fdc9
RDX: 0000000000000057 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000217 R12: 00000000004016f0
R13: 0000000000401780 R14: 0000000000000000 R15: 0000000000000000
Code: 00 00 00 fc ff df 80 3c 02 00 0f 85 8c 06 00 00 4c 8b 33 48 b8 00 00
00 00 00 fc ff df 49 8d be 48 01 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00
0f 85 5d 06 00 00 44 0f b6 7d d4 48 b8 00 00 00 00
RIP: rdma_cap_ib_cm include/rdma/ib_verbs.h:2661 [inline] RSP:
ffff8801cc797840
RIP: rdma_init_qp_attr+0x8b/0x720 drivers/infiniband/core/cma.c:1025 RSP:
ffff8801cc797840
---[ end trace f0e61529df46d8ef ]---
Kernel panic - not syncing: Fatal exception
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
raw.log.txt
repro.syz.txt
repro.c.txt
config.txt

syzbot

unread,
Mar 26, 2018, 5:49:01 PM3/26/18
to rol...@kernel.org, rol...@purestorage.com, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but build/boot failed:

failed to checkout kernel repo: failed to run /usr/bin/git [git fetch
--no-tags --depth=1 https://github.com/rolandd/qla-target.git syzk]: exit
status 128
fatal: Couldn't find remote ref syzk



Tested on https://github.com/rolandd/qla-target.git/syzk commit
[unknown]

compiler: gcc (GCC) 7.1.1 20170620
Patch: https://syzkaller.appspot.com/x/patch.diff?id=6046569639968768



syzbot

unread,
Mar 26, 2018, 6:09:02 PM3/26/18
to rol...@kernel.org, rol...@purestorage.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger
crash:

Reported-and-tested-by:
syzbot+7b62c8...@syzkaller.appspotmail.com

Note: the tag will also help syzbot to understand when the bug is fixed.
b7f20dcbfd96cf56a0f81dc67ea68f0c58ce91f7 (Mon Mar 26 21:39:01 2018 +0000)
RDMA/ucma: Fix userspace-triggerable crash in rdma_init_qp_attr()

compiler: gcc (GCC) 7.1.1 20170620
Patch: https://syzkaller.appspot.com/x/patch.diff?id=5177223027884032
Kernel config:
https://syzkaller.appspot.com/x/.config?id=-2340295454854568752


---
There is no WARRANTY for the result, to the extent permitted by applicable
law.
Except when otherwise stated in writing syzbot provides the result "AS IS"
without warranty of any kind, either expressed or implied, but not limited
to,
the implied warranties of merchantability and fittness for a particular
purpose.
The entire risk as to the quality of the result is with you. Should the
result
prove defective, you assume the cost of all necessary servicing, repair or
correction.
Reply all
Reply to author
Forward
0 new messages