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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Jul 2023 09:44:52 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Kees Cook <keescook@...omium.org>
Cc:     Christoph Lameter <cl@...ux.com>,
        David Rientjes <rientjes@...gle.com>,
        Pekka Enberg <penberg@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Roman Gushchin <roman.gushchin@...ux.dev>, linux-mm@...ck.org,
        patches@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Matteo Rizzo <matteorizzo@...gle.com>,
        Jann Horn <jannh@...gle.com>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Marco Elver <elver@...gle.com>,
        Alexander Potapenko <glider@...gle.com>,
        kasan-dev@...glegroups.com, linux-hardening@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/slub: remove freelist_dereference()

On 7/11/23 18:21, Kees Cook wrote:
> On Tue, Jul 11, 2023 at 03:46:25PM +0200, Vlastimil Babka wrote:
>>  
>>  #ifndef CONFIG_SLUB_TINY
>> -- 
>> 2.41.0
>> 
> 
> I like reducing the complexity here, but I find dropping the "object"
> reassignment makes this a bit harder to read. What about:

Alright.

> 	object = kasan_reset_tag(object);
> 	unsigned long ptr_addr = (unsigned long)object + s->offset;
> 	freeptr_t p = *(freeptr_t *)(ptr_addr);

Are we really so benevolent with declaration-after-statement now? :)

> 	return freelist_ptr_decode(s, p, ptr_addr);
> 
> ?
> 
> They're the same result, so either way:
> 
> Acked-by: Kees Cook <keescook@...omium.org>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ