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: Fri, 31 May 2024 16:31:31 +0800
From: Chengming Zhou <chengming.zhou@...ux.dev>
To: "Christoph Lameter (Ampere)" <cl@...two.org>
Cc: Pekka Enberg <penberg@...nel.org>, David Rientjes <rientjes@...gle.com>,
 Joonsoo Kim <iamjoonsoo.kim@....com>,
 Andrew Morton <akpm@...ux-foundation.org>, Vlastimil Babka <vbabka@...e.cz>,
 Roman Gushchin <roman.gushchin@...ux.dev>,
 Hyeonggon Yoo <42.hyeyoo@...il.com>, Feng Tang <feng.tang@...el.com>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org, zhouchengming@...edance.com
Subject: Re: [PATCH 1/3] slab: check the return value of
 check_bytes_and_report()

On 2024/5/30 23:20, Christoph Lameter (Ampere) wrote:
> On Tue, 28 May 2024, Chengming Zhou wrote:
> 
>> diff --git a/mm/slub.c b/mm/slub.c
>> index 0809760cf789..de57512734ac 100644
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -1324,9 +1324,10 @@ static int check_object(struct kmem_cache *s, struct slab *slab,
>>         }
>>     } else {
>>         if ((s->flags & SLAB_POISON) && s->object_size < s->inuse) {
>> -            check_bytes_and_report(s, slab, p, "Alignment padding",
>> +            if (!check_bytes_and_report(s, slab, p, "Alignment padding",
>>                 endobject, POISON_INUSE,
>> -                s->inuse - s->object_size);
>> +                s->inuse - s->object_size))
>> +                return 0;
>>         }
>>     }
> 
> This change means we will then skip the rest of the checks in check_object() such as the poison check.

Yeah, only when this padding checking failed.

Now, we always abort checking and return 0 when the first checking error happens,
such as redzones checking above.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ