diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2018-03-09 23:28:56 +1100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-19 07:01:12 +0200 |
commit | c81f432f77bc27911ef863c42d19dc6d5c395d82 (patch) | |
tree | de732b99778af2fe6119c031092d21296eba560d /cpukit/dtc/libfdt/fdt.c | |
parent | libfdt: Propagate name errors in fdt_getprop_by_offset() (diff) | |
download | rtems-c81f432f77bc27911ef863c42d19dc6d5c395d82.tar.bz2 |
libfdt: Safer access to memory reservations
fdt_num_mem_rsv() and fdt_get_mem_rsv() currently don't sanity check their
parameters, or the memory reserve section offset in the header. That means
that on a corrupted blob they could access outside of the range of memory
that they should.
This improves their safety checking, meaning they shouldn't access outside
the blob's bounds, even if its contents are badly corrupted.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cpukit/dtc/libfdt/fdt.c')
0 files changed, 0 insertions, 0 deletions