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: <ebaff261-f8ad-d184-edd5-8efbd675deeb@intel.com>
Date:   Fri, 6 Nov 2020 10:16:47 -0800
From:   "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     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-doc@...r.kernel.org, linux-mm@...ck.org,
        linux-arch@...r.kernel.org, linux-api@...r.kernel.org,
        Arnd Bergmann <arnd@...db.de>,
        Andy Lutomirski <luto@...nel.org>,
        Balbir Singh <bsingharora@...il.com>,
        Cyrill Gorcunov <gorcunov@...il.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Eugene Syromiatnikov <esyr@...hat.com>,
        Florian Weimer <fweimer@...hat.com>,
        "H.J. Lu" <hjl.tools@...il.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>
Subject: Re: [PATCH v14 01/26] Documentation/x86: Add CET description

On 11/6/2020 9:34 AM, Borislav Petkov wrote:
> On Mon, Oct 12, 2020 at 08:38:25AM -0700, Yu-cheng Yu wrote:
>> +[1] Overview
>> +============
>> +
>> +Control-flow Enforcement Technology (CET) is an Intel processor feature
>> +that provides protection against return/jump-oriented programming (ROP)
>> +attacks.  It can be set up to protect both applications and the kernel.
>> +Only user-mode protection is implemented in the 64-bit kernel, including
>> +support for running legacy 32-bit applications.
>> +
>> +CET introduces Shadow Stack and Indirect Branch Tracking.  Shadow stack is
>> +a secondary stack allocated from memory and cannot be directly modified by
>> +applications.  When executing a CALL, the processor pushes the return
> 				       ^
> 				    . .. instruction ...
> 

I will update it.

[...]

>> +
>> +[2] Application Enabling
>> +========================
>> +
>> +An application's CET capability is marked in its ELF header and can be
>> +verified from the following command output, in the NT_GNU_PROPERTY_TYPE_0
>> +field:
>> +
>> +    readelf -n <application>
> 
> Can be verified how? What does it say for a CET-enabled executable? Put
> it here in the doc pls.
> 

readelf -n <application> | grep SHSTK
	properties: x86 feature: IBT, SHSTK

I will add this.

[...]

>> +[3] Backward Compatibility
>> +==========================
>> +
>> +GLIBC provides a few tunables for backward compatibility.
>> +
>> +GLIBC_TUNABLES=glibc.tune.hwcaps=-SHSTK,-IBT
>> +    Turn off SHSTK/IBT for the current shell.
> 
> For the current shell? How?
> 
> You mean, you execute the kernel shell with that variable set? So you
> set this variable in any executable's env which links with glibc in
> order to disable CET?
> 
> In any case, this needs clarification.
> 

In the current shell, if GLIBC_TUNABLES variable is set as such, 
applications started will have CET features disabled.  I can put more 
details here, or maybe a reference to the GLIBC man pages.

Thanks,
Yu-cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ