lkml.org 
[lkml]   [2020]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2020-07-06 23:40    [W:0.077 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site