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, 28 Apr 2021 08:42:48 -0700
From:   "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To:     Andy Lutomirski <luto@...nel.org>, "H.J. Lu" <hjl.tools@...il.com>
Cc:     David Laight <David.Laight@...lab.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Balbir Singh <bsingharora@...il.com>,
        Borislav Petkov <bp@...en8.de>,
        Cyrill Gorcunov <gorcunov@...il.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Eugene Syromiatnikov <esyr@...hat.com>,
        Florian Weimer <fweimer@...hat.com>,
        Jann Horn <jannh@...gle.com>, Jonathan Corbet <corbet@....net>,
        Kees Cook <keescook@...omium.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Nadav Amit <nadav.amit@...il.com>,
        Oleg Nesterov <oleg@...hat.com>, Pavel Machek <pavel@....cz>,
        Peter Zijlstra <peterz@...radead.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        "Ravi V. Shankar" <ravi.v.shankar@...el.com>,
        Vedvyas Shanbhogue <vedvyas.shanbhogue@...el.com>,
        Dave Martin <Dave.Martin@....com>,
        Weijiang Yang <weijiang.yang@...el.com>,
        Pengfei Xu <pengfei.xu@...el.com>,
        Haitao Huang <haitao.huang@...el.com>
Subject: Re: [PATCH v26 0/9] Control-flow Enforcement: Indirect Branch
 Tracking

On 4/28/2021 8:14 AM, Andy Lutomirski wrote:
> On Wed, Apr 28, 2021 at 7:57 AM H.J. Lu <hjl.tools@...il.com> wrote:
>>
>> On Wed, Apr 28, 2021 at 7:52 AM Andy Lutomirski <luto@...nel.org> wrote:
>>>
>>> On Wed, Apr 28, 2021 at 7:48 AM David Laight <David.Laight@...lab.com> wrote:
>>>>
>>>> From: Yu-cheng Yu
>>>>> Sent: 27 April 2021 21:47
>>>>>
>>>>> Control-flow Enforcement (CET) is a new Intel processor feature that blocks
>>>>> return/jump-oriented programming attacks.  Details are in "Intel 64 and
>>>>> IA-32 Architectures Software Developer's Manual" [1].
>>>> ...
>>>>
>>>> Does this feature require that 'binary blobs' for out of tree drivers
>>>> be compiled by a version of gcc that adds the ENDBRA instructions?

David, do you mean kernel loadable drivers here?  Do not worry about it 
for now, since shadow stack/ibt is not enabled for kernel-mode yet.

>>>>
>>>> If enabled for userspace, what happens if an old .so is dynamically
>>>> loaded?
>>
>> CET will be disabled by ld.so in this case.
> 
> What if a program starts a thread and then dlopens a legacy .so?
> 
>>
>>>> Or do all userspace programs and libraries have to have been compiled
>>>> with the ENDBRA instructions?
>>
>> Correct.  ld and ld.so check this.
>>
>>> If you believe that the userspace tooling for the legacy IBT table
>>> actually works, then it should just work.  Yu-cheng, etc: how well
>>> tested is it?
>>>
>>
>> Legacy IBT bitmap isn't unused since it doesn't cover legacy codes
>> generated by legacy JITs.
>>
> 
> How does ld.so decide whether a legacy JIT is in use?
> 

Let me clarify.  IBT bitmap isn't used at all.  How dlopen() works 
depends entirely on the tunable of glibc.cpu.x86_ibt.  There are three 
values: on, off, permissive.  On is always on, and off is always off, 
regardless of the .so having ibt or not.  The default is "permissive," 
which turns off ibt upon dlopen a legacy .so.  I hope this also answers 
Andy's question above.

Yu-cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ