syzbot


KASAN: slab-out-of-bounds Read in cttimeout_net_exit

Status: upstream: reported C repro on 2022/05/17 20:27
Reported-by: syzbot+92968395eedbdbd3617d@syzkaller.appspotmail.com
Fix commit: aeed55a08d0b netfilter: cttimeout: fix slab-out-of-bounds read in cttimeout_net_exit 394e771684f7 netfilter: cttimeout: fix slab-out-of-bounds read typo in cttimeout_net_exit
Patched on: [ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce], missing on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 43d, last: 4d23h

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 52 Comm: kworker/u4:3 Not tainted 5.19.0-rc2-syzkaller-00147-gf0ec9c65a8d6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
RIP: 0010:__list_del_entry_valid+0x81/0xf0 lib/list_debug.c:51
Code: 0f 84 9c c6 41 05 48 b8 22 01 00 00 00 00 ad de 49 39 c4 0f 84 9d c6 41 05 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 75 51 49 8b 14 24 48 39 ea 0f 85 51 c6 41 05 49 8d 7d
RSP: 0018:ffffc90000bd7bc0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888022b07710 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff879df8f1 RDI: ffff888022b07728
RBP: ffff888022b07720 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888022b07728
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffeb48085d8 CR3: 000000006f0a1000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry include/linux/list.h:134 [inline]
 list_del include/linux/list.h:148 [inline]
 cttimeout_net_exit+0x211/0x540 net/netfilter/nfnetlink_cttimeout.c:618
 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:162
 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:594
 process_one_work+0x996/0x1610 kernel/workqueue.c:2289
 worker_thread+0x665/0x1080 kernel/workqueue.c:2436
 kthread+0x2e9/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid+0x81/0xf0 lib/list_debug.c:51
Code: 0f 84 9c c6 41 05 48 b8 22 01 00 00 00 00 ad de 49 39 c4 0f 84 9d c6 41 05 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 75 51 49 8b 14 24 48 39 ea 0f 85 51 c6 41 05 49 8d 7d
RSP: 0018:ffffc90000bd7bc0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888022b07710 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff879df8f1 RDI: ffff888022b07728
RBP: ffff888022b07720 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888022b07728
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffeb48085d8 CR3: 00000000255dc000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	0f 84 9c c6 41 05    	je     0x541c6a2
   6:	48 b8 22 01 00 00 00 	movabs $0xdead000000000122,%rax
   d:	00 ad de
  10:	49 39 c4             	cmp    %rax,%r12
  13:	0f 84 9d c6 41 05    	je     0x541c6b6
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	4c 89 e2             	mov    %r12,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	75 51                	jne    0x81
  30:	49 8b 14 24          	mov    (%r12),%rdx
  34:	48 39 ea             	cmp    %rbp,%rdx
  37:	0f 85 51 c6 41 05    	jne    0x541c68e
  3d:	49                   	rex.WB
  3e:	8d                   	.byte 0x8d
  3f:	7d                   	.byte 0x7d

Crashes (1444):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2022/06/18 04:01 upstream f0ec9c65a8d6 cb58b3b2 .config log report syz C general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/15 12:06 net-next 6ac6dc746d70 127d1faf .config log report syz C general protection fault in cttimeout_net_exit
ci-qemu-upstream 2022/06/02 23:05 upstream 17d8e3d90b69 02dddea8 .config log report info KASAN: slab-out-of-bounds Read in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/05/17 17:46 net-next 65a9dedc11d6 744a39e2 .config log report info KASAN: slab-out-of-bounds Read in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/05/16 11:50 net-next d887ae3247e0 744a39e2 .config log report info KASAN: slab-out-of-bounds Read in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/24 01:41 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce 2022/06/24 00:35 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/23 18:52 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/23 16:10 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/23 15:07 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/23 13:50 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/23 10:11 upstream 3abc3ae553c7 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/23 09:36 upstream 3abc3ae553c7 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-qemu-upstream 2022/06/23 07:01 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-root 2022/06/23 00:33 upstream 3abc3ae553c7 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-root 2022/06/22 23:22 upstream 3abc3ae553c7 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/22 22:56 upstream 3abc3ae553c7 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-root 2022/06/22 21:35 upstream 3abc3ae553c7 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-root 2022/06/22 20:34 upstream 3abc3ae553c7 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce 2022/06/22 08:22 upstream ca1fdab7fd27 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/22 00:29 upstream ca1fdab7fd27 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/21 23:24 upstream ca1fdab7fd27 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/21 20:27 upstream 78ca55889a54 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-root 2022/06/21 15:21 upstream 78ca55889a54 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/21 05:15 upstream 78ca55889a54 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/21 03:37 upstream 78ca55889a54 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/21 02:24 upstream 78ca55889a54 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-selinux-root 2022/06/20 19:04 upstream 78ca55889a54 8d15e28d .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/20 18:12 upstream 78ca55889a54 8d15e28d .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/20 17:00 upstream 78ca55889a54 8d15e28d .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-root 2022/06/20 15:38 upstream 78ca55889a54 8d15e28d .config log report info general protection fault in cttimeout_net_exit
ci-qemu-upstream 2022/06/20 14:35 upstream a111daf0c53a 789e5a63 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-smack-root 2022/06/20 14:34 upstream a111daf0c53a 8d15e28d .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-root 2022/06/20 13:25 upstream a111daf0c53a 8f633d84 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-386 2022/06/24 07:21 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-kasan-gce-386 2022/06/23 20:15 upstream de5c208d533a 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-qemu-upstream-386 2022/06/21 21:57 upstream ca1fdab7fd27 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-qemu-upstream-386 2022/06/21 00:43 upstream 78ca55889a54 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-qemu2-arm64 2022/06/08 15:59 upstream 9886142c7a22 b2706118 .config log report info BUG: unable to handle kernel paging request in cttimeout_net_exit
ci-qemu2-arm32 2022/05/31 07:18 upstream 2c5ca23f7414 af70c3a9 .config log report info BUG: unable to handle kernel NULL pointer dereference in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/22 10:32 net 69135c572d1f 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/22 08:16 net 69135c572d1f 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/22 02:58 net 69135c572d1f 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/21 16:36 net 69135c572d1f 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/21 08:13 net 69135c572d1f 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/21 04:09 net 69135c572d1f 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/20 12:07 net 313c502fa3b3 8f633d84 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-this-kasan-gce 2022/06/20 10:19 net 313c502fa3b3 8f633d84 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/24 04:05 net-next 85763435d5b5 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/23 08:28 net-next 6dd4142fb5a9 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/23 02:35 net-next 6dd4142fb5a9 912f5df7 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/22 18:44 net-next a80d8fb70cc7 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/22 13:43 net-next a80d8fb70cc7 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/22 06:42 net-next 8720bd951b8e 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/22 04:44 net-next 8720bd951b8e 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/22 01:56 net-next 8720bd951b8e 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/21 12:58 net-next 4336487e30c3 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/21 10:09 net-next 4336487e30c3 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/21 06:31 net-next 4336487e30c3 0fc5c330 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-net-kasan-gce 2022/06/20 09:11 net-next a56b158a5078 8f633d84 .config log report info general protection fault in cttimeout_net_exit
ci-upstream-linux-next-kasan-gce-root 2022/06/22 16:46 linux-next ac0ba5454ca8 0fc5c330 .config log report info BUG: corrupted list in cttimeout_net_exit
ci-upstream-linux-next-kasan-gce-root 2022/06/15 18:59 linux-next 6012273897fe 1719ee24 .config log report info BUG: corrupted list in cttimeout_net_exit