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: <awucsfjn475mvwg7xhihexln2hfbtvrie2uv333u7awtkz4mrf@t57pi7jibytc>
Date: Tue, 18 Mar 2025 10:14:29 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: kexec@...ts.infradead.org, Thomas Gleixner <tglx@...utronix.de>, 
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>, 
	"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>, Kai Huang <kai.huang@...el.com>, 
	Nikolay Borisov <nik.borisov@...e.com>, linux-kernel@...r.kernel.org, Simon Horman <horms@...nel.org>, 
	Dave Young <dyoung@...hat.com>, Peter Zijlstra <peterz@...radead.org>, bsz@...zon.de
Subject: Re: [PATCH v7 8/8] [DO NOT MERGE] x86/kexec: Add CFI type
 information to relocate_kernel()

On Tue, Mar 18, 2025 at 03:56:36PM +0000, David Woodhouse wrote:
> But on the whole, I'm not sure the CFI check is worth it.
> 
> CFI checks that the caller and callee agree about the prototype of the
> function being called. There are two main benefits of this:
> 
>  • to protect against attacks where function pointers are substituted
>    for gadgets.
> 
>  • to protect against genuine bugs, where the caller and the callee
>    disagree about the function arguments.

AFAIK the first one is the main point of CFI.

> For the relocate_kernel() case I don't think we care much about the
> first. Without a CFI prologue, no *other* code can be tricked into
> calling relocate_kernel()

But for FineIBT the hash is checked on the callee side.  So it loses
FineIBT protection.

> — and besides, it's in the kernel's data
> section and isn't executable anyway until the kexec code copies it to a
> page that *is*.

Does the code get copied immediately before getting called, or can it be
initialized earlier during boot when kdump does its initial setup?

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ