Subject: BUG: unable to handle kernel NULL pointer dereference in __list_add_valid

From: syzbot <[email-masked]>
Date: Thu, 21 Dec 2017 07:52:02 -0800

Hello,

syzkaller hit the following crash on  
6084b576dca2e898f5c101baef151f7bfdbb606d
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.

Unfortunately, I don't have any reproducer for this bug yet.

BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: __list_add_valid+0x1/0x70 lib/list_debug.c:22
PGD 20aa13067 P4D 20aa13067 PUD 1f7885067 PMD 0
Oops: 0000 [#1] SMP
Dumping ftrace buffer:
    (ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 8283 Comm: syz-executor3 Not tainted 4.15.0-rc3-next-20171214+  
#67
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
RIP: 0010:__list_add_valid+0x1/0x70 lib/list_debug.c:22
RSP: 0018:ffffc90000fafbd8 EFLAGS: 00010212
RAX: ffff880216a62420 RBX: ffff8801f95ac308 RCX: ffffffff81745e6f
RDX: 0000000000000000 RSI: ffff880216a62420 RDI: ffff8801f95ac320
RBP: ffffc90000fafc18 R08: 0000000000000001 R09: 0000000000000004
R10: ffffc90000fafb58 R11: 0000000000000004 R12: ffff8801f95ac320
R13: 0000000000000000 R14: ffff880216a751e0 R15: ffff880216a62400
FS:  00007fb693e05700(0000) GS:ffff88021fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000008 CR3: 000000020aa4c004 CR4: 00000000001606f0
Call Trace:
  rhashtable_walk_init include/linux/rhashtable.h:1255 [inline]
  netlink_walk_start net/netlink/af_netlink.c:2510 [inline]
  __netlink_seq_next+0xb3/0xd0 net/netlink/af_netlink.c:2553
  netlink_seq_next+0x1e/0x30 net/netlink/af_netlink.c:2584
  traverse+0x124/0x290 fs/seq_file.c:133
  seq_read+0x1a7/0x520 fs/seq_file.c:189
  proc_reg_read+0x72/0xd0 fs/proc/inode.c:217
  do_loop_readv_writev fs/read_write.c:673 [inline]
  do_iter_read+0x1c3/0x210 fs/read_write.c:897
  vfs_readv+0x87/0xc0 fs/read_write.c:959
  do_preadv+0xc5/0x110 fs/read_write.c:1043
  SYSC_preadv fs/read_write.c:1093 [inline]
  SyS_preadv+0x30/0x40 fs/read_write.c:1088
  entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452a09
RSP: 002b:00007fb693e04c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452a09
RDX: 0000000000000001 RSI: 0000000020006ff0 RDI: 0000000000000017
RBP: 00000000000005bf R08: 0000000000000000 R09: 0000000000000000
R10: 0000400000000000 R11: 0000000000000212 R12: 00000000006f5a88
R13: 00000000ffffffff R14: 00007fb693e056d4 R15: 0000000000000000
Code: eb 85 4c 8b 75 c8 4d 89 ef e8 5c a9 b6 ff 48 8b 45 c0 4c 89 75 d0 48  
c7 00 00 00 00 00 c7 40 08 00 00 00 00 e9 5e ff ff ff 90 55 <48> 8b 42 08  
49 89 d0 48 89 e5 48 39 f0 75 19 48 8b 10 4c 39 c2
RIP: __list_add_valid+0x1/0x70 lib/list_debug.c:22 RSP: ffffc90000fafbd8
CR2: 0000000000000008
---[ end trace 1d1d4c39c877aed0 ]---

---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to [email-masked].
Please credit me with: Reported-by: syzbot <[email-masked]>

syzbot will keep track of this bug report.
Once a fix for this bug is merged into any tree, reply to this email with:
#syz fix: exact-commit-title
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.