syzbot


general protection fault in j1939_sk_bind

Status: fixed on 2020/02/14 01:19
Reported-by: syzbot+4857323ec1bb236f6a45@syzkaller.appspotmail.com
Fix commit: 00d4e14d2e4c can: j1939: j1939_sk_bind(): take priv after lock is held
First crash: 1624d, last: 1598d
Cause bisection: introduced by (bisect log) :
commit 9d71dd0c70099914fcd063135da3c580865e924c
Author: The j1939 authors <linux-can@vger.kernel.org>
Date: Mon Oct 8 09:48:36 2018 +0000

  can: add support of SAE J1939 protocol

Crash: general protection fault in j1939_jsk_del (log)
Repro: syz .config
  
Fix bisection: fixed by (bisect log) :
commit 00d4e14d2e4caf5f7254a505fee5eeca8cd37bd4
Author: Oleksij Rempel <o.rempel@pengutronix.de>
Date: Fri Dec 6 14:18:35 2019 +0000

  can: j1939: j1939_sk_bind(): take priv after lock is held

  
Discussions (2)
Title Replies (including bot) Last reply
general protection fault in j1939_sk_bind 0 (3) 2020/01/17 09:06
[PATCH v1 0/9] can: j1939: fix multiple issues found by syzbot 16 (16) 2019/11/13 10:04

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8291 Comm: syz-executor.0 Not tainted 5.4.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__lock_acquire+0x86/0x1be0 kernel/locking/lockdep.c:3828
Code: 8a 04 30 84 c0 0f 85 66 12 00 00 83 3d 32 33 e8 07 00 0f 84 91 12 00 00 83 3d 65 a1 b1 07 00 74 34 48 8b 44 24 10 48 c1 e8 03 <80> 3c 30 00 74 14 48 8b 7c 24 10 e8 4a 30 56 00 48 be 00 00 00 00
RSP: 0018:ffff888096e17b80 EFLAGS: 00010006
RAX: 0000000000000218 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: dffffc0000000000 RDI: 00000000000010c0
RBP: ffff888096e17ce0 R08: 0000000000000001 R09: 0000000000000000
R10: fffffbfff128703d R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880955f4680
FS:  00007f9a9532f700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000075c000 CR3: 00000000a8dfd000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 lock_acquire+0x158/0x250 kernel/locking/lockdep.c:4485
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
 _raw_spin_lock_bh+0x34/0x50 kernel/locking/spinlock.c:175
 spin_lock_bh include/linux/spinlock.h:343 [inline]
 j1939_jsk_del net/can/j1939/socket.c:89 [inline]
 j1939_sk_bind+0x382/0xa70 net/can/j1939/socket.c:448
 __sys_bind+0x2c2/0x3a0 net/socket.c:1648
 __do_sys_bind net/socket.c:1659 [inline]
 __se_sys_bind net/socket.c:1657 [inline]
 __x64_sys_bind+0x7a/0x90 net/socket.c:1657
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a679
Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f9a9532ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a679
RDX: 0000000000000018 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9a9532f6d4
R13: 00000000004c09e9 R14: 00000000004d37d0 R15: 00000000ffffffff
Modules linked in:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 8291 at kernel/locking/mutex.c:1419 mutex_trylock+0x208/0x2c0 kernel/locking/mutex.c:1426

Crashes (22):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/01 07:41 upstream 32ef9553635a a76bf83f .config console log report syz ci-upstream-kasan-gce-smack-root
2019/12/01 06:46 upstream 32ef9553635a a76bf83f .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/12 02:13 upstream 31f4f5b495a6 048f2d49 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/11 14:08 upstream 9805a68371ce dc438b91 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/10 07:37 upstream 00aff6836241 dc438b91 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/09 02:18 upstream 6737e7634951 dc438b91 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/07 14:36 upstream 4dd58158254c d797d201 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/07 14:18 upstream 4dd58158254c d797d201 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/07 12:23 upstream 4dd58158254c d797d201 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/07 11:34 upstream 4dd58158254c d797d201 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/07 11:15 upstream 4dd58158254c d797d201 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/07 10:56 upstream 4dd58158254c d797d201 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/07 10:37 upstream 4dd58158254c d797d201 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/05 03:21 upstream a99d8080aaf3 76630fc9 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/11/22 01:44 upstream 81429eb8d9ca 8098ea0f .config console log report ci-upstream-kasan-gce-smack-root
2019/11/18 23:44 upstream af42d3466bdc 1daed50a .config console log report ci-upstream-kasan-gce-smack-root
2019/11/17 21:22 upstream cbb104f91dfe d5696d51 .config console log report ci-upstream-kasan-gce-smack-root
2019/11/16 12:33 upstream 6c9594bdd474 d5696d51 .config console log report ci-upstream-kasan-gce-smack-root
2019/11/13 09:35 upstream 0e3f1ad80fc8 048f2d49 .config console log report ci-upstream-kasan-gce-smack-root
2019/11/10 04:14 upstream 00aff6836241 dc438b91 .config console log report ci-upstream-kasan-gce-smack-root
2019/11/09 00:19 upstream 6737e7634951 dc438b91 .config console log report ci-upstream-kasan-gce-smack-root
2019/11/05 02:53 upstream a99d8080aaf3 76630fc9 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.