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: <ZBnhmtvlenY15P32@memverge.com>
Date:   Tue, 21 Mar 2023 12:55:54 -0400
From:   Gregory Price <gregory.price@...verge.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Gregory Price <gourry.memverge@...il.com>,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        oleg@...hat.com, avagin@...il.com, peterz@...radead.org,
        luto@...nel.org, krisman@...labora.com, corbet@....net,
        shuah@...nel.org, Mark Rutland <mark.rutland@....com>,
        Will Deacon <will@...nel.org>
Subject: Re: [PATCH v13 1/3] syscall_user_dispatch: helper function to
 operate on given task

On Tue, Mar 21, 2023 at 04:41:37PM +0100, Thomas Gleixner wrote:
> Gregory!
> 
> On Wed, Mar 01 2023 at 15:58, Gregory Price wrote:
> > +static int task_set_syscall_user_dispatch(struct task_struct *task, unsigned long mode,
> > +					  unsigned long offset, unsigned long len,
> > +					  char __user *selector)
> >  {
> >  	switch (mode) {
> >  	case PR_SYS_DISPATCH_OFF:
>         ...
> 
> 	case PR_SYS_DISPATCH_ON:
> 		if (selector && !access_ok(selector, sizeof(*selector)))
> 			return -EFAULT;
> 
> I'm not seing how this can work on ARM64 when user pointer tagging is
> enabled in the tracee, but not in the tracer. In such a case, if the
> pointer is tagged, access_ok() will fail because access_ok() wont untag
> it.
> 
> Thanks,
> 
>         tglx

I see that untagged_addr(x) is available to clear tags, I don't see an
immediate issues with converting to:

!access_ok(untagged_addr(selector), sizeof(*selector))

In both the tracee calling the prctl interface and the tracer calling
the ptrace interface the tag will be cleared, which appears to be the
intended effect.  Just want a sanity check before i push it through, as
I'm not overly familiar with the ARM/tagging ecosystem.

Seems reasoanble that this change should live with this commit, so i'll
plan to squash and push it up if the change is reasonable.

Thanks for your input
~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ