Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315283
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 1/1] seccomp: provide information about the previous syscall |
| Date | 2016-01-22 22:30 +0100 |
| Message-ID | <qTRrk-1iu-9@gated-at.bofh.it> (permalink) |
| References | <qTDHH-e4-1@gated-at.bofh.it> <qTDHH-e4-15@gated-at.bofh.it> <qTNQK-7gK-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jan 22, 2016 at 9:30 AM, Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
> On Fri, Jan 22, 2016 at 03:30:00PM +0900, Daniel Sangorrin wrote:
>> This patch allows applications to restrict the order in which
>> its system calls may be requested. In order to do that, we
>> provide seccomp-BPF scripts with information about the
>> previous system call requested.
>>
>> An example use case consists of detecting (and stopping) return
>> oriented attacks that disturb the normal execution flow of
>> a user program.
>>
>> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ...
>> diff --git a/include/uapi/linux/seccomp.h b/include/uapi/linux/seccomp.h
> ...
>> struct seccomp_data {
>> int nr;
>> + int prev_nr;
>> __u32 arch;
>> __u64 instruction_pointer;
>> __u64 args[6];
>
> this will break abi for existing seccomp programs.
> New field has to be at the end.
Yeah, and if we break abi, we need to add further sanity checking to
the parser to determine which "version" of seccomp_data we need. I'm
not convinced that there is enough utility here to break ABI.
(Though if we do, I'd like to add tid to the seccomp_data, which has
been requested in the past to make some pid-based arg checks easier to
do.)
-Kees
--
Kees Cook
Chrome OS & Brillo Security
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/1] Adding previous syscall context to seccomp Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp> - 2016-01-22 07:50 +0100
[RFC PATCH 1/1] seccomp: provide information about the previous syscall Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp> - 2016-01-22 07:50 +0100
Re: [kernel-hardening] [RFC PATCH 1/1] seccomp: provide information about the previous syscall Jann Horn <jann@thejh.net> - 2016-01-22 11:50 +0100
Re: [kernel-hardening] [RFC PATCH 1/1] seccomp: provide information about the previous syscall Andy Lutomirski <luto@amacapital.net> - 2016-01-22 18:20 +0100
RE: [kernel-hardening] [RFC PATCH 1/1] seccomp: provide information about the previous syscall "Daniel Sangorrin" <daniel.sangorrin@toshiba.co.jp> - 2016-01-25 04:50 +0100
Re: [RFC PATCH 1/1] seccomp: provide information about the previous syscall Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-01-22 18:40 +0100
Re: [RFC PATCH 1/1] seccomp: provide information about the previous syscall Kees Cook <keescook@chromium.org> - 2016-01-22 22:30 +0100
Re: [kernel-hardening] Re: [RFC PATCH 1/1] seccomp: provide information about the previous syscall Paul Moore <paul@paul-moore.com> - 2016-01-22 23:20 +0100
csiph-web