summaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-01 13:29:31 +0200
committerWill Deacon <will.deacon@arm.com>2016-08-01 14:17:01 +0100
commit04a848106193b134741672f7e4e444b50c70b631 (patch)
treece8d85138732f505690d9eaf86e4ca082c62eaaa /certs
parent3146bc64d12377a74dbda12b96ea32da3774ae07 (diff)
downloadlinux-04a848106193b134741672f7e4e444b50c70b631.tar.bz2
arm64: mm: avoid fdt_check_header() before the FDT is fully mapped
As reported by Zijun, the fdt_check_header() call in __fixmap_remap_fdt() is not safe since it is not guaranteed that the FDT header is mapped completely. Due to the minimum alignment of 8 bytes, the only fields we can assume to be mapped are 'magic' and 'totalsize'. Since the OF layer is in charge of validating the FDT image, and we are only interested in making reasonably sure that the size field contains a meaningful value, replace the fdt_check_header() call with an explicit comparison of the magic field's value against the expected value. Cc: <stable@vger.kernel.org> Reported-by: Zijun Hu <zijun_hu@htc.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions