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] [day] [month] [year] [list]
Date:   Tue, 25 Oct 2022 15:55:03 -0700
From:   Kees Cook <keescook@...omium.org>
To:     "Vlastimil Babka (SUSE)" <vbabka@...nel.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] mempool: Use kmalloc_size_roundup() to match ksize()
 usage

On Mon, Oct 24, 2022 at 08:03:34PM +0200, Vlastimil Babka (SUSE) wrote:
> On 10/19/22 07:37, Kees Cook wrote:
> > On Tue, Oct 18, 2022 at 03:51:37PM -0700, Andrew Morton wrote:
> >> On Tue, 18 Oct 2022 02:03:29 -0700 Kees Cook <keescook@...omium.org> wrote:
> >> 
> >> > Round up allocations with kmalloc_size_roundup() so that mempool's use
> >> > of ksize() is always accurate and no special handling of the memory is
> >> > needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE.
> >> 
> >> Confused.  If the special handling is not needed, why doesn't the patch
> >> removed the no longer needed special handling?
> > 
> > The special handling is in the ksize() implementation, so it can't be
> > removed[1] until all the ksize()-affected users are updated to see their
> > true allocation sizes first.
> > 
> > [1] https://lore.kernel.org/lkml/20220923202822.2667581-16-keescook@chromium.org/
> 
> But in the previous version I was wondering if we can just stop doing
> ksize()-like poison handling in mempool completely, if no mempool consumers
> call ksize() to expand their use of the allocated objects. You seemed to
> agree but this version is uncahnged?
> 
> https://lore.kernel.org/all/f4fc52c4-7c18-1d76-0c7a-4058ea2486b9@suse.cz/

Oops, yes. This failed to get on my TODO list. New version coming!

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ