Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1634089
| From | Tyler Hicks <tyhicks@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 0/4] Improved seccomp logging |
| Date | 2017-05-02 04:50 +0200 |
| Message-ID | <tCw2Z-rv-5@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <ttKRA-5mS-3@gated-at.bofh.it> <ttLNE-61w-5@gated-at.bofh.it> <tuV8d-1G8-1@gated-at.bofh.it> <tAZVw-6VL-25@gated-at.bofh.it> <tB1kC-7JH-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/27/2017 07:42 PM, Kees Cook wrote: > On Thu, Apr 27, 2017 at 3:17 PM, Tyler Hicks <tyhicks@canonical.com> wrote: >> Quick update... I finished the move from the high-water mark >> log_max_action sysctl to the bitmask based actions_logged sysctl. > > Awesome! > >> Unfortunately, I've just realized that SECCOMP_SET_LOGGING, or any >> process-wide logging configuration mechanism, will not work. It is fine >> for the situation where two unrelated processes set up seccomp filters >> that should be logged differently. However, it fails when two closely >> related processes, such as parent and child, need to set up seccomp >> filters that should be logged differently. Imagine a launcher that sets >> up an application sandbox (including a seccomp filter) and then launches >> an electron app which will have its own seccomp filter for sandboxing >> untrusted code that it runs. Unless the launcher and app completely >> agree on actions that should be logged, the logging won't work as >> intended for both processes. > > Oh, you mean the forked process sets up the logging it wants for the > filters it just installed, then after exec a process sets up new > logging requirements? Yes - see below. > >> I think this needs to be configured at the filter level. > > I'm not sure that's even the right way to compose the logging desires. > > So, my initial thought was "whatever ran SECCOMP_SET_LOGGING knows > what it's doing" and it should be the actual value. > > If the launcher wants logs of everything the application does with its > filters, then a purely-tied-to-filter approach won't work either. > > Perhaps log bits can only be enabled? I.e. SECCOMP_SET_LOGGING > performs an OR instead of an assignment? The problem that I'm envisioning with this design is this: 1. Launcher is told to launch Chrome and forks off a process. 2. Launcher sets up a filter using RET_ERRNO for all unacceptable syscalls and enables auditing of RET_ERRNO. 3. Launcher execs Chrome. 4. Chrome then sets up its own, more restrictive filter that uses RET_ERRNO, among other actions, but does not want auditing of RET_ERRNO. If we use process-wide auditing controls, the logs will be filled with RET_ERRNO messages that were unintended and unrelated to the RET_ERRNO actions set up in the launcher's filter. Unfortunately, the OR'ing idea doesn't solve the problem. Tyler > > -Kees >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3 0/4] Improved seccomp logging Tyler Hicks <tyhicks@canonical.com> - 2017-04-28 00:20 +0200
Re: [PATCH v3 0/4] Improved seccomp logging Kees Cook <keescook@chromium.org> - 2017-04-28 01:50 +0200
Re: [PATCH v3 0/4] Improved seccomp logging Tyler Hicks <tyhicks@canonical.com> - 2017-05-02 04:50 +0200
Re: [PATCH v3 0/4] Improved seccomp logging Andy Lutomirski <luto@kernel.org> - 2017-05-02 18:20 +0200
csiph-web