]> git.ipfire.org Git - thirdparty/grub.git/commit
util/grub-module-verifierXX: Add e_shoff check in get_shdr()
authorAlec Brown <alec.r.brown@oracle.com>
Thu, 26 May 2022 19:29:51 +0000 (15:29 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 7 Jun 2022 14:14:43 +0000 (16:14 +0200)
commit27e53de2fdb317514a0dc1d2836106e30fa863bd
tree7d63b6ee4f4b310017025b6b18c921b1ceee1df5
parent253da39c15d7537d76247f45f16bf1bba9881ec8
util/grub-module-verifierXX: Add e_shoff check in get_shdr()

In util/grub-module-verifierXX.c, the function get_shdr() is used to obtain the
section header at a given index but isn't checking that there is an offset for
the section header table. To validate that there is, we can check that e_shoff
isn't 0.

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
util/grub-module-verifierXX.c