syzbot


general protection fault in addr_resolve

Status: upstream: reported C repro on 2019/04/17 02:44
Reported-by: syzbot+e31aa57e9a97afc20d15@syzkaller.appspotmail.com
First crash: 1217d, last: 28d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in addr_resolve C 32 1408d 1424d 12/23 fixed on 2018/11/12 21:25
upstream KASAN: use-after-free Write in addr_resolve (2) 1 540d 536d 0/23 auto-closed as invalid on 2021/06/21 07:23

Sample crash report:
batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
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
Modules linked in:
CPU: 1 PID: 8182 Comm: syz-executor300 Not tainted 4.14.273-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880b3a506c0 task.stack: ffff8880b1b40000
RIP: 0010:dev_put include/linux/netdevice.h:3381 [inline]
RIP: 0010:addr_resolve+0x263/0xa10 drivers/infiniband/core/addr.c:585
RSP: 0018:ffff8880b1b47860 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8880b347ca60 RCX: 1ffff1101674a1e9
RDX: 00000000000000a8 RSI: 0000000000000001 RDI: 0000000000000286
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: ffff8880b3a506c0 R12: 00000000ffffff9d
R13: ffff8880b3c843d0 R14: ffff8880abb15e40 R15: ffff8880b347cac4
FS:  0000555556064300(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f44310c3160 CR3: 00000000a0184000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 rdma_resolve_ip+0x40d/0x6b0 drivers/infiniband/core/addr.c:709
 rdma_resolve_addr+0x2bc/0x23b0 drivers/infiniband/core/cma.c:2940
 ucma_resolve_addr+0x12c/0x1d0 drivers/infiniband/core/ucma.c:719
 ucma_write+0x206/0x2c0 drivers/infiniband/core/ucma.c:1672
 __vfs_write+0xe4/0x630 fs/read_write.c:480
 vfs_write+0x17f/0x4d0 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xf2/0x210 fs/read_write.c:582
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f443104bd79
RSP: 002b:00007ffc1ed587d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007ffc1ed58800 RCX: 00007f443104bd79
RDX: 0000000000000118 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 000000000000000d R09: 000000000000000d
R10: 000000000000000d R11: 0000000000000246 R12: 00007ffc1ed587f0
R13: 00000000000f4240 R14: 0000000000000000 R15: 0000000000000000
Code: 83 c0 03 38 d0 7c 08 84 d2 0f 85 ad 06 00 00 44 89 6b 64 e8 90 cd 0e fc 48 8b 54 24 10 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 78 06 00 00 48 8b 85 40 05 00 00 65 ff 08 e8 
RIP: dev_put include/linux/netdevice.h:3381 [inline] RSP: ffff8880b1b47860
RIP: addr_resolve+0x263/0xa10 drivers/infiniband/core/addr.c:585 RSP: ffff8880b1b47860
---[ end trace 79a42837fdb43637 ]---
----------------
Code disassembly (best guess):
   0:	83 c0 03             	add    $0x3,%eax
   3:	38 d0                	cmp    %dl,%al
   5:	7c 08                	jl     0xf
   7:	84 d2                	test   %dl,%dl
   9:	0f 85 ad 06 00 00    	jne    0x6bc
   f:	44 89 6b 64          	mov    %r13d,0x64(%rbx)
  13:	e8 90 cd 0e fc       	callq  0xfc0ecda8
  18:	48 8b 54 24 10       	mov    0x10(%rsp),%rdx
  1d:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  24:	fc ff df
  27:	48 c1 ea 03          	shr    $0x3,%rdx
* 2b:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2f:	0f 85 78 06 00 00    	jne    0x6ad
  35:	48 8b 85 40 05 00 00 	mov    0x540(%rbp),%rax
  3c:	65 ff 08             	decl   %gs:(%rax)
  3f:	e8                   	.byte 0xe8

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2022/07/19 03:03 linux-4.14.y 424a46ea058e 89bc8608 .config log report syz C
ci2-linux-4-14 2022/06/19 01:39 linux-4.14.y 84bae26850e3 89bc8608 .config log report syz C
ci2-linux-4-14 2022/05/19 20:23 linux-4.14.y dffb5c6ff09c 89bc8608 .config log report syz C
ci2-linux-4-14 2021/11/10 08:00 linux-4.14.y 0447aa205abe 997ccc67 .config log report syz C
ci2-linux-4-14 2021/08/08 06:25 linux-4.14.y 94cb1fed447a 997ccc67 .config log report syz C
ci2-linux-4-14 2021/07/09 05:56 linux-4.14.y 313e82bbefb3 997ccc67 .config log report syz C
ci2-linux-4-14 2021/03/31 21:21 linux-4.14.y bd634aa64163 997ccc67 .config log report syz C
Crashes (433):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2022/03/24 15:20 linux-4.14.y 004bfaafc45c 89bc8608 .config log report syz C general protection fault in addr_resolve
ci2-linux-4-14 2019/11/02 10:40 linux-4.14.y ddef1e8e3f6e 997ccc67 .config log report syz C
ci2-linux-4-14 2019/10/27 16:46 linux-4.14.y b98aebd29824 25bb509e .config log report syz C
ci2-linux-4-14 2019/04/28 15:56 linux-4.14.y fa5941f45d7e b617407b .config log report syz C
ci2-linux-4-14 2019/04/26 11:52 linux-4.14.y 68d7a45eec10 b617407b .config log report syz C
ci2-linux-4-14 2019/04/17 04:23 linux-4.14.y 1ec8f1f0bffe b0e8efcb .config log report syz C
ci2-linux-4-14 2022/04/19 19:58 linux-4.14.y 74766a973637 33fc6ed6 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/16 02:46 linux-4.14.y 74766a973637 8bcc32a6 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/15 18:03 linux-4.14.y 74766a973637 8bcc32a6 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/12 21:11 linux-4.14.y 74766a973637 dacb3f1c .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/12 17:47 linux-4.14.y 74766a973637 dacb3f1c .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/10 06:14 linux-4.14.y 74766a973637 e22c3da3 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/07 06:21 linux-4.14.y 74766a973637 53c67432 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/07 04:24 linux-4.14.y 74766a973637 53c67432 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/04/02 05:19 linux-4.14.y af1af6ebca0e 79a2a8fc .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/30 22:31 linux-4.14.y af1af6ebca0e 9d49f3a7 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/25 08:59 linux-4.14.y 004bfaafc45c 89bc8608 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/23 08:56 linux-4.14.y 004bfaafc45c 5ff41e94 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/18 01:19 linux-4.14.y eb045674aab3 e2d91b1d .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/17 05:36 linux-4.14.y eb045674aab3 dfa9a8ed .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/17 02:39 linux-4.14.y eb045674aab3 dfa9a8ed .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/14 17:03 linux-4.14.y af48f51cb593 9e8eaa75 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/09 01:20 linux-4.14.y c9fcc1545c3b 9e8eaa75 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/07 19:53 linux-4.14.y e853993d29aa 7bdd8b2c .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/03/05 20:54 linux-4.14.y e853993d29aa 7bdd8b2c .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/28 12:49 linux-4.14.y fa33f9094f36 45a13a73 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/27 09:03 linux-4.14.y fa33f9094f36 45a13a73 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/25 03:55 linux-4.14.y fa33f9094f36 7c337266 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/21 09:38 linux-4.14.y a35d65bedfbc 3cd800e4 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/17 07:01 linux-4.14.y a35d65bedfbc 2bea8a27 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/16 15:33 linux-4.14.y a35d65bedfbc 8b9ca619 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/08 22:14 linux-4.14.y 21ad423fe521 0b33604d .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/08 14:06 linux-4.14.y b86ee2b7ae42 0b33604d .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/08 12:35 linux-4.14.y b86ee2b7ae42 a7dab638 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/05 12:51 linux-4.14.y b86ee2b7ae42 a7dab638 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/05 02:27 linux-4.14.y b86ee2b7ae42 e13a05ed .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/05 00:56 linux-4.14.y b86ee2b7ae42 e13a05ed .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/02 19:43 linux-4.14.y b86ee2b7ae42 4ebb2798 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/02 01:28 linux-4.14.y b86ee2b7ae42 4ebb2798 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/02/01 11:28 linux-4.14.y b86ee2b7ae42 c1c1631d .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/27 19:45 linux-4.14.y bbb957e1bd4a 64a8e201 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/26 02:35 linux-4.14.y 4ba8e26127c3 2cbffd88 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/24 21:07 linux-4.14.y 4ba8e26127c3 2cbffd88 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/24 14:28 linux-4.14.y 4ba8e26127c3 214351e1 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/23 06:14 linux-4.14.y 4ba8e26127c3 214351e1 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/22 07:32 linux-4.14.y 4ba8e26127c3 214351e1 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/20 03:19 linux-4.14.y 4ba8e26127c3 5da9499f .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/19 22:29 linux-4.14.y 4ba8e26127c3 5da9499f .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/19 03:21 linux-4.14.y 4ba8e26127c3 731a2d23 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2022/01/18 08:55 linux-4.14.y 4ba8e26127c3 731a2d23 .config log report info general protection fault in addr_resolve
ci2-linux-4-14 2021/01/16 00:33 linux-4.14.y f79dc86058bc 65a7a854 .config log report info
ci2-linux-4-14 2019/04/17 01:43 linux-4.14.y 1ec8f1f0bffe b0e8efcb .config log report