Subject: general protection fault in dst_dev_put

From: syzbot <[email-masked]>
Date: Mon, 18 Dec 2017 11:08:01 -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.

autofs4:pid:20489:validate_dev_ioctl: invalid device control module version  
supplied for cmd(0x0000937e)
general protection fault: 0000 [#1] SMP
Dumping ftrace buffer:
    (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 20517 Comm: syz-executor5 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:dst_dev_put+0x3a/0x90 net/core/dst.c:171
RSP: 0018:ffffc90000dc7bc0 EFLAGS: 00010212
RAX: 0000000000010000 RBX: ffff8801e096a000 RCX: ffffffff820dfe4f
RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8801e096a000
RBP: ffffc90000dc7bd8 R08: ffff8801e0f96100 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 636f6c3e2d6c2600 R14: ffff8801e096a000 R15: ffff8802157a8dc0
FS:  00007f26d491c700(0000) GS:ffff88021fd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020002ff8 CR3: 00000001dee0a000 CR4: 00000000001426e0
DR0: 0000000020000008 DR1: 0000000020000008 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
  rt_cache_route+0xbc/0x100 net/ipv4/route.c:1371
  rt_set_nexthop.constprop.58+0x130/0x3d0 net/ipv4/route.c:1472
  __mkroute_output net/ipv4/route.c:2272 [inline]
  ip_route_output_key_hash_rcu+0x466/0xe70 net/ipv4/route.c:2470
  ip_route_output_key_hash+0xba/0x180 net/ipv4/route.c:2299
  __ip_route_output_key include/net/route.h:125 [inline]
  ip_route_output_flow+0x26/0x70 net/ipv4/route.c:2553
  ip_route_connect include/net/route.h:307 [inline]
  tcp_v4_connect+0x199/0x660 net/ipv4/tcp_ipv4.c:175
  __inet_stream_connect+0x285/0x3c0 net/ipv4/af_inet.c:619
  inet_stream_connect+0x3b/0x60 net/ipv4/af_inet.c:683
  SYSC_connect+0xaf/0x130 net/socket.c:1619
  SyS_connect+0x24/0x30 net/socket.c:1600
  entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452a39
RSP: 002b:00007f26d491bc58 EFLAGS: 00000212 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 00007f26d491c700 RCX: 0000000000452a39
RDX: 0000000000000010 RSI: 00000000203f1000 RDI: 0000000000000014
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000
R13: 0000000000a6f7ff R14: 00007f26d491c9c0 R15: 0000000000000000
Code: 1d ff b8 02 00 00 00 4c 8b 23 66 89 43 3a 48 8b 43 08 4c 8b 68 38 4d  
85 ed 74 58 e8 f1 a4 1d ff ba 01 00 00 00 4c 89 e6 48 89 df <41> ff d5 4c  
8b 2b e8 db a4 1d ff 48 c7 43 28 d0 fe 0d 82 48 c7
RIP: dst_dev_put+0x3a/0x90 net/core/dst.c:171 RSP: ffffc90000dc7bc0
---[ end trace 9d397c851a9bfe25 ]---

---
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.