syzbot


general protection fault in cgroup_sk_free

Status: fixed on 2022/03/08 16:11
Subsystems: cgroups
[Documentation on labels]
Reported-by: syzbot+df709157a4ecaf192b03@syzkaller.appspotmail.com
Fix commit: 78cc316e9583 bpf, cgroup: Assign cgroup in cgroup_sk_alloc when called from interrupt
First crash: 947d, last: 931d
Cause bisection: failed (error log, bisect log)
  
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.14 000/849] 5.14.19-rc1 review 859 (859) 2021/11/16 14:04
[PATCH bpf v2 1/2] bpf, cgroup: Assign cgroup in cgroup_sk_alloc when called from interrupt 2 (2) 2021/09/27 12:39
[PATCH bpf 1/2] bpf, cgroup: Assign cgroup in cgroup_sk_alloc when called from interrupt 4 (4) 2021/09/24 21:20
[syzbot] general protection fault in cgroup_sk_free 0 (1) 2021/09/17 21:06
Last patch testing requests (7)
Created Duration User Patch Repo Result
2021/09/23 10:14 18m daniel@iogearbox.net git://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-cgroup-test4 OK
2021/09/23 08:24 19m daniel@iogearbox.net git://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-cgroup-test2 OK
2021/09/22 22:57 12m daniel@iogearbox.net git://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-cgroup-test2 report log
2021/09/21 14:48 12m daniel@iogearbox.net git://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-cgroup-test3 OK
2021/09/21 06:28 15m daniel@iogearbox.net git://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-cgroup-test3 OK
2021/09/20 22:20 18m daniel@iogearbox.net git://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-cgroup-test2 report log
2021/09/17 22:27 13m daniel@iogearbox.net git://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-cgroup-test OK

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000182: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000c10-0x0000000000000c17]
CPU: 0 PID: 8488 Comm: syz-executor364 Not tainted 5.15.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__ref_is_percpu include/linux/percpu-refcount.h:174 [inline]
RIP: 0010:percpu_ref_put_many include/linux/percpu-refcount.h:319 [inline]
RIP: 0010:percpu_ref_put include/linux/percpu-refcount.h:338 [inline]
RIP: 0010:cgroup_bpf_put include/linux/cgroup.h:926 [inline]
RIP: 0010:cgroup_sk_free+0x8d/0x570 kernel/cgroup/cgroup.c:6613
Code: 0e 06 00 40 84 ed 5a 0f 84 42 01 00 00 e8 0b 08 06 00 4c 8d ab 10 0c 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 6f 04 00 00 48 8b ab 10 0c 00 00 31 ff 49 89 ec
RSP: 0018:ffffc9000c9779c0 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000182 RSI: ffffffff817003d5 RDI: 0000000000000003
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff817003c6 R11: 0000000000000000 R12: ffff888013fdc000
R13: 0000000000000c10 R14: ffffffff8d0d050c R15: ffff888013fdc060
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 000000000b68e000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 sk_prot_free net/core/sock.c:1852 [inline]
 __sk_destruct+0x579/0x900 net/core/sock.c:1943
 sk_destruct+0xbd/0xe0 net/core/sock.c:1958
 __sk_free+0xef/0x3d0 net/core/sock.c:1969
 sk_free+0x78/0xa0 net/core/sock.c:1980
 sock_put include/net/sock.h:1815 [inline]
 nr_release+0x392/0x450 net/netrom/af_netrom.c:554
 __sock_release+0xcd/0x280 net/socket.c:649
 sock_close+0x18/0x20 net/socket.c:1314
 __fput+0x288/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xbae/0x2a30 kernel/exit.c:825
 do_group_exit+0x125/0x310 kernel/exit.c:922
 get_signal+0x47f/0x2160 kernel/signal.c:2868
 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:865
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f4c4b1976e9
Code: Unable to access opcode bytes at RIP 0x7f4c4b1976bf.
RSP: 002b:00007ffe4df31a88 EFLAGS: 00000246 ORIG_RAX: 000000000000002b
RAX: 0000000000000003 RBX: 0000000000000003 RCX: 00007f4c4b1976e9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 0000000000000003 R08: 000000000000000d R09: 000000000000000d
R10: 000000000000000d R11: 0000000000000246 R12: 00005555571f42c0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace b7c05983b96ea5b8 ]---
RIP: 0010:__ref_is_percpu include/linux/percpu-refcount.h:174 [inline]
RIP: 0010:percpu_ref_put_many include/linux/percpu-refcount.h:319 [inline]
RIP: 0010:percpu_ref_put include/linux/percpu-refcount.h:338 [inline]
RIP: 0010:cgroup_bpf_put include/linux/cgroup.h:926 [inline]
RIP: 0010:cgroup_sk_free+0x8d/0x570 kernel/cgroup/cgroup.c:6613
Code: 0e 06 00 40 84 ed 5a 0f 84 42 01 00 00 e8 0b 08 06 00 4c 8d ab 10 0c 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 6f 04 00 00 48 8b ab 10 0c 00 00 31 ff 49 89 ec
RSP: 0018:ffffc9000c9779c0 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000182 RSI: ffffffff817003d5 RDI: 0000000000000003
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff817003c6 R11: 0000000000000000 R12: ffff888013fdc000
R13: 0000000000000c10 R14: ffffffff8d0d050c R15: ffff888013fdc060
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa05e0e6000 CR3: 000000006ff9f000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 2 bytes skipped:
   0:	00 40 84             	add    %al,-0x7c(%rax)
   3:	ed                   	in     (%dx),%eax
   4:	5a                   	pop    %rdx
   5:	0f 84 42 01 00 00    	je     0x14d
   b:	e8 0b 08 06 00       	callq  0x6081b
  10:	4c 8d ab 10 0c 00 00 	lea    0xc10(%rbx),%r13
  17:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1e:	fc ff df
  21:	4c 89 ea             	mov    %r13,%rdx
  24:	48 c1 ea 03          	shr    $0x3,%rdx
* 28:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2c:	0f 85 6f 04 00 00    	jne    0x4a1
  32:	48 8b ab 10 0c 00 00 	mov    0xc10(%rbx),%rbp
  39:	31 ff                	xor    %edi,%edi
  3b:	49 89 ec             	mov    %rbp,%r12

Crashes (2727):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/18 18:55 net-old 02319bf15acf 70b76c1d .config console log report syz C ci-upstream-net-this-kasan-gce general protection fault in cgroup_sk_free
2021/09/15 10:18 net-old 7366c23ff492 07e953c1 .config console log report syz C ci-upstream-net-this-kasan-gce general protection fault in cgroup_sk_free
2021/09/18 18:56 net-next-old 0efcc3f20145 70b76c1d .config console log report syz C ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/15 13:11 linux-next 70ced02f322f 07e953c1 .config console log report syz C ci-upstream-linux-next-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/15 09:04 net-old 7366c23ff492 07e953c1 .config console log report syz ci-upstream-net-this-kasan-gce general protection fault in cgroup_sk_free
2021/10/01 13:58 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/10/01 12:50 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/10/01 11:21 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/30 23:26 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in cgroup_sk_free
2021/09/30 22:22 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/30 22:06 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/30 21:04 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/30 20:03 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/30 16:08 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in cgroup_sk_free
2021/09/30 11:09 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/30 07:33 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/29 19:18 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in cgroup_sk_free
2021/09/29 19:01 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in cgroup_sk_free
2021/09/29 17:46 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in cgroup_sk_free
2021/09/29 16:46 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/29 14:26 upstream a4e6f95a891a be530f6c .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in cgroup_sk_free
2021/09/29 07:41 upstream a4e6f95a891a d82cb927 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/29 06:57 upstream a4e6f95a891a d82cb927 .config console log report info ci-upstream-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/27 20:46 net-old 763716a55cb1 78494d16 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in cgroup_sk_free
2021/09/15 04:21 net-old 7366c23ff492 07e953c1 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in cgroup_sk_free
2021/10/01 09:04 net-next-old 69508d43334e 1d849ab4 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/10/01 07:52 net-next-old 69508d43334e 1d849ab4 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/10/01 06:21 net-next-old 69508d43334e 1d849ab4 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/10/01 05:12 net-next-old 69508d43334e 1d849ab4 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/10/01 03:36 net-next-old 69508d43334e 1d849ab4 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/10/01 01:16 net-next-old 69508d43334e 1d849ab4 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 19:05 net-next-old 69508d43334e be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 17:31 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 14:54 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 12:45 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 11:11 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 09:24 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 06:26 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 05:22 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 04:14 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 01:47 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 00:45 net-next-old ef91abfb20c7 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 20:54 net-next-old b69c99463d41 be530f6c .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 13:26 net-next-old b69c99463d41 d82cb927 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 11:22 net-next-old b69c99463d41 d82cb927 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 10:27 net-next-old b69c99463d41 d82cb927 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 09:20 net-next-old b69c99463d41 d82cb927 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 05:55 net-next-old b69c99463d41 d82cb927 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 05:22 net-next-old b69c99463d41 d82cb927 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/29 04:15 net-next-old b69c99463d41 d82cb927 .config console log report info ci-upstream-net-kasan-gce general protection fault in cgroup_sk_free
2021/09/30 02:56 linux-next bf5b1e621a51 be530f6c .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/29 21:58 linux-next bf5b1e621a51 be530f6c .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/29 16:01 linux-next bf5b1e621a51 be530f6c .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/29 14:59 linux-next bf5b1e621a51 be530f6c .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in cgroup_sk_free
2021/09/29 12:24 linux-next bf5b1e621a51 d82cb927 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in cgroup_sk_free
* Struck through repros no longer work on HEAD.