summaryrefslogtreecommitdiff
path: root/drivers/ddr/microchip/ddr2_timing.h
diff options
context:
space:
mode:
authorAleksandar Gerasimovski <Aleksandar.Gerasimovski@belden.com>2024-11-29 21:09:44 +0000
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2025-01-05 02:30:48 +0100
commit463e4e6476299b32452a8a9e57374241cca26292 (patch)
tree09f39a21624fd30b72e6f7563c377fa0d3109dc2 /drivers/ddr/microchip/ddr2_timing.h
parent6f1251a78b13c2f7c1c68fbca39c28b65cf28453 (diff)
efi_loader: fix pe reloc pointer overrun
The fix provided by 997fc12ec91 is actually introducing a buffer overrun, and the overrun is effective if the memory after the reloc section is not zeroed. Probably that's why this bug is not always noticeable. The problem is that 8-bytes 'rel' pointer can be 4-bytes aligned according to the PE Format, so the actual relocate function can take values after the reloc section. One example is the following dump from the reloc section: bce26000: 3000 0000 000c 0000 0000 0000 0000 0000 bce26010: 7c00 9340 67e0 f900 1c00 0ea1 a400 0f20 This section has two relocations at offset bce26008 and bce2600a, however the given size (rel_size) for this relocation is 16-bytes and this is coming form the efi image Misc.VirtualSize, so in this case the 'reloc' pointer ends at affset bce2600c and is taken as valid and this is where the overflow is. In our system we see this problem when we are starting the Boot Guard efi image. This patch is fixing the overrun while preserving the fix done by 997fc12ec91. Signed-off-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'drivers/ddr/microchip/ddr2_timing.h')
0 files changed, 0 insertions, 0 deletions