[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAObL_7Gc0U2JMBQr_kbcVUJwyJq7LRfgdFr+84LR=ec4kSCwEA@mail.gmail.com>
Date: Wed, 22 Feb 2012 15:38:57 -0800
From: Andrew Lutomirski <luto@....edu>
To: Will Drewry <wad@...omium.org>
Cc: Indan Zupancic <indan@....nu>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-doc@...r.kernel.org,
kernel-hardening@...ts.openwall.com, netdev@...r.kernel.org,
x86@...nel.org, arnd@...db.de, davem@...emloft.net, hpa@...or.com,
mingo@...hat.com, oleg@...hat.com, peterz@...radead.org,
rdunlap@...otime.net, mcgrathr@...omium.org, tglx@...utronix.de,
eparis@...hat.com, serge.hallyn@...onical.com, djm@...drot.org,
scarybeasts@...il.com, pmoore@...hat.com,
akpm@...ux-foundation.org, corbet@....net, eric.dumazet@...il.com,
markus@...omium.org, keescook@...omium.org
Subject: Re: [PATCH v10 07/11] signal, x86: add SIGSYS info and make it synchronous.
On Wed, Feb 22, 2012 at 11:48 AM, Will Drewry <wad@...omium.org> wrote:
> On Wed, Feb 22, 2012 at 2:34 AM, Indan Zupancic <indan@....nu> wrote:
>> On Tue, February 21, 2012 18:30, Will Drewry wrote:
>>> This change enables SIGSYS, defines _sigfields._sigsys, and adds
>>> x86 (compat) arch support. _sigsys defines fields which allow
>>> a signal handler to receive the triggering system call number,
>>> the relevant AUDIT_ARCH_* value for that number, and the address
>>> of the callsite.
>>>
>>> To ensure that SIGSYS delivery occurs on return from the triggering
>>> system call, SIGSYS is added to the SYNCHRONOUS_MASK macro. I'm
>>> this is enough to ensure it will be synchronous or if it is explicitly
>>> required to ensure an immediate delivery of the signal upon return from
>>> the blocked system call.
>>>
>>> The first consumer of SIGSYS would be seccomp filter. In particular,
>>> a filter program could specify a new return value, SECCOMP_RET_TRAP,
>>> which would result in the system call being denied and the calling
>>> thread signaled. This also means that implementing arch-specific
>>> support can be dependent upon HAVE_ARCH_SECCOMP_FILTER.
>>
>> I think others said this is useful, but I don't see how. Easier
>> debugging compared to checking return values?
>>
>> I suppose SIGSYS can be blocked, so there is no guarantee the process
>> will be killed.
>
> Yeah, this allows for in-process system call emulation, if desired, or
> for the process to dump core/etc. With RET_ERRNO or RET_KILL, there
> isn't any feedback to the system about the state of the process. Kill
> populates audit_seccomp and dmesg, but if the application
> user/developer isn't the system admin, installing audit bits or
> checking system logs seems onerous.
[Warning: this suggestion may be bad for any number of reasons]
I wonder if it would be helpful to change the semantics of RET_KILL
slightly. Rather than killing via do_exit, what if it killed via a
forcibly-fatal SIGSYS? That way, the parent's waitid() / SIGCHLD
would indicate CLD_KILLED with si_status == SIGSYS. The parent could
check that and report that the child was probably compromised.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists