No description
e8b37e2c8d
An error emerged as when I was testing the verifiers branch, so instead of putting it in pgp prefix, the verifiers is used to reflect what the patch is based on. While running verify_detached, grub aborts with error. verify_detached /@/.snapshots/1/snapshot/boot/grub/grub.cfg /@/.snapshots/1/snapshot/boot/grub/grub.cfg.sig alloc magic is broken at 0x7beea660: 0 Aborted. Press any key to exit. The error is caused by sig file descriptor been closed twice, first time in grub_verify_signature() to which it is passed as parameter. Second in grub_cmd_verify_signature() or in whichever opens the sig file descriptor. The second close is not consider as bug to me either, as in common rule of what opens a file has to close it to avoid file descriptor leakage. After all the design of grub_verify_signature() makes it difficult to keep a good trace on opened file descriptor from it's caller. Let's refine the application interface to accept file path rather than descriptor, in this way the caller doesn't have to care about closing the descriptor by delegating it to grub_verify_signature() with full tracing to opened file descriptor by itself. Also making it clear that sig descriptor is not referenced in error returning path of grub_verify_signature_init(), so it can be closed directly by it's caller. This also makes delegating it to grub_pubkey_close() infeasible to help in relieving file descriptor leakage as it has to depend on uncertainty of ctxt fields in error returning path. Signed-off-by: Michael Chang <mchang@suse.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> |
||
---|---|---|
asm-tests | ||
build-aux | ||
conf | ||
docs | ||
grub-core | ||
include | ||
m4 | ||
po | ||
tests | ||
themes/starfield | ||
unicode | ||
util | ||
.gitignore | ||
ABOUT-NLS | ||
acinclude.m4 | ||
AUTHORS | ||
autogen.sh | ||
BUGS | ||
ChangeLog-2015 | ||
config.h.in | ||
configure.ac | ||
COPYING | ||
coreboot.cfg | ||
geninit.sh | ||
gentpl.py | ||
INSTALL | ||
linguas.sh | ||
Makefile.am | ||
Makefile.util.def | ||
NEWS | ||
README | ||
THANKS | ||
TODO |
This is GRUB 2, the second version of the GRand Unified Bootloader. GRUB 2 is rewritten from scratch to make GNU GRUB cleaner, safer, more robust, more powerful, and more portable. See the file NEWS for a description of recent changes to GRUB 2. See the file INSTALL for instructions on how to build and install the GRUB 2 data and program files. Please visit the official web page of GRUB 2, for more information. The URL is <http://www.gnu.org/software/grub/grub.html>. More extensive documentation is available in the Info manual, accessible using 'info grub' after building and installing GRUB 2. There are a number of important user-visible differences from the first version of GRUB, now known as GRUB Legacy. For a summary, please see: info grub Introduction 'Changes from GRUB Legacy'