lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 10 Jan 2018 12:05:53 -0800
From:   Andy Lutomirski <luto@...nel.org>
To:     Andi Kleen <ak@...ux.intel.com>
Cc:     Andi Kleen <andi@...stfloor.org>,
        Thomas Gleixner <tglx@...utronix.de>, X86 ML <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        "Woodhouse, David" <dwmw@...zon.co.uk>,
        Paul Turner <pjt@...gle.com>,
        Andrew Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Tom Lendacky <thomas.lendacky@....com>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        gregkh@...ux-foundation.org, Dave Hansen <dave.hansen@...el.com>,
        Jiri Kosina <jikos@...nel.org>
Subject: Re: [PATCH v1 6/8] x86/entry/clearregs: Add number of arguments to
 syscall tables

On Tue, Jan 9, 2018 at 8:37 PM, Andi Kleen <ak@...ux.intel.com> wrote:
> On Tue, Jan 09, 2018 at 05:26:43PM -0800, Andy Lutomirski wrote:
>>
>>
>> > On Jan 9, 2018, at 5:03 PM, Andi Kleen <andi@...stfloor.org> wrote:
>> >
>> > From: Andi Kleen <ak@...ux.intel.com>
>> >
>> > In order to sanitize the system call arguments properly
>> > we need to know the number of syscall arguments for each
>> > syscall. Add a new column to the 32bit and 64bit syscall
>> > tables to list the number of arguments.
>> >
>>
>> Surely we can do this in the SYSCALL_DEFINE macros.  Or at least statically check it.
>
> Possibly. The assembler would be much uglier as inline assembler though.
> And adding the number shouldn't be a big burden when adding a system call.
>
> I don't know how to check statically.
>

Somehow parse out the SYSCALL_DEFINE() macros at build time and check
the numbers.  Or munge the number into the SyS_ wrapper so we'd have
SyS0_fork but SyS3_read.

>>
>> Also, what attack are we protecting against anyway?
>
> There's no specific attack here.
>
> But the idea is to make it harder to inject values into the kernel to abuse
> with speculation.

I think a bit stronger justification would be good here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ