lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHsH6GukV+ydR+hw_-RF=0=_x6aO7xZzkCmbc53=Pk0Kv=8hUQ@mail.gmail.com>
Date: Thu, 16 Jan 2025 06:47:32 -0800
From: Eyal Birger <eyal.birger@...il.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>, Jiri Olsa <olsajiri@...il.com>, 
	Aleksa Sarai <cyphar@...har.com>, Masami Hiramatsu <mhiramat@...nel.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	linux-trace-kernel <linux-trace-kernel@...r.kernel.org>, BPF-dev-list <bpf@...r.kernel.org>, 
	Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>, 
	John Fastabend <john.fastabend@...il.com>, Peter Zijlstra <peterz@...radead.org>, 
	Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>, X86 ML <x86@...nel.org>, 
	Linux API <linux-api@...r.kernel.org>, Andrii Nakryiko <andrii@...nel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, Alexei Starovoitov <ast@...nel.org>, 
	Andrii Nakryiko <andrii.nakryiko@...il.com>, "rostedt@...dmis.org" <rostedt@...dmis.org>, rafi@....io, 
	Shmulik Ladkani <shmulik.ladkani@...il.com>
Subject: Re: Crash when attaching uretprobes to processes running in Docker

On Thu, Jan 16, 2025 at 6:40 AM Oleg Nesterov <oleg@...hat.com> wrote:
>
> On 01/15, Eyal Birger wrote:
> >
> > On Wed, Jan 15, 2025 at 11:03 AM Oleg Nesterov <oleg@...hat.com> wrote:
> > >
> > > On 01/15, Eyal Birger wrote:
> > > >
> > > > --- a/kernel/seccomp.c
> > > > +++ b/kernel/seccomp.c
> > > > @@ -1359,6 +1359,9 @@ int __secure_computing(const struct seccomp_data *sd)
> > > >         this_syscall = sd ? sd->nr :
> > > >                 syscall_get_nr(current, current_pt_regs());
> > > >
> > > > +       if (this_syscall == __NR_uretprobe)
> > > > +               return 0;
> > > > +
> > >
> > > Yes, this is what I meant. But we need the new arch-dependent helper.
> >
> > Do you mean because __NR_uretprobe is not defined for other architectures?
>
> Yes, and see below,
>
> > Is there an existing helper? I wasn't able to find one...
>
> No,
>
> > If not, would it just make sense to just wrap this check in
> > #ifdef __NR_uretprobe ?
>
> Given that we need a simple fix for -stable, I won't argue.
> Up to seccomp maintainers.
>
> But please note that this_syscall == __NR_uretprobe can be false
> positive if is_compat_task().
>
> __NR_uretprobe == __NR_ia32_rt_tgsigqueueinfo, so I guess we need
>
>         #ifdef CONFIG_X86_64
>                 if (this_syscall == __NR_uretprobe && !in_ia32_syscall())
>                         return 0;
>         #endif
>
> I don't think we need to worry about the X86_X32 tasks...
Ack. I agree.

Do you want to send a formal patch, or should I?

Eyal.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ