Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8f938da2-a10d-ca15-56f0-70315c678771@linux.microsoft.com>
Date: Mon, 3 Aug 2020 10:59:04 -0500
From: "Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>
To: David Laight <David.Laight@...LAB.COM>, Andy Lutomirski <luto@...nel.org>
Cc: Kernel Hardening <kernel-hardening@...ts.openwall.com>,
 Linux API <linux-api@...r.kernel.org>,
 linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
 Linux FS Devel <linux-fsdevel@...r.kernel.org>,
 linux-integrity <linux-integrity@...r.kernel.org>,
 LKML <linux-kernel@...r.kernel.org>,
 LSM List <linux-security-module@...r.kernel.org>,
 Oleg Nesterov <oleg@...hat.com>, X86 ML <x86@...nel.org>
Subject: Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor



On 8/3/20 3:23 AM, David Laight wrote:
> From: Madhavan T. Venkataraman
>> Sent: 02 August 2020 19:55
>> To: Andy Lutomirski <luto@...nel.org>
>> Cc: Kernel Hardening <kernel-hardening@...ts.openwall.com>; Linux API <linux-api@...r.kernel.org>;
>> linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>; Linux FS Devel <linux-
>> fsdevel@...r.kernel.org>; linux-integrity <linux-integrity@...r.kernel.org>; LKML <linux-
>> kernel@...r.kernel.org>; LSM List <linux-security-module@...r.kernel.org>; Oleg Nesterov
>> <oleg@...hat.com>; X86 ML <x86@...nel.org>
>> Subject: Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor
>>
>> More responses inline..
>>
>> On 7/28/20 12:31 PM, Andy Lutomirski wrote:
>>>> On Jul 28, 2020, at 6:11 AM, madvenka@...ux.microsoft.com wrote:
>>>>
>>>> From: "Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>
>>>>
>>> 2. Use existing kernel functionality.  Raise a signal, modify the
>>> state, and return from the signal.  This is very flexible and may not
>>> be all that much slower than trampfd.
>> Let me understand this. You are saying that the trampoline code
>> would raise a signal and, in the signal handler, set up the context
>> so that when the signal handler returns, we end up in the target
>> function with the context correctly set up. And, this trampoline code
>> can be generated statically at build time so that there are no
>> security issues using it.
>>
>> Have I understood your suggestion correctly?
> I was thinking that you'd just let the 'not executable' page fault
> signal happen (SIGSEGV?) when the code jumps to on-stack trampoline
> is executed.
>
> The user signal handler can then decode the faulting instruction
> and, if it matches the expected on-stack trampoline, modify the
> saved registers before returning from the signal.
>
> No kernel changes and all you need to add to the program is
> an architecture-dependant signal handler.

Understood.

Madhavan

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.