tools: arm: remove code to check for a DTB appended to the kernel
authorIan Campbell <ian.campbell@citrix.com>
Wed, 14 May 2014 14:12:01 +0000 (15:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 14 May 2014 14:12:01 +0000 (15:12 +0100)
commit2cd6bf3653a2b983c90bf3af42d199c499db4165
tree23b371f4405049867d3e0bd809612acabd6df9f3
parent6d49536d844a2685a50281c5385a093a61911987
tools: arm: remove code to check for a DTB appended to the kernel

The code to check for an appended DTB was confusing and unnecessary. Since we
know the size of the kernel binary passed to us we should just load the entire
thing into guest RAM (subject to the limits checks). Removing this code avoids
a whole raft of overflow and alignment issues.

We also need to validate the limits of the segment where we intend to load the
kernel to avoid overflow issues.

For ARM32 we control the load address, but we need to validate the size. The
entry point is only relevant within the guest so we don't need to worry about
that.

For ARM64 we need to validate both the load address (which is the same as the
entry point) and the size.

This is XSA-95.

Reported-by: Thomas Leonard <talex5@gmail.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_dom_armzimageloader.c