Re: [PATCH] uprobes: fix kernel info leak via "[uprobes]" vma

From: Google
Date: Sun Sep 29 2024 - 11:39:45 EST


On Sun, 29 Sep 2024 16:50:00 +0200
Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> On 09/29, Masami Hiramatsu wrote:
> >
> > On Thu, 26 Sep 2024 18:29:01 +0200
> > Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> >
> > > xol_add_vma() maps the uninitialized page allocated by __create_xol_area()
> > > into userspace. On some architectures (x86) this memory is readable even
> > > without VM_READ, VM_EXEC results in the same pgprot_t as VM_EXEC|VM_READ.
> >
> > Good catch!
> > I think we push this urgently and send it to stable tree too, right?
>
> Agreed, can you route this patch?

Yeah, OK.

>
> > Fixes: d4b3b6384f98 ("uprobes/core: Allocate XOL slots for uprobes use")
> > Cc: stable@xxxxxxxxxxxxxxx
>
> Will add this or should I resend with these tags included ?

No, but can you confirm this is correct tag? I just track when the
alloc_page() came from.

>
> perhaps the changelog should mention that debugger can read this memory
> regardless of pgprot_t...

OK, if you can do that, can you add it and resend it?

Thank you,

>
> > Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Thanks!
>
> Oleg.
>


--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>