syzbot


KASAN: use-after-free Read in icmpv6_sk_exit (2)

Status: upstream: reported syz repro on 2021/10/06 07:32
Reported-by: syzbot+497d3e91eb557f7dc0aa@syzkaller.appspotmail.com
First crash: 333d, last: 145d

Cause bisection: failed (bisect log)

Fix bisection: failed (bisect log)
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in icmpv6_sk_exit 2 1131d 1134d 0/22 closed as invalid on 2019/06/14 19:45
upstream general protection fault in icmpv6_sk_exit 1 500d 500d 0/22 auto-closed as invalid on 2021/05/18 21:13
android-5-10 general protection fault in icmpv6_sk_exit 1 94d 94d 0/3 auto-closed as invalid on 2022/06/28 18:38
Patch testing requests:
Created Duration User Patch Repo Result
2021/11/22 09:55 16m phind.uet@gmail.com linux-next OK
2021/10/17 06:35 16m phind.uet@gmail.com linux-next OK

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000090: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000480-0x0000000000000487]
CPU: 0 PID: 8 Comm: kworker/u4:0 Not tainted 5.15.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
RIP: 0010:inet_ctl_sock_destroy include/net/inet_common.h:65 [inline]
RIP: 0010:icmpv6_sk_exit+0x106/0x1f0 net/ipv6/icmp.c:1038
Code: 42 80 3c 20 00 74 08 48 89 df e8 e5 7a f3 f8 48 8b 1b 48 85 db 74 2d e8 c8 0d a8 f8 48 81 c3 80 04 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 df e8 bb 7a f3 f8 48 8b 3b e8 f3 30 25
RSP: 0018:ffffc90000cd7b40 EFLAGS: 00010206
RAX: 0000000000000090 RBX: 0000000000000481 RCX: ffff888012375580
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
RBP: ffffffff8c38a7d8 R08: ffffffff88da6485 R09: ffffffff843540e0
R10: 0000000000000009 R11: ffff888012375580 R12: dffffc0000000000
R13: 1ffffffff1bb7fbf R14: ffff88801fcf3fe0 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005606aea732f8 CR3: 000000005c17f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ops_exit_list net/core/net_namespace.c:168 [inline]
 cleanup_net+0x758/0xc50 net/core/net_namespace.c:591
 process_one_work+0x853/0x1140 kernel/workqueue.c:2297
 worker_thread+0xac1/0x1320 kernel/workqueue.c:2444
 kthread+0x453/0x480 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30
Modules linked in:
---[ end trace e9d83564f5107008 ]---
RIP: 0010:inet_ctl_sock_destroy include/net/inet_common.h:65 [inline]
RIP: 0010:icmpv6_sk_exit+0x106/0x1f0 net/ipv6/icmp.c:1038
Code: 42 80 3c 20 00 74 08 48 89 df e8 e5 7a f3 f8 48 8b 1b 48 85 db 74 2d e8 c8 0d a8 f8 48 81 c3 80 04 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 df e8 bb 7a f3 f8 48 8b 3b e8 f3 30 25
RSP: 0018:ffffc90000cd7b40 EFLAGS: 00010206
RAX: 0000000000000090 RBX: 0000000000000481 RCX: ffff888012375580
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
RBP: ffffffff8c38a7d8 R08: ffffffff88da6485 R09: ffffffff843540e0
R10: 0000000000000009 R11: ffff888012375580 R12: dffffc0000000000
R13: 1ffffffff1bb7fbf R14: ffff88801fcf3fe0 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f93fc5792d8 CR3: 000000005c17f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1)
   5:	74 08                	je     0xf
   7:	48 89 df             	mov    %rbx,%rdi
   a:	e8 e5 7a f3 f8       	callq  0xf8f37af4
   f:	48 8b 1b             	mov    (%rbx),%rbx
  12:	48 85 db             	test   %rbx,%rbx
  15:	74 2d                	je     0x44
  17:	e8 c8 0d a8 f8       	callq  0xf8a80de4
  1c:	48 81 c3 80 04 00 00 	add    $0x480,%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 bb 7a f3 f8       	callq  0xf8f37af4
  39:	48 8b 3b             	mov    (%rbx),%rdi
  3c:	e8                   	.byte 0xe8
  3d:	f3                   	repz
  3e:	30                   	.byte 0x30
  3f:	25                   	.byte 0x25

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2021/10/05 05:34 upstream 84b3e42564ac ce697b49 .config log report syz general protection fault in icmpv6_sk_exit
ci-upstream-kasan-gce-root 2021/11/25 08:32 upstream 5f53fa508db0 545ab074 .config log report info KASAN: use-after-free Read in icmpv6_sk_exit
ci-upstream-kasan-gce-root 2021/08/03 20:30 upstream d5ad8ec3cfb5 6c236867 .config log report info KASAN: use-after-free Read in icmpv6_sk_exit
ci-upstream-net-kasan-gce 2021/11/21 00:47 net-next 520fbdf7fb19 4eb20a4e .config log report info KASAN: use-after-free Read in icmpv6_sk_exit
ci-upstream-bpf-next-kasan-gce 2022/02/08 02:58 bpf-next e91d280c840f a7dab638 .config log report info general protection fault in icmpv6_sk_exit