Messages in this thread | | | Date | Mon, 6 Jul 2020 14:40:13 -0700 | From | Kees Cook <> | 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
| |