general protection fault in qrtr_endpoint_post

18 views
Skip to first unread message

syzbot

unread,
Jun 24, 2020, 2:17:18 AM6/24/20
to bjorn.a...@linaro.org, da...@davemloft.net, ku...@kernel.org, linux-...@vger.kernel.org, manivannan...@linaro.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7ae77150 Merge tag 'powerpc-5.8-1' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12c27f79100000
kernel config: https://syzkaller.appspot.com/x/.config?x=d195fe572fb15312
dashboard link: https://syzkaller.appspot.com/bug?extid=03e343dbccf82a5242a2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1715f03d100000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17dc0db6100000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+03e343...@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 0 PID: 6780 Comm: syz-executor827 Not tainted 5.7.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:qrtr_endpoint_post+0x92/0xfa0 net/qrtr/qrtr.c:440
Code: 44 89 e6 e8 80 27 4e fe 48 85 c0 48 89 c5 0f 84 57 0e 00 00 e8 4f 7a 9e f9 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 48 89 da 83 e2 07 38 d0 7f 08 84 c0 0f 85 f7 0c 00 00
RSP: 0018:ffffc900016a7c48 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000010 RCX: ffffffff86237e4b
RDX: 0000000000000002 RSI: ffffffff87d55471 RDI: ffff888090444150
RBP: ffff888090444140 R08: ffff8880954ca340 R09: ffffed1011e43c5d
R10: ffff88808f21e2e3 R11: ffffed1011e43c5c R12: 0000000000000000
R13: ffff88809a089100 R14: ffffc900016a7eb0 R15: 0000000000000000
FS: 0000000000a65880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 0000000099699000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
qrtr_tun_write_iter+0xf5/0x180 net/qrtr/tun.c:92
call_write_iter include/linux/fs.h:1917 [inline]
new_sync_write+0x426/0x650 fs/read_write.c:484
__vfs_write+0xc9/0x100 fs/read_write.c:497
vfs_write+0x268/0x5d0 fs/read_write.c:559
ksys_write+0x12d/0x250 fs/read_write.c:612
do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x4401b9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff99653dd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401b9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40
R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 5199d7949b247ba3 ]---
RIP: 0010:qrtr_endpoint_post+0x92/0xfa0 net/qrtr/qrtr.c:440
Code: 44 89 e6 e8 80 27 4e fe 48 85 c0 48 89 c5 0f 84 57 0e 00 00 e8 4f 7a 9e f9 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 48 89 da 83 e2 07 38 d0 7f 08 84 c0 0f 85 f7 0c 00 00
RSP: 0018:ffffc900016a7c48 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000010 RCX: ffffffff86237e4b
RDX: 0000000000000002 RSI: ffffffff87d55471 RDI: ffff888090444150
RBP: ffff888090444140 R08: ffff8880954ca340 R09: ffffed1011e43c5d
R10: ffff88808f21e2e3 R11: ffffed1011e43c5c R12: 0000000000000000
R13: ffff88809a089100 R14: ffffc900016a7eb0 R15: 0000000000000000
FS: 0000000000a65880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 0000000099699000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Jul 22, 2020, 11:19:06 AM7/22/20
to bjorn.a...@linaro.org, da...@davemloft.net, ku...@kernel.org, linux-...@vger.kernel.org, manivannan...@linaro.org, net...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has bisected this issue to:

commit e42671084361302141a09284fde9bbc14fdd16bf
Author: Manivannan Sadhasivam <manivannan...@linaro.org>
Date: Thu May 7 12:53:06 2020 +0000

net: qrtr: Do not depend on ARCH_QCOM

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=17f50e27100000
start commit: 1590a2e1 Merge tag 'acpi-5.8-rc3' of git://git.kernel.org/..
git tree: upstream
final oops: https://syzkaller.appspot.com/x/report.txt?x=140d0e27100000
console output: https://syzkaller.appspot.com/x/log.txt?x=100d0e27100000
kernel config: https://syzkaller.appspot.com/x/.config?x=20c907630cbdbe5
dashboard link: https://syzkaller.appspot.com/bug?extid=03e343dbccf82a5242a2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1496f9f9100000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1692523d100000

Reported-by: syzbot+03e343...@syzkaller.appspotmail.com
Fixes: e42671084361 ("net: qrtr: Do not depend on ARCH_QCOM")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Jul 22, 2020, 6:06:07 PM7/22/20
to bkka...@pesu.pes.edu, syzkall...@googlegroups.com
Hello,

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

net/qrtr/qrtr.c:439:28: error: member reference type 'struct sk_buff *' is a pointer; did you mean to use '->'?


Tested on:

commit: 8c26c87b Merge tag 'sound-5.8-rc7' of git://git.kernel.org..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
dashboard link: https://syzkaller.appspot.com/bug?extid=03e343dbccf82a5242a2
compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
patch: https://syzkaller.appspot.com/x/patch.diff?x=10228217100000

syzbot

unread,
Aug 11, 2020, 3:02:05 AM8/11/20
to bjorn.a...@linaro.org, bkka...@pesu.pes.edu, dan.ca...@oracle.com, da...@davemloft.net, ku...@kernel.org, linux-...@vger.kernel.org, manivannan...@linaro.org, net...@vger.kernel.org, syzkall...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 8ff41cc21714704ef0158a546c3c4d07fae2c952
Author: Dan Carpenter <dan.ca...@oracle.com>
Date: Tue Jun 30 11:46:15 2020 +0000

net: qrtr: Fix an out of bounds read qrtr_endpoint_post()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10f1cfe6900000
start commit: 1590a2e1 Merge tag 'acpi-5.8-rc3' of git://git.kernel.org/..
git tree: upstream
If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: net: qrtr: Fix an out of bounds read qrtr_endpoint_post()

Dan Carpenter

unread,
Aug 11, 2020, 6:33:50 AM8/11/20
to syzbot, syzkall...@googlegroups.com
#syz fix: net: qrtr: Fix an out of bounds read qrtr_endpoint_post()

> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/00000000000015bfd405ac94a6c0%40google.com.
Reply all
Reply to author
Forward
0 new messages