diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-04-03 13:59:47 +0800 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2026-04-13 15:01:26 -0500 |
| commit | b74f2f7fb2bb8c651e322919342aeddf747d69f7 (patch) | |
| tree | 0335504daa8608e1af292647137bfeb12432df5a /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | bb04fcc89a889ad7d5e3427cd1afddd924ef691c (diff) | |
drivers/of: fdt: validate flat DT string properties before string use
Firmware-supplied flat DT properties are raw byte sequences. Several
early FDT helpers fetch properties such as status, model, compatible,
and device_type and then use them as C strings with strcmp(), strlen(),
or pr_info() without first proving that the property is NUL-terminated
within its declared length.
Use fdt_stringlist_get() for these string properties instead. That
preserves the existing behavior for valid DTBs while rejecting malformed
unterminated properties before they are passed to C string helpers.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260403164501.1-drivers-of-fdt-v2-pengpeng@iscas.ac.cn
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
