KASAN: vmalloc-out-of-bounds Read in __cgroup_bpf_run_filter_getsockopt

Status: premoderation: reported on 2026/07/01 06:53
Reported-by: syzbot+9393e372d588faffc447@syzkaller.appspotmail.com
First crash: 30d, last: 30d

Sample crash report:
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in __bpf_prog_run include/linux/filter.h:628 [inline]
BUG: KASAN: vmalloc-out-of-bounds in bpf_prog_run include/linux/filter.h:635 [inline]
BUG: KASAN: vmalloc-out-of-bounds in BPF_PROG_RUN_ARRAY_CG include/linux/bpf.h:1310 [inline]
BUG: KASAN: vmalloc-out-of-bounds in __cgroup_bpf_run_filter_getsockopt+0x3c5/0x980 kernel/bpf/cgroup.c:1589
Read of size 8 at addr ffffc9000019e030 by task syz-executor/289

CPU: 0 PID: 289 Comm: syz-executor Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0x10f/0x150 mm/kasan/report.c:444
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
 __bpf_prog_run include/linux/filter.h:628 [inline]
 bpf_prog_run include/linux/filter.h:635 [inline]
 BPF_PROG_RUN_ARRAY_CG include/linux/bpf.h:1310 [inline]
 __cgroup_bpf_run_filter_getsockopt+0x3c5/0x980 kernel/bpf/cgroup.c:1589
 __sys_getsockopt+0x3f4/0x400 net/socket.c:2250
 __do_sys_getsockopt net/socket.c:2261 [inline]
 __se_sys_getsockopt net/socket.c:2258 [inline]
 __x64_sys_getsockopt+0xbf/0xd0 net/socket.c:2258
 x64_sys_call+0x6db/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:56
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f17011a462a
Code: 48 83 ec 10 89 d2 48 63 ff 45 31 c9 6a 2a 45 31 c0 31 c9 e8 d8 99 fb ff 48 83 c4 18 c3 0f 1f 00 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 e8 ff ff ff f7
RSP: 002b:00007ffd64109178 EFLAGS: 00000212 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007ffd64109200 RCX: 00007f17011a462a
RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007ffd6410919c R09: 0000000000000000
R10: 00007ffd64109200 R11: 0000000000000212 R12: 00007f17013f1b80
R13: 00007ffd6410919c R14: 0000000000000000 R15: 00007f17013f2fc0
 </TASK>


Memory state around the buggy address:
 ffffc9000019df00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc9000019df80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc9000019e000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                                     ^
 ffffc9000019e080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc9000019e100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================
BUG: unable to handle page fault for address: ffffc9000019e030
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067 P4D 100000067 PUD 100139067 PMD 10013a067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 289 Comm: syz-executor Tainted: G    B             syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
RIP: 0010:bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
RIP: 0010:__bpf_prog_run include/linux/filter.h:628 [inline]
RIP: 0010:bpf_prog_run include/linux/filter.h:635 [inline]
RIP: 0010:BPF_PROG_RUN_ARRAY_CG include/linux/bpf.h:1310 [inline]
RIP: 0010:__cgroup_bpf_run_filter_getsockopt+0x3d4/0x980 kernel/bpf/cgroup.c:1589
Code: c1 e8 03 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 4c 89 f7 e8 6b 9e 1f 00 49 83 c7 48 48 8d bc 24 e0 00 00 00 4c 89 fe <41> ff 16 41 89 c6 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff
RSP: 0018:ffffc90000a47cc0 EFLAGS: 00010286
RAX: ffff888120dda701 RBX: ffff8881322c8f28 RCX: ffff888120dda780
RDX: 0000000000000000 RSI: ffffc9000019e048 RDI: ffffc90000a47da0
RBP: ffffc90000a47e58 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e18c4c R12: 0000000000000001
R13: ffff8881322c8f28 R14: ffffc9000019e030 R15: ffffc9000019e048
FS:  00005555556be500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000019e030 CR3: 0000000127cb4000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __sys_getsockopt+0x3f4/0x400 net/socket.c:2250
 __do_sys_getsockopt net/socket.c:2261 [inline]
 __se_sys_getsockopt net/socket.c:2258 [inline]
 __x64_sys_getsockopt+0xbf/0xd0 net/socket.c:2258
 x64_sys_call+0x6db/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:56
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f17011a462a
Code: 48 83 ec 10 89 d2 48 63 ff 45 31 c9 6a 2a 45 31 c0 31 c9 e8 d8 99 fb ff 48 83 c4 18 c3 0f 1f 00 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 e8 ff ff ff f7
RSP: 002b:00007ffd64109178 EFLAGS: 00000212 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007ffd64109200 RCX: 00007f17011a462a
RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007ffd6410919c R09: 0000000000000000
R10: 00007ffd64109200 R11: 0000000000000212 R12: 00007f17013f1b80
R13: 00007ffd6410919c R14: 0000000000000000 R15: 00007f17013f2fc0
 </TASK>
Modules linked in:
CR2: ffffc9000019e030
---[ end trace f209e3ea292f7914 ]---
RIP: 0010:bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
RIP: 0010:__bpf_prog_run include/linux/filter.h:628 [inline]
RIP: 0010:bpf_prog_run include/linux/filter.h:635 [inline]
RIP: 0010:BPF_PROG_RUN_ARRAY_CG include/linux/bpf.h:1310 [inline]
RIP: 0010:__cgroup_bpf_run_filter_getsockopt+0x3d4/0x980 kernel/bpf/cgroup.c:1589
Code: c1 e8 03 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 4c 89 f7 e8 6b 9e 1f 00 49 83 c7 48 48 8d bc 24 e0 00 00 00 4c 89 fe <41> ff 16 41 89 c6 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff
RSP: 0018:ffffc90000a47cc0 EFLAGS: 00010286
RAX: ffff888120dda701 RBX: ffff8881322c8f28 RCX: ffff888120dda780
RDX: 0000000000000000 RSI: ffffc9000019e048 RDI: ffffc90000a47da0
RBP: ffffc90000a47e58 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e18c4c R12: 0000000000000001
R13: ffff8881322c8f28 R14: ffffc9000019e030 R15: ffffc9000019e048
FS:  00005555556be500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000019e030 CR3: 0000000127cb4000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	c1 e8 03             	shr    $0x3,%eax
   3:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
   a:	fc ff df
   d:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1)
  11:	74 08                	je     0x1b
  13:	4c 89 f7             	mov    %r14,%rdi
  16:	e8 6b 9e 1f 00       	call   0x1f9e86
  1b:	49 83 c7 48          	add    $0x48,%r15
  1f:	48 8d bc 24 e0 00 00 	lea    0xe0(%rsp),%rdi
  26:	00
  27:	4c 89 fe             	mov    %r15,%rsi
* 2a:	41 ff 16             	call   *(%r14) <-- trapping instruction
  2d:	41 89 c6             	mov    %eax,%r14d
  30:	4c 89 e8             	mov    %r13,%rax
  33:	48 c1 e8 03          	shr    $0x3,%rax
  37:	48                   	rex.W
  38:	b9 00 00 00 00       	mov    $0x0,%ecx
  3d:	00 fc                	add    %bh,%ah
  3f:	ff                   	.byte 0xff

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/01 06:52 android13-5.15-lts c85054db4618 00a5cf1c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: vmalloc-out-of-bounds Read in __cgroup_bpf_run_filter_getsockopt
* Struck through repros no longer work on HEAD.