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  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]
Date:   Mon, 28 Feb 2022 15:16:45 -0800
From:   Kees Cook <>
To:     Andrew Morton <>
Cc:, Marco Elver <>,
        Pekka Enberg <>,
        David Rientjes <>,
        Joonsoo Kim <>,
        Vlastimil Babka <>,,,
        Greg Kroah-Hartman <>,
        "Rafael J. Wysocki" <>,
        Christoph Lameter <>,
        Nathan Chancellor <>,
        Nick Desaulniers <>,
        Daniel Micay <>,,
Subject: Re: [PATCH] mm: Handle ksize() vs __alloc_size by forgetting size

On Fri, Feb 25, 2022 at 03:45:18PM -0800, Andrew Morton wrote:
> On Fri, 25 Feb 2022 14:16:25 -0800 Kees Cook <> wrote:
> > If ksize() is used on an allocation, the compiler cannot make any
> > assumptions about its size any more (as hinted by __alloc_size). Force
> > it to forget.
> > 
> > One caller was using a container_of() construction that needed to be
> > worked around.
> Please, when fixing something do fully explain what that thing is.  I,
> for one, simply cannot understand why this change is being proposed.
> Especially when proposing a -stable backport!  Tell readers what was
> the end-user impact of the bug.
> > Link:
> Even that didn't tell me.  Is it just a clang warning?  Does the kernel
> post your private keys on reddit then scribble all over your disk
> drive?  I dunno.

Yup, sorry. I tend to get so deep changes like this that I forget to
give an appropriately detailed summary. As others have mentioned, this
is trying to fix a miscompilation issue, triggered by what can be
considered either a mis-application of __alloc_size, or a failure to
correctly disable compiler optimizations in the face of ksize().

Kees Cook

Powered by blists - more mailing lists