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-next>] [day] [month] [year] [list]
Message-ID: <202509251823.1B974C7@keescook>
Date: Thu, 25 Sep 2025 18:31:09 -0700
From: Kees Cook <kees@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Alejandro Colomar <alx@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Christopher Bazley <chris.bazley.wg14@...il.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Marco Elver <elver@...gle.com>, Michal Hocko <mhocko@...e.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Alexander Potapenko <glider@...gle.com>,
	Dmitry Vyukov <dvyukov@...gle.com>, Jann Horn <jannh@...gle.com>
Subject: Re: [PATCH v1 0/3] Add ENDOF(), and use it to fix off-by-one bugs

On Thu, Sep 25, 2025 at 06:05:25PM -0700, Linus Torvalds wrote:
> On Thu, Sep 25, 2025, 17:00 Kees Cook <kees@...nel.org> wrote:
> 
> > And it's really ARRAY_BEYOND. ;) I don't really like having APIs that
> > require holding pointers that are actively invalid, either.
> 
> That's not an invalid pointer. At all.

Sorry, I mean to say that it points _to_ an invalid location. The
pointer is not valid to dereference, but its _value_ has meaning
(relative to another pointer).

I can have an opinion about the relative safety of holding pointers that
can't be safely dereferenced, though. :) But yes, I've long since lost
the argument that C should avoid these kinds of past-the-end tokens.

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ