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:   Mon, 16 Jul 2018 08:36:34 -0600
From:   Rob Herring <robh+dt@...nel.org>
To:     Frank Rowand <frowand.list@...il.com>
Cc:     Mark Rutland <mark.rutland@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        devicetree@...r.kernel.org
Subject: Re: [PATCH] of/fdt: avoid undefined behaviour in populate_properties()

On Fri, Jul 6, 2018 at 10:51 AM Frank Rowand <frowand.list@...il.com> wrote:
>
> On 07/06/18 04:37, Mark Rutland wrote:
> > We unflatten a device tree in two passes: the first calculating the size
> > of the unflattened tree, and the second performing the actual
> > unflattening into a suitably-sized buffer.

[...]

> > @@ -187,7 +187,9 @@ static void populate_properties(const void *blob,
> >       int cur;
> >       bool has_name = false;
> >
> > -     pprev = &np->properties;
> > +     if (!dryrun)
> > +             pprev = &np->properties;
> > +
> >       for (cur = fdt_first_property_offset(blob, offset);
> >            cur >= 0;
> >            cur = fdt_next_property_offset(blob, cur)) {
> >
>
> Please add a one line comment explaining why "if (!dryrun)" so that no one
> decides to remove the test in the future as not needed.  Otherwise,

Please re-spin ASAP with the comment if you'd like this in 4.18.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ