syzbot


general protection fault in __memcg_kmem_charge_page

Status: upstream: reported on 2024/12/25 10:07
Subsystems: cgroups mm
[Documentation on labels]
Reported-by: syzbot+6c87d9f0b4ba556c9d83@syzkaller.appspotmail.com
First crash: 5d18h, last: 5d18h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [cgroups?] [mm?] general protection fault in __memcg_kmem_charge_page 0 (1) 2024/12/25 10:07

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000007: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000038-0x000000000000003f]
CPU: 0 UID: 0 PID: 9346 Comm: syz.4.804 Not tainted 6.13.0-rc3-syzkaller-00193-ge9b8ffafd20a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:__memcg_kmem_charge_page+0x1c5/0x2b0 mm/memcontrol.c:2676
Code: ad 00 00 00 4c 89 e7 be 01 00 00 00 49 83 cc 02 e8 60 1c ff ff 48 8d 7b 38 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 cf 00 00 00 4c 89 63 38 e9 5f ff ff ff 48 3b 2d
RSP: 0018:ffffc900195afa80 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc900195afa00
RDX: 0000000000000007 RSI: ffffffff8b4cd480 RDI: 0000000000000038
RBP: ffff888028d10000 R08: 0000000000000000 R09: fffffbfff2039c72
R10: ffffffff901ce397 R11: 0000000000000000 R12: ffff888031d4df82
R13: 0000000000000001 R14: 0000000000000cc0 R15: dffffc0000000000
FS:  00005555870d9500(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe63461cd58 CR3: 00000000250b4000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 memcg_kmem_charge_page include/linux/memcontrol.h:1697 [inline]
 memcg_charge_kernel_stack kernel/fork.c:265 [inline]
 memcg_charge_kernel_stack+0xc3/0x1f0 kernel/fork.c:256
 alloc_thread_stack_node kernel/fork.c:299 [inline]
 dup_task_struct kernel/fork.c:1121 [inline]
 copy_process+0x5a3/0x6f20 kernel/fork.c:2225
 kernel_clone+0xfd/0x960 kernel/fork.c:2807
 __do_sys_clone3+0x1f9/0x270 kernel/fork.c:3111
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe6337ba589
Code: 1b 08 00 48 8d 3d 9c 1b 08 00 e8 12 29 f6 ff 66 90 b8 ea ff ff ff 48 85 ff 74 2c 48 85 d2 74 27 49 89 c8 b8 b3 01 00 00 0f 05 <48> 85 c0 7c 18 74 01 c3 31 ed 48 83 e4 f0 4c 89 c7 ff d2 48 89 c7
RSP: 002b:00007ffc6268d038 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
RAX: ffffffffffffffda RBX: 00007fe63373c9a0 RCX: 00007fe6337ba589
RDX: 00007fe63373c9a0 RSI: 0000000000000058 RDI: 00007ffc6268d080
RBP: 00007fe63461c6c0 R08: 00007fe63461c6c0 R09: 00007ffc6268d167
R10: 0000000000000008 R11: 0000000000000206 R12: ffffffffffffffa8
R13: 000000000000006e R14: 00007ffc6268d080 R15: 00007ffc6268d168
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__memcg_kmem_charge_page+0x1c5/0x2b0 mm/memcontrol.c:2676
Code: ad 00 00 00 4c 89 e7 be 01 00 00 00 49 83 cc 02 e8 60 1c ff ff 48 8d 7b 38 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 cf 00 00 00 4c 89 63 38 e9 5f ff ff ff 48 3b 2d
RSP: 0018:ffffc900195afa80 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc900195afa00
RDX: 0000000000000007 RSI: ffffffff8b4cd480 RDI: 0000000000000038
RBP: ffff888028d10000 R08: 0000000000000000 R09: fffffbfff2039c72
R10: ffffffff901ce397 R11: 0000000000000000 R12: ffff888031d4df82
R13: 0000000000000001 R14: 0000000000000cc0 R15: dffffc0000000000
FS:  00005555870d9500(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4aaa7452d8 CR3: 00000000250b4000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	ad                   	lods   %ds:(%rsi),%eax
   1:	00 00                	add    %al,(%rax)
   3:	00 4c 89 e7          	add    %cl,-0x19(%rcx,%rcx,4)
   7:	be 01 00 00 00       	mov    $0x1,%esi
   c:	49 83 cc 02          	or     $0x2,%r12
  10:	e8 60 1c ff ff       	call   0xffff1c75
  15:	48 8d 7b 38          	lea    0x38(%rbx),%rdi
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 cf 00 00 00    	jne    0x103
  34:	4c 89 63 38          	mov    %r12,0x38(%rbx)
  38:	e9 5f ff ff ff       	jmp    0xffffff9c
  3d:	48                   	rex.W
  3e:	3b                   	.byte 0x3b
  3f:	2d                   	.byte 0x2d

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/21 06:07 upstream e9b8ffafd20a d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in __memcg_kmem_charge_page
* Struck through repros no longer work on HEAD.