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: <CABCJKufWOkWqhsUNwuNPkYRAZaAnaBH8XWdcRBO29C23QzdyHw@mail.gmail.com>
Date:   Tue, 22 Sep 2020 11:45:18 -0700
From:   Sami Tolvanen <samitolvanen@...gle.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Jann Horn <jannh@...gle.com>,
        Nathan Chancellor <natechancellor@...il.com>
Subject: Re: x86/irq: Make run_on_irqstack_cond() typesafe

Hi Thomas,

On Tue, Sep 22, 2020 at 12:58 AM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Sami reported that run_on_irqstack_cond() requires the caller to cast
> functions to mismatching types, which trips indirect call Control-Flow
> Integrity (CFI) in Clang.
>
> Instead of disabling CFI on that function, provide proper helpers for
> the three call variants. The actual ASM code stays the same as that is
> out of reach.
>
> Reported-by: Sami Tolvanen <samitolvanen@...gle.com>
> Fixes: 931b94145981 ("x86/entry: Provide helpers for executing on the irqstack")
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

Thank you for the patch! I confirmed that this fixes the type mismatch
issue with CFI for me:

Tested-by: Sami Tolvanen <samitolvanen@...gle.com>

Also, please note that this was first reported by Nathan in this GitHub issue:
https://github.com/ClangBuiltLinux/linux/issues/1052

Sami

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ