syzbot


general protection fault in j1939_netdev_notify (2)

Status: fixed on 2021/04/09 19:46
Subsystems: can
[Documentation on labels]
Reported-by: syzbot+5138c4dd15a0401bec7b@syzkaller.appspotmail.com
Fix commit: 4e096a18867a net: introduce CAN specific pointer in the struct net_device
First crash: 1189d, last: 1126d
Cause bisection: introduced by (bisect log) :
commit 497a5757ce4e8f37219a3989ac6a561eb9a8e6c7
Author: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sat Nov 7 20:50:56 2020 +0000

  tun: switch to net core provided statistics counters

Crash: BUG: unable to handle kernel paging request in j1939_priv_get_by_ndev_locked (log)
Repro: C syz .config
  
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 5.10 000/126] 5.10.28-rc1 review 153 (153) 2021/04/07 08:20
[PATCH 5.4 00/74] 5.4.110-rc1 review 84 (84) 2021/04/06 07:12
[PATCH 5.11 000/152] 5.11.12-rc1 review 156 (156) 2021/04/06 00:09
[PATCH net v4 1/1] net: introduce CAN specific pointer in the struct net_device 2 (2) 2021/02/25 00:10
[PATCH net v3] net: introduce CAN specific pointer in the struct net_device 3 (3) 2021/02/23 06:51
[RFC PATCH net v2] net: introduce CAN specific pointer in the struct net_device 2 (2) 2021/02/12 13:43
[RFC PATCH net 1/2] net: introduce CAN specific pointer in the struct net_device 4 (4) 2021/01/22 11:47
general protection fault in j1939_netdev_notify (2) 4 (5) 2020/12/22 06:11
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in j1939_netdev_notify can syz done 11 1584d 1596d 14/26 fixed on 2019/11/29 15:48

Sample crash report:
general protection fault, probably for non-canonical address 0xe000080fe8c072f1: 0000 [#1] PREEMPT SMP KASAN
KASAN: probably user-memory-access in range [0x0000607f46039788-0x0000607f4603978f]
CPU: 1 PID: 8472 Comm: syz-executor635 Not tainted 5.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:j1939_ndev_to_priv net/can/j1939/main.c:219 [inline]
RIP: 0010:j1939_priv_get_by_ndev_locked net/can/j1939/main.c:231 [inline]
RIP: 0010:j1939_priv_get_by_ndev net/can/j1939/main.c:243 [inline]
RIP: 0010:j1939_netdev_notify+0x115/0x320 net/can/j1939/main.c:353
Code: 00 74 08 48 89 df e8 ba 1e 48 f9 48 8b 1b 48 85 db 0f 84 f0 00 00 00 4c 89 64 24 08 48 81 c3 28 60 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 8c 1e 48 f9 4c 8b 23 4d 85 e4 0f
RSP: 0018:ffffc90000e9fd68 EFLAGS: 00010202
RAX: 00000c0fe8c072f1 RBX: 0000607f46039788 RCX: ffff88801456d040
RDX: ffff88801456d040 RSI: 0000000000000118 RDI: 0000000000000118
RBP: 0000000000000118 R08: ffffffff8870585d R09: fffff520001d3fa5
R10: fffff520001d3fa5 R11: 0000000000000000 R12: 0000000000000010
R13: 1ffff1100293e848 R14: dffffc0000000000 R15: ffff8880149f4244
FS:  0000000001d13880(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 000000001402f000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 notifier_call_chain kernel/notifier.c:83 [inline]
 raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:410
 call_netdevice_notifiers_info net/core/dev.c:2022 [inline]
 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline]
 call_netdevice_notifiers+0xeb/0x150 net/core/dev.c:2048
 __tun_chr_ioctl+0x2337/0x4860 drivers/net/tun.c:3093
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x440359
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 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffd37b9c98 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440359
RDX: 0000000000000118 RSI: 00000000400454cd RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401b60
R13: 0000000000401bf0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 7688a2c3c10da2e1 ]---
RIP: 0010:j1939_ndev_to_priv net/can/j1939/main.c:219 [inline]
RIP: 0010:j1939_priv_get_by_ndev_locked net/can/j1939/main.c:231 [inline]
RIP: 0010:j1939_priv_get_by_ndev net/can/j1939/main.c:243 [inline]
RIP: 0010:j1939_netdev_notify+0x115/0x320 net/can/j1939/main.c:353
Code: 00 74 08 48 89 df e8 ba 1e 48 f9 48 8b 1b 48 85 db 0f 84 f0 00 00 00 4c 89 64 24 08 48 81 c3 28 60 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 8c 1e 48 f9 4c 8b 23 4d 85 e4 0f
RSP: 0018:ffffc90000e9fd68 EFLAGS: 00010202
RAX: 00000c0fe8c072f1 RBX: 0000607f46039788 RCX: ffff88801456d040
RDX: ffff88801456d040 RSI: 0000000000000118 RDI: 0000000000000118
RBP: 0000000000000118 R08: ffffffff8870585d R09: fffff520001d3fa5
R10: fffff520001d3fa5 R11: 0000000000000000 R12: 0000000000000010
R13: 1ffff1100293e848 R14: dffffc0000000000 R15: ffff8880149f4244
FS:  0000000001d13880(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 000000001402f000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/16 12:48 upstream d635a69dd498 f213e07e .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/12/16 12:33 upstream d635a69dd498 f213e07e .config console log report syz C ci-upstream-kasan-gce-smack-root
2021/02/16 13:45 upstream f40ddce88593 98682e5e .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/02/10 05:34 upstream e0756cfc7d7c 2bd9619f .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/02/05 19:07 upstream dd86e7fa07a3 23a562df .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/02/03 16:46 upstream 3aaf0a27ffc2 624dad51 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/31 05:43 upstream 8c947645151c fc9fd31e .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/30 03:22 upstream bec4c2968fce fc9fd31e .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/29 01:53 upstream e5ff2cb9cf67 7df34f59 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/28 09:44 upstream 76c057c84d28 eefc07f2 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/21 02:45 upstream 75439bc439e0 d4f4eca5 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/18 17:37 upstream 19c329f68089 63631df1 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/18 17:26 upstream 19c329f68089 63631df1 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/18 00:14 upstream a1339d6355ac 813be542 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/17 16:16 upstream 0da0a8a0a0e1 813be542 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in j1939_netdev_notify
2021/01/15 21:28 upstream 5ee88057889b 65a7a854 .config console log report info ci-upstream-kasan-gce-smack-root
2021/01/15 16:05 upstream 5ee88057889b 65a7a854 .config console log report info ci-upstream-kasan-gce-smack-root
2020/12/16 06:10 upstream d635a69dd498 f213e07e .config console log report info ci-upstream-kasan-gce-smack-root
2020/12/16 05:32 upstream d635a69dd498 f213e07e .config console log report info ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.