Linux Trace Kernel
 help / color / mirror / Atom feed
* [syzbot] [trace?] general protection fault in mtree_load
@ 2026-06-22  6:59 syzbot
  2026-06-22 13:04 ` Oleg Nesterov
  2026-07-01  1:32 ` syzbot
  0 siblings, 2 replies; 6+ messages in thread
From: syzbot @ 2026-06-22  6:59 UTC (permalink / raw)
  To: bp, dave.hansen, hpa, linux-kernel, linux-trace-kernel, mhiramat,
	mingo, oleg, peterz, syzkaller-bugs, tglx, x86

Hello,

syzbot found the following issue on:

HEAD commit:    6b5a2b7d9bc1 Merge tag 'trace-tools-v7.2' of git://git.ker..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16d56986580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ea6584355d75e0cd
dashboard link: https://syzkaller.appspot.com/bug?extid=61ce80689253f42e6d80
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-6b5a2b7d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b3cb0499fbe9/vmlinux-6b5a2b7d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/47cfbe57f6ea/bzImage-6b5a2b7d.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 3 UID: 0 PID: 24402 Comm: syz.4.5217 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:mas_root lib/maple_tree.c:759 [inline]
RIP: 0010:mas_start lib/maple_tree.c:1179 [inline]
RIP: 0010:mtree_load+0x16d/0xa90 lib/maple_tree.c:5657
Code: 00 00 00 00 48 c7 44 24 78 ff ff ff ff e8 6b bd 84 f6 48 8b 5c 24 50 c6 84 24 9c 00 00 00 00 48 8d 7b 48 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 d6 08 00 00 48 8b 5b 48 e8 6f 1a 08 00 31 ff
RSP: 0018:ffffc900039c76d8 EFLAGS: 00010206
RAX: 0000000000000011 RBX: 0000000000000040 RCX: ffffffff8b848746
RDX: ffff888041b6a540 RSI: ffffffff8b848775 RDI: 0000000000000088
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
R10: 0000000000000001 R11: 000000000000751b R12: dffffc0000000000
R13: ffff88802693adc0 R14: 00001fff904365a7 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880d665f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f44aa04f156 CR3: 00000000364d5000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 vma_lookup include/linux/mm.h:4204 [inline]
 __in_uprobe_trampoline arch/x86/kernel/uprobes.c:766 [inline]
 __is_optimized arch/x86/kernel/uprobes.c:1056 [inline]
 is_optimized arch/x86/kernel/uprobes.c:1067 [inline]
 set_orig_insn+0x1ec/0x2a0 arch/x86/kernel/uprobes.c:1098
 remove_breakpoint kernel/events/uprobes.c:1185 [inline]
 register_for_each_vma+0xbb7/0xdb0 kernel/events/uprobes.c:1318
 uprobe_unregister_nosync+0x12a/0x1c0 kernel/events/uprobes.c:1343
 bpf_uprobe_unregister kernel/trace/bpf_trace.c:2936 [inline]
 bpf_uprobe_multi_link_release+0xb3/0x1c0 kernel/trace/bpf_trace.c:2947
 bpf_link_free+0xec/0x4a0 kernel/bpf/syscall.c:3273
 bpf_link_put_direct kernel/bpf/syscall.c:3326 [inline]
 bpf_link_release+0x5d/0x80 kernel/bpf/syscall.c:3333
 __fput+0x3ff/0xb50 fs/file_table.c:512
 task_work_run+0x150/0x240 kernel/task_work.c:233
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0x951/0x2ae0 kernel/exit.c:1004
 do_group_exit+0xd5/0x2a0 kernel/exit.c:1147
 get_signal+0x1ec7/0x21e0 kernel/signal.c:3038
 arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
 exit_to_user_mode_loop+0x139/0x6f0 kernel/entry/common.c:101
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
 ret_from_fork+0x932/0xd50 arch/x86/kernel/process.c:167
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mas_root lib/maple_tree.c:759 [inline]
RIP: 0010:mas_start lib/maple_tree.c:1179 [inline]
RIP: 0010:mtree_load+0x16d/0xa90 lib/maple_tree.c:5657
Code: 00 00 00 00 48 c7 44 24 78 ff ff ff ff e8 6b bd 84 f6 48 8b 5c 24 50 c6 84 24 9c 00 00 00 00 48 8d 7b 48 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 d6 08 00 00 48 8b 5b 48 e8 6f 1a 08 00 31 ff
RSP: 0018:ffffc900039c76d8 EFLAGS: 00010206
RAX: 0000000000000011 RBX: 0000000000000040 RCX: ffffffff8b848746
RDX: ffff888041b6a540 RSI: ffffffff8b848775 RDI: 0000000000000088
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
R10: 0000000000000001 R11: 000000000000751b R12: dffffc0000000000
R13: ffff88802693adc0 R14: 00001fff904365a7 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880d665f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c433cbf CR3: 00000000429b6000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	48 c7 44 24 78 ff ff 	movq   $0xffffffffffffffff,0x78(%rsp)
   b:	ff ff
   d:	e8 6b bd 84 f6       	call   0xf684bd7d
  12:	48 8b 5c 24 50       	mov    0x50(%rsp),%rbx
  17:	c6 84 24 9c 00 00 00 	movb   $0x0,0x9c(%rsp)
  1e:	00
  1f:	48 8d 7b 48          	lea    0x48(%rbx),%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f:	0f 85 d6 08 00 00    	jne    0x90b
  35:	48 8b 5b 48          	mov    0x48(%rbx),%rbx
  39:	e8 6f 1a 08 00       	call   0x81aad
  3e:	31 ff                	xor    %edi,%edi


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [trace?] general protection fault in mtree_load
  2026-06-22  6:59 [syzbot] [trace?] general protection fault in mtree_load syzbot
@ 2026-06-22 13:04 ` Oleg Nesterov
  2026-06-24  7:49   ` Jiri Olsa
  2026-07-01  1:32 ` syzbot
  1 sibling, 1 reply; 6+ messages in thread
From: Oleg Nesterov @ 2026-06-22 13:04 UTC (permalink / raw)
  To: syzbot
  Cc: bp, dave.hansen, hpa, linux-kernel, linux-trace-kernel, mhiramat,
	mingo, peterz, syzkaller-bugs, tglx, x86

On 06/21, syzbot wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:    6b5a2b7d9bc1 Merge tag 'trace-tools-v7.2' of git://git.ker..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=16d56986580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=ea6584355d75e0cd
> dashboard link: https://syzkaller.appspot.com/bug?extid=61ce80689253f42e6d80
> compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-6b5a2b7d.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/b3cb0499fbe9/vmlinux-6b5a2b7d.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/47cfbe57f6ea/bzImage-6b5a2b7d.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com
>
> Oops: general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] SMP KASAN NOPTI
> KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
> CPU: 3 UID: 0 PID: 24402 Comm: syz.4.5217 Tainted: G             L      syzkaller #0 PREEMPT(full)
> Tainted: [L]=SOFTLOCKUP
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
> RIP: 0010:mas_root lib/maple_tree.c:759 [inline]
> RIP: 0010:mas_start lib/maple_tree.c:1179 [inline]
> RIP: 0010:mtree_load+0x16d/0xa90 lib/maple_tree.c:5657
> Code: 00 00 00 00 48 c7 44 24 78 ff ff ff ff e8 6b bd 84 f6 48 8b 5c 24 50 c6 84 24 9c 00 00 00 00 48 8d 7b 48 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 d6 08 00 00 48 8b 5b 48 e8 6f 1a 08 00 31 ff
> RSP: 0018:ffffc900039c76d8 EFLAGS: 00010206
> RAX: 0000000000000011 RBX: 0000000000000040 RCX: ffffffff8b848746
> RDX: ffff888041b6a540 RSI: ffffffff8b848775 RDI: 0000000000000088
> RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
> R10: 0000000000000001 R11: 000000000000751b R12: dffffc0000000000
> R13: ffff88802693adc0 R14: 00001fff904365a7 R15: dffffc0000000000
> FS:  0000000000000000(0000) GS:ffff8880d665f000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f44aa04f156 CR3: 00000000364d5000 CR4: 0000000000352ef0
> Call Trace:
>  <TASK>
>  vma_lookup include/linux/mm.h:4204 [inline]
>  __in_uprobe_trampoline arch/x86/kernel/uprobes.c:766 [inline]
>  __is_optimized arch/x86/kernel/uprobes.c:1056 [inline]
>  is_optimized arch/x86/kernel/uprobes.c:1067 [inline]
>  set_orig_insn+0x1ec/0x2a0 arch/x86/kernel/uprobes.c:1098
>  remove_breakpoint kernel/events/uprobes.c:1185 [inline]
>  register_for_each_vma+0xbb7/0xdb0 kernel/events/uprobes.c:1318
>  uprobe_unregister_nosync+0x12a/0x1c0 kernel/events/uprobes.c:1343
>  bpf_uprobe_unregister kernel/trace/bpf_trace.c:2936 [inline]
>  bpf_uprobe_multi_link_release+0xb3/0x1c0 kernel/trace/bpf_trace.c:2947
>  bpf_link_free+0xec/0x4a0 kernel/bpf/syscall.c:3273
>  bpf_link_put_direct kernel/bpf/syscall.c:3326 [inline]
>  bpf_link_release+0x5d/0x80 kernel/bpf/syscall.c:3333
>  __fput+0x3ff/0xb50 fs/file_table.c:512
>  task_work_run+0x150/0x240 kernel/task_work.c:233
>  exit_task_work include/linux/task_work.h:40 [inline]

current->mm is already NULL, the exiting task has already passed exit_mm().

Hopefully

	[PATCHv4 01/13] uprobes/x86: Use proper mm_struct in __in_uprobe_trampoline
	https://lore.kernel.org/all/20260526205840.173790-2-jolsa@kernel.org/

should help...

Oleg.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [trace?] general protection fault in mtree_load
  2026-06-22 13:04 ` Oleg Nesterov
@ 2026-06-24  7:49   ` Jiri Olsa
  0 siblings, 0 replies; 6+ messages in thread
From: Jiri Olsa @ 2026-06-24  7:49 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: syzbot, bp, dave.hansen, hpa, linux-kernel, linux-trace-kernel,
	mhiramat, mingo, peterz, syzkaller-bugs, tglx, x86

On Mon, Jun 22, 2026 at 03:04:16PM +0200, Oleg Nesterov wrote:
> On 06/21, syzbot wrote:
> >
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit:    6b5a2b7d9bc1 Merge tag 'trace-tools-v7.2' of git://git.ker..
> > git tree:       upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=16d56986580000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=ea6584355d75e0cd
> > dashboard link: https://syzkaller.appspot.com/bug?extid=61ce80689253f42e6d80
> > compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
> >
> > Unfortunately, I don't have any reproducer for this issue yet.
> >
> > Downloadable assets:
> > disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-6b5a2b7d.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/b3cb0499fbe9/vmlinux-6b5a2b7d.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/47cfbe57f6ea/bzImage-6b5a2b7d.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com
> >
> > Oops: general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] SMP KASAN NOPTI
> > KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
> > CPU: 3 UID: 0 PID: 24402 Comm: syz.4.5217 Tainted: G             L      syzkaller #0 PREEMPT(full)
> > Tainted: [L]=SOFTLOCKUP
> > Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
> > RIP: 0010:mas_root lib/maple_tree.c:759 [inline]
> > RIP: 0010:mas_start lib/maple_tree.c:1179 [inline]
> > RIP: 0010:mtree_load+0x16d/0xa90 lib/maple_tree.c:5657
> > Code: 00 00 00 00 48 c7 44 24 78 ff ff ff ff e8 6b bd 84 f6 48 8b 5c 24 50 c6 84 24 9c 00 00 00 00 48 8d 7b 48 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 d6 08 00 00 48 8b 5b 48 e8 6f 1a 08 00 31 ff
> > RSP: 0018:ffffc900039c76d8 EFLAGS: 00010206
> > RAX: 0000000000000011 RBX: 0000000000000040 RCX: ffffffff8b848746
> > RDX: ffff888041b6a540 RSI: ffffffff8b848775 RDI: 0000000000000088
> > RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
> > R10: 0000000000000001 R11: 000000000000751b R12: dffffc0000000000
> > R13: ffff88802693adc0 R14: 00001fff904365a7 R15: dffffc0000000000
> > FS:  0000000000000000(0000) GS:ffff8880d665f000(0000) knlGS:0000000000000000
> > CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 00007f44aa04f156 CR3: 00000000364d5000 CR4: 0000000000352ef0
> > Call Trace:
> >  <TASK>
> >  vma_lookup include/linux/mm.h:4204 [inline]
> >  __in_uprobe_trampoline arch/x86/kernel/uprobes.c:766 [inline]
> >  __is_optimized arch/x86/kernel/uprobes.c:1056 [inline]
> >  is_optimized arch/x86/kernel/uprobes.c:1067 [inline]
> >  set_orig_insn+0x1ec/0x2a0 arch/x86/kernel/uprobes.c:1098
> >  remove_breakpoint kernel/events/uprobes.c:1185 [inline]
> >  register_for_each_vma+0xbb7/0xdb0 kernel/events/uprobes.c:1318
> >  uprobe_unregister_nosync+0x12a/0x1c0 kernel/events/uprobes.c:1343
> >  bpf_uprobe_unregister kernel/trace/bpf_trace.c:2936 [inline]
> >  bpf_uprobe_multi_link_release+0xb3/0x1c0 kernel/trace/bpf_trace.c:2947
> >  bpf_link_free+0xec/0x4a0 kernel/bpf/syscall.c:3273
> >  bpf_link_put_direct kernel/bpf/syscall.c:3326 [inline]
> >  bpf_link_release+0x5d/0x80 kernel/bpf/syscall.c:3333
> >  __fput+0x3ff/0xb50 fs/file_table.c:512
> >  task_work_run+0x150/0x240 kernel/task_work.c:233
> >  exit_task_work include/linux/task_work.h:40 [inline]
> 
> current->mm is already NULL, the exiting task has already passed exit_mm().
> 
> Hopefully
> 
> 	[PATCHv4 01/13] uprobes/x86: Use proper mm_struct in __in_uprobe_trampoline
> 	https://lore.kernel.org/all/20260526205840.173790-2-jolsa@kernel.org/
> 
> should help...

yes, that sould fix it

thanks,
jirka

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [trace?] general protection fault in mtree_load
  2026-06-22  6:59 [syzbot] [trace?] general protection fault in mtree_load syzbot
  2026-06-22 13:04 ` Oleg Nesterov
@ 2026-07-01  1:32 ` syzbot
  2026-07-01  9:09   ` Oleg Nesterov
  1 sibling, 1 reply; 6+ messages in thread
From: syzbot @ 2026-07-01  1:32 UTC (permalink / raw)
  To: bp, dave.hansen, hpa, linux-kernel, linux-trace-kernel, mhiramat,
	mingo, oleg, olsajiri, peterz, syzkaller-bugs, tglx, x86

syzbot has found a reproducer for the following issue on:

HEAD commit:    dc59e4fea9d8 Linux 7.2-rc1
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15c7d61c580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=f9bf5d2bfae96234
dashboard link: https://syzkaller.appspot.com/bug?extid=61ce80689253f42e6d80
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12bbb11c580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=130bf4ea580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-dc59e4fe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1bc8aed8d2e8/vmlinux-dc59e4fe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b1fdfc4aa09/bzImage-dc59e4fe.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 3 UID: 0 PID: 6107 Comm: syz.0.85 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:mas_root lib/maple_tree.c:759 [inline]
RIP: 0010:mas_start lib/maple_tree.c:1179 [inline]
RIP: 0010:mtree_load+0x16d/0xa90 lib/maple_tree.c:5657
Code: 00 00 00 00 48 c7 44 24 78 ff ff ff ff e8 5b c8 74 f6 48 8b 5c 24 50 c6 84 24 9c 00 00 00 00 48 8d 7b 48 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 d6 08 00 00 48 8b 5b 48 e8 3f 1a 08 00 31 ff
RSP: 0018:ffffc9000412f740 EFLAGS: 00010206
RAX: 0000000000000011 RBX: 0000000000000040 RCX: ffffffff8b94b796
RDX: ffff888035462540 RSI: ffffffff8b94b7c5 RDI: 0000000000000088
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: dffffc0000000000
R13: ffff888013522280 R14: 0000200000ffc007 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880d63e0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc8aaa4cff8 CR3: 0000000038832000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 vma_lookup include/linux/mm.h:4238 [inline]
 __in_uprobe_trampoline arch/x86/kernel/uprobes.c:766 [inline]
 __is_optimized arch/x86/kernel/uprobes.c:1056 [inline]
 is_optimized arch/x86/kernel/uprobes.c:1067 [inline]
 set_orig_insn+0x1ec/0x2a0 arch/x86/kernel/uprobes.c:1098
 remove_breakpoint kernel/events/uprobes.c:1185 [inline]
 register_for_each_vma+0xbb7/0xdb0 kernel/events/uprobes.c:1318
 uprobe_unregister_nosync+0x12a/0x1c0 kernel/events/uprobes.c:1343
 bpf_uprobe_unregister kernel/trace/bpf_trace.c:2982 [inline]
 bpf_uprobe_multi_link_release+0xb3/0x1c0 kernel/trace/bpf_trace.c:2993
 bpf_link_free+0xec/0x4a0 kernel/bpf/syscall.c:3395
 bpf_link_put_direct kernel/bpf/syscall.c:3448 [inline]
 bpf_link_release+0x5d/0x80 kernel/bpf/syscall.c:3455
 __fput+0x3ff/0xb50 fs/file_table.c:512
 task_work_run+0x150/0x240 kernel/task_work.c:233
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0x951/0x2ae0 kernel/exit.c:1004
 do_group_exit+0xd5/0x2a0 kernel/exit.c:1147
 get_signal+0x1ec7/0x21e0 kernel/signal.c:3038
 arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
 exit_to_user_mode_loop+0x139/0x6f0 kernel/entry/common.c:101
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
 do_syscall_64+0x666/0x870 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc8a9b9de59
Code: Unable to access opcode bytes at 0x7fc8a9b9de2f.
RSP: 002b:00007fc8aaa4d0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007fc8a9e25fa8 RCX: 00007fc8a9b9de59
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fc8a9e25fa8
RBP: 00007fc8a9e25fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc8a9e26038 R14: 00007fff99db45c0 R15: 00007fff99db46a8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mas_root lib/maple_tree.c:759 [inline]
RIP: 0010:mas_start lib/maple_tree.c:1179 [inline]
RIP: 0010:mtree_load+0x16d/0xa90 lib/maple_tree.c:5657
Code: 00 00 00 00 48 c7 44 24 78 ff ff ff ff e8 5b c8 74 f6 48 8b 5c 24 50 c6 84 24 9c 00 00 00 00 48 8d 7b 48 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 d6 08 00 00 48 8b 5b 48 e8 3f 1a 08 00 31 ff
RSP: 0018:ffffc9000412f740 EFLAGS: 00010206

RAX: 0000000000000011 RBX: 0000000000000040 RCX: ffffffff8b94b796
RDX: ffff888035462540 RSI: ffffffff8b94b7c5 RDI: 0000000000000088
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: dffffc0000000000
R13: ffff888013522280 R14: 0000200000ffc007 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880d63e0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc8aaa4cff8 CR3: 0000000038832000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	48 c7 44 24 78 ff ff 	movq   $0xffffffffffffffff,0x78(%rsp)
   b:	ff ff
   d:	e8 5b c8 74 f6       	call   0xf674c86d
  12:	48 8b 5c 24 50       	mov    0x50(%rsp),%rbx
  17:	c6 84 24 9c 00 00 00 	movb   $0x0,0x9c(%rsp)
  1e:	00
  1f:	48 8d 7b 48          	lea    0x48(%rbx),%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f:	0f 85 d6 08 00 00    	jne    0x90b
  35:	48 8b 5b 48          	mov    0x48(%rbx),%rbx
  39:	e8 3f 1a 08 00       	call   0x81a7d
  3e:	31 ff                	xor    %edi,%edi


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [trace?] general protection fault in mtree_load
  2026-07-01  1:32 ` syzbot
@ 2026-07-01  9:09   ` Oleg Nesterov
  2026-07-01  9:42     ` syzbot
  0 siblings, 1 reply; 6+ messages in thread
From: Oleg Nesterov @ 2026-07-01  9:09 UTC (permalink / raw)
  To: syzbot
  Cc: bp, dave.hansen, hpa, linux-kernel, linux-trace-kernel, mhiramat,
	mingo, olsajiri, peterz, syzkaller-bugs, tglx, x86

On 06/30, syzbot wrote:
>
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit:    dc59e4fea9d8 Linux 7.2-rc1
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=15c7d61c580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=f9bf5d2bfae96234
> dashboard link: https://syzkaller.appspot.com/bug?extid=61ce80689253f42e6d80
> compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12bbb11c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=130bf4ea580000
>
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-dc59e4fe.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/1bc8aed8d2e8/vmlinux-dc59e4fe.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/0b1fdfc4aa09/bzImage-dc59e4fe.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com
>
> Oops: general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] SMP KASAN NOPTI

#syz test

From: Jiri Olsa <jolsa@kernel.org>

In the unregister path we use __in_uprobe_trampoline check with
current->mm for the VMA lookup, which is wrong, because we are
in the tracer context, not the traced process.

Add mm_struct pointer argument to __in_uprobe_trampoline and
changing related callers to pass proper mm_struct pointer.

Fixes: ba2bfc97b462 ("uprobes/x86: Add support to optimize uprobes")
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 arch/x86/kernel/uprobes.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index ebb1baf1eb1d..2be6707e3320 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -761,9 +761,9 @@ void arch_uprobe_clear_state(struct mm_struct *mm)
 		destroy_uprobe_trampoline(tramp);
 }
 
-static bool __in_uprobe_trampoline(unsigned long ip)
+static bool __in_uprobe_trampoline(struct mm_struct *mm, unsigned long ip)
 {
-	struct vm_area_struct *vma = vma_lookup(current->mm, ip);
+	struct vm_area_struct *vma = vma_lookup(mm, ip);
 
 	return vma && vma_is_special_mapping(vma, &tramp_mapping);
 }
@@ -776,14 +776,14 @@ static bool in_uprobe_trampoline(unsigned long ip)
 
 	rcu_read_lock();
 	if (mmap_lock_speculate_try_begin(mm, &seq)) {
-		found = __in_uprobe_trampoline(ip);
+		found = __in_uprobe_trampoline(mm, ip);
 		retry = mmap_lock_speculate_retry(mm, seq);
 	}
 	rcu_read_unlock();
 
 	if (retry) {
 		mmap_read_lock(mm);
-		found = __in_uprobe_trampoline(ip);
+		found = __in_uprobe_trampoline(mm, ip);
 		mmap_read_unlock(mm);
 	}
 	return found;
@@ -1044,7 +1044,7 @@ static int copy_from_vaddr(struct mm_struct *mm, unsigned long vaddr, void *dst,
 	return 0;
 }
 
-static bool __is_optimized(uprobe_opcode_t *insn, unsigned long vaddr)
+static bool __is_optimized(struct mm_struct *mm, uprobe_opcode_t *insn, unsigned long vaddr)
 {
 	struct __packed __arch_relative_insn {
 		u8 op;
@@ -1053,7 +1053,7 @@ static bool __is_optimized(uprobe_opcode_t *insn, unsigned long vaddr)
 
 	if (!is_call_insn(insn))
 		return false;
-	return __in_uprobe_trampoline(vaddr + 5 + call->raddr);
+	return __in_uprobe_trampoline(mm, vaddr + 5 + call->raddr);
 }
 
 static int is_optimized(struct mm_struct *mm, unsigned long vaddr)
@@ -1064,7 +1064,7 @@ static int is_optimized(struct mm_struct *mm, unsigned long vaddr)
 	err = copy_from_vaddr(mm, vaddr, &insn, 5);
 	if (err)
 		return err;
-	return __is_optimized((uprobe_opcode_t *)&insn, vaddr);
+	return __is_optimized(mm, (uprobe_opcode_t *)&insn, vaddr);
 }
 
 static bool should_optimize(struct arch_uprobe *auprobe)
-- 
2.54.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [syzbot] [trace?] general protection fault in mtree_load
  2026-07-01  9:09   ` Oleg Nesterov
@ 2026-07-01  9:42     ` syzbot
  0 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2026-07-01  9:42 UTC (permalink / raw)
  To: bp, dave.hansen, hpa, linux-kernel, linux-trace-kernel, mhiramat,
	mingo, oleg, olsajiri, peterz, syzkaller-bugs, tglx, x86

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com
Tested-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com

Tested on:

commit:         665159e2 Merge tag 'probes-fixes-v7.2-rc1' of git://gi..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14f7b11c580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=f9bf5d2bfae96234
dashboard link: https://syzkaller.appspot.com/bug?extid=61ce80689253f42e6d80
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch:          https://syzkaller.appspot.com/x/patch.diff?x=1084b9fa580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-01  9:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22  6:59 [syzbot] [trace?] general protection fault in mtree_load syzbot
2026-06-22 13:04 ` Oleg Nesterov
2026-06-24  7:49   ` Jiri Olsa
2026-07-01  1:32 ` syzbot
2026-07-01  9:09   ` Oleg Nesterov
2026-07-01  9:42     ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox