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]
Date:   Sat, 13 May 2017 12:22:29 +0200
From:   Sascha Silbe <x-linux@...ra-silbe.de>
To:     Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] of: fdt: fix unflattening of FDTs containing uncompressed paths

Probably since commit dfbd4c6eff35 ("drivers/of: Split
unflatten_dt_node()"), unflattening an FDT containing uncompressed
node names (e.g. "/gpio@...19000/gpio@0") will abort after scanning
the root node because fpsize wasn't updated to include the path len.

Signed-off-by: Sascha Silbe <x-linux@...ra-silbe.de>
---
 drivers/of/fdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index e5ce4b59e162..2d5414e644b3 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -309,6 +309,8 @@ static unsigned int populate_node(const void *blob,
 			fpsize += l;
 			allocl = fpsize;
 		}
+	} else {
+		fpsize += allocl;
 	}
 
 	np = unflatten_dt_alloc(mem, sizeof(struct device_node) + allocl,
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ