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: <CAHk-=wgPD+=Wi8T0A59muq46LxquhsWQSyPV6KM5xa8V1UPK=Q@mail.gmail.com>
Date: Wed, 31 Jul 2024 09:38:15 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Gow <davidgow@...gle.com>
Cc: Kees Cook <kees@...nel.org>, Borislav Petkov <bp@...en8.de>, Thomas Gleixner <tglx@...utronix.de>, 
	Ingo Molnar <mingo@...hat.com>, Dave Hansen <dave.hansen@...ux.intel.com>, 
	Peter Zijlstra <peterz@...radead.org>, Andrew Morton <akpm@...ux-foundation.org>, 
	"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org, kunit-dev@...glegroups.com, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/uaccess: Zero the 8-byte get_range case on failure

On Wed, 31 Jul 2024 at 09:24, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> My bad. My mental model these days is the 64-bit case, where the whole
> 'check_range' thing is about address masking tricks, not the actual
> conditional. So I didn't think of the "access_ok fails" case at all.

Actually, now that I said that out loud, it made me go "why aren't we
doing that on 32-bit too?"

IOW, an alternative would be to just unify things more. Something like this?

*ENTIRELY UNTESTED*.

And no, this is not a NAK of David's patch. Last time I said "let's
unify things", it caused this bug.

I'm claiming that finishing that unification will fix the bug again,
and I *think* we leave that top address unmapped on 32-bit x86 too,
but this whole trick does very much depend on that "access to all-one
address is guaranteed to fail".

So this is the "maybe cleaner, but somebody really needs to
double-check me" patch.

             Linus

View attachment "patch.diff" of type "text/x-patch" (636 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ