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:   Wed, 22 Dec 2021 12:06:44 -0600
From:   Frank Rowand <frowand.list@...il.com>
To:     Rob Herring <robh+dt@...nel.org>,
        Yin Xiujiang <yinxiujiang@...inos.cn>
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] of: unittest: Fix out of bounds array access when id < 0

On 12/21/21 6:20 AM, Rob Herring wrote:
> On Tue, Dec 21, 2021 at 5:34 AM Yin Xiujiang <yinxiujiang@...inos.cn> wrote:
>>
>> In of_unittest_untrack_overlay if id is less than 0 then
>> overlay_id_bits will be out of bounds. And it is also mentioned
>> in bugzilla as a bug report:
>> https://bugzilla.kernel.org/show_bug.cgi?id=214867
>>
>> Fix this bug by tiggering WARN_ON()
> 
> If id shouldn't be less than 0, can we make it unsigned instead as
> discussed here[1].
> 
> Rob
> 
> [1] https://lore.kernel.org/all/c474a371-b524-1da8-4a67-e72cf8f2b0f7@gmail.com/
> 

There are problems with changing to unsigned (fixable, but more extensive
code changes).

I think that the implementation of id tracking in unittest.c is overly
fragile, and I would prefer to just re-implement it (see also my reply
to the proposed patch).

Let me take a look at whether I can create an alternate
implementation of id tracking.

-Frank

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ