From: Kees Cook <keescook@chromium.org>
To: Will Deacon <will@kernel.org>
Cc: Keno Fischer <keno@juliacomputing.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
Andy Lutomirski <luto@amacapital.net>,
Will Drewry <wad@chromium.org>
Subject: Re: ptrace: seccomp: Return value when the call was already invalid
Date: Mon, 6 Jul 2020 14:40:13 -0700 [thread overview]
Message-ID: <202007061439.8BF61308@keescook> (raw)
In-Reply-To: <20200706081550.GA23032@willie-the-truck>
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
next prev parent reply other threads:[~2020-07-06 21:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 1:01 ptrace: seccomp: Return value when the call was already invalid Keno Fischer
2020-07-03 8:39 ` Will Deacon
2020-07-03 15:17 ` Kees Cook
2020-07-03 15:44 ` Will Deacon
2020-07-03 15:52 ` Kees Cook
2020-07-04 12:33 ` Will Deacon
2020-07-05 4:56 ` Kees Cook
2020-07-06 8:15 ` Will Deacon
2020-07-06 21:40 ` Kees Cook [this message]
2020-07-10 12:42 ` Will Deacon
2020-07-10 16:14 ` Kees Cook
2020-07-03 20:27 ` Keno Fischer
2020-07-04 12:50 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202007061439.8BF61308@keescook \
--to=keescook@chromium.org \
--cc=keno@juliacomputing.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=oleg@redhat.com \
--cc=wad@chromium.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).