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]
Message-ID: <CAGXu5jLz+6ky3i4ShE2b+31UDi0cakQqa8YVdJo4F3NK2i2eTA@mail.gmail.com>
Date:   Tue, 13 Feb 2018 13:37:44 -0800
From:   Kees Cook <keescook@...omium.org>
To:     whiteheadm@....org
Cc:     Tejun Heo <tj@...nel.org>, jeremy@...source.com,
        Rusty Russell <rusty@...tcorp.com.au>,
        Ingo Molnar <mingo@...e.hu>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: x86/stack protector: X86_32_LAZY_GS=n hangs kernel on old processors

On Tue, Feb 13, 2018 at 8:57 AM, tedheadster <tedheadster@...il.com> wrote:
> Changing X86_32_LAZY_GS to 'y' does not cause the kernel to hang.
>
>> On Tue, Feb 13, 2018 at 11:40:17AM -0500, tedheadster wrote:
>>>   in your patch "x86: make lazy %gs optional on x86_32" were you able
>>> to test it on really old processors? In 4.16.0-rc1, X86_32_LAZY_GS got
>>> toggled from 'y' to 'n' in my default config because of changes to the
>>> stack protector code. It hangs my ancient i486 test machine right
>>> after 'Booting the kernel'.
>>
>> I didn't have access to an i486 at the time or ever since, so it
>> wasn't tested there.  If this is specific to i486, flagging it so in
>> the config probably isn't the end of the world at this point.
>
> Tejun,
>   I will be able to test this on other 32bit hardware at the end of
> the week. Hopefully I'll be able to identify which processors it does
> not work on (i486/i586/i686).

So, this is the exact opposite of my tests: if I had X86_32_LAZY_GS=y
and stack protector enabled (via _AUTO), the boot would hang. This
change solved that for me:

 config X86_32_LAZY_GS
        def_bool y
-       depends on X86_32 && !CC_STACKPROTECTOR
+       depends on X86_32 && CC_STACKPROTECTOR_NONE

since stack-protector in _AUTO mode had to reorganize that logic. It
seemed LAZY_GS isn't compatible with stack-protector, so I made sure
to retain that. What are your other configs?

-Kees

-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ