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]
Message-ID: <CAL_JsqJLbwuzvDCSHr+Z92sseomnWhKXd03WomUgJdfXo_6=8Q@mail.gmail.com>
Date:   Mon, 15 May 2017 10:19:36 -0500
From:   Rob Herring <robh+dt@...nel.org>
To:     Sascha Silbe <x-linux@...ra-silbe.de>
Cc:     Frank Rowand <frowand.list@...il.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] fdt: correctly handle uncompressed node names

On Sat, May 13, 2017 at 5:22 AM, Sascha Silbe <x-linux@...ra-silbe.de> wrote:
> When handling uncompressed node names, we need to compare the last
> component rather than the entire string.
>
> Signed-off-by: Sascha Silbe <x-linux@...ra-silbe.de>
> ---
>  scripts/dtc/libfdt/fdt_ro.c | 3 +++
>  1 file changed, 3 insertions(+)

This needs to be a patch against dtc, sent to devicetree-compiler list
and accepted there, then I can pick it up.

>
> diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c
> index 3d00d2eee0e3..ca03ff87429c 100644
> --- a/scripts/dtc/libfdt/fdt_ro.c
> +++ b/scripts/dtc/libfdt/fdt_ro.c
> @@ -64,6 +64,9 @@ static int _fdt_nodename_eq(const void *fdt, int offset,
>                 /* short match */
>                 return 0;
>
> +       if (*p == '/')
> +               /* Uncompressed node name. Only compare the last part. */
> +               p = strrchr(p, '/') + 1;

However, you are changing behavior here that I'd guess has existed for
some time. This makes me suspicious that this is correct especially
when it is non-FDT DT you are trying to fix.

Given that 0-day reports an error with EFI stub, you also have to
consider if u-boot, barebox, grub, and all the other libfdt users
provide strrchr.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ