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: <202007061439.8BF61308@keescook>
Date:   Mon, 6 Jul 2020 14:40:13 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Will Deacon <will@...nel.org>
Cc:     Keno Fischer <keno@...iacomputing.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Andy Lutomirski <luto@...capital.net>,
        Will Drewry <wad@...omium.org>
Subject: Re: ptrace: seccomp: Return value when the call was already invalid

On Mon, Jul 06, 2020 at 09:15:51AM +0100, Will Deacon wrote:
> On Sat, Jul 04, 2020 at 09:56:50PM -0700, Kees Cook wrote:
> > different per-architecture expectations). If I read this thread
> > correctly, we need to test:
> > 
> > 	syscall(-1), direct,  returns ENOSYS
> > 	syscall(-10), direct, returns ENOSYS
> > 	syscall(-1), SECCOMP_RET_TRACE+PTRACE_CONT, returns ENOSYS
> > 	syscall(-10), SECCOMP_RET_TRACE+PTRACE_CONT, returns ENOSYS
> > 	syscall(-1), ptrace+PTRACE_SYSCALL, returns ENOSYS
> > 	syscall(-10), ptrace+PTRACE_SYSCALL, returns ENOSYS
> > 
> > do we need to double-check that registers before/after are otherwise
> > unchanged too? (I *think* just looking at syscall return should be
> > sufficient to catch the visible results.)
> 
> There's also the case where the tracer sets the system call to -1 to skip
> it.

Yes, though that's already part of the seccomp selftests. (Specifically
TRACE_syscall's syscall_faked.)

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ