]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
uprobes/x86: Use proper mm_struct in __in_uprobe_trampoline
authorJiri Olsa <jolsa@kernel.org>
Wed, 1 Jul 2026 11:13:25 +0000 (13:13 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 2 Jul 2026 11:21:49 +0000 (13:21 +0200)
commit169328645663bae30e9abad4012d52441e085a71
tree8bf2698e6b195d79e3fcfcd0abaf4dc9dcd6b48c
parent5166973b20784b4627c7a657d546963d8c6e9b5a
uprobes/x86: Use proper mm_struct in __in_uprobe_trampoline

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")
Reported-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: syzbot+61ce80689253f42e6d80@syzkaller.appspotmail.com
Link: https://patch.msgid.link/20260701111337.53943-2-jolsa@kernel.org
arch/x86/kernel/uprobes.c