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: <dcde302f-faa7-5e55-1e67-f8c7386119d4@suse.cz>
Date:   Thu, 24 Nov 2022 12:26:41 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Hyeonggon Yoo <42.hyeyoo@...il.com>
Cc:     Kees Cook <kees@...nel.org>, Christoph Lameter <cl@...ux.com>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Pekka Enberg <penberg@...nel.org>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Matthew Wilcox <willy@...radead.org>, patches@...ts.linux.dev,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH 01/12] mm, slab: ignore hardened usercopy parameters when
 disabled

On 11/24/22 12:16, Hyeonggon Yoo wrote:
>>  	/* Fail closed on bad usersize of useroffset values. */
>> -	if (WARN_ON(!usersize && useroffset) ||
>> +	if (!IS_ENABLED(CONFIG_HARDENED_USERCOPY) ||
>> +	    WARN_ON(!usersize && useroffset) ||
>>  	    WARN_ON(size < usersize || size - usersize < useroffset))
>>  		usersize = useroffset = 0;
> 
> I think this change is no longer needed as slab_unmergeable()
> now does not check usersize when CONFIG_HARDENED_USERCOPY=n?

True, but the code here still follows by

if (!usersize)
    s = __kmem_cache_alias(name, size, align, flags, ctor);

So it seemed simplest just to leave it like that.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ