Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260907000557.GE23438@brightrain.aerifal.cx>
Date: Sun, 6 Sep 2026 20:05:58 -0400
From: Rich Felker <dalias@...c.org>
To: Khosro Moeini <khosro@...edu>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH v2] x86_64: add CET shadow stack support

On Sun, Sep 06, 2026 at 07:15:29PM +0000, Khosro Moeini wrote:
> Enable CET shadow stack on x86_64 when the executable and all loaded
> shared objects have the GNU_PROPERTY_X86_FEATURE_1_SHSTK bit set in
> their .note.gnu.property note. If shadow stack is enabled for a process
> dlopen of an object without the shadow stack property note fails.
> Unlike glibc, this implementation does not check environment variables.
> All the changes are guarded by SHSTK_ENABLED which is set through
> the --enable-cet configuration option.
> 
> Signed-off-by: Khosro Moeini <khosro@...edu>
> ---
> Thanks for the feedback. Regarding the concerns discussed in the older
> thread:
> 
> sigaltstack: The main program and its signal handlers use the same
> shadow stack, so there won't be resource problems. Please see:
>     https://docs.kernel.org/next/x86/shstk.html#signal

That is exactly the problem. It breaks the property that overflow of
the normal stack cannot prevent the signal handler from running.

> ucontext: removed from POSIX and not supported in musl 

That just means we don't presently have it in musl; distros are using
libucontext.

> This patch is entirely hand-written.

This is not the statement I asked for and is not reassuring.

Rich

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.