Vladimir Serbinenko
ca0a4f689a
verifiers: File type for fine-grained signature-verification controlling
...
Let's provide file type info to the I/O layer. This way verifiers
framework and its users will be able to differentiate files and verify
only required ones.
This is preparatory patch.
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
2018-11-09 13:25:31 +01:00
Andrei Borzenkov
343dad410e
grub-core/disk/lzopio.c: fix double free in error path
...
CID: 73665
2014-11-28 22:37:00 +03:00
Jon McCune
24d5934daa
Fix double-free introduced by commit 33d02a42d6
...
To reproduce the problem, make sure you have a GPG public key available, build and install GRUB:
grub-install --debug --debug-image="all" --pubkey=/boot/pubkey.gpg --modules="serial terminfo gzio search search_label search_fs_uuid search_fs_file linux vbe video_fb video mmap relocator verify gcry_rsa gcry_dsa gcry_sha256 hashsum gcry_sha1 mpi echo loadenv boottime" /dev/sda
Sign all the files in /boot/grub/* and reboot.
'make check' results identical before and after this change.
TESTED: In a QEMU VM using an i386 target.
2013-12-17 07:32:07 -08:00
Vladimir Serbinenko
7e47e27bd8
Add gcc_struct to all packed structures when compiling with mingw.
...
Just "packed" doesn't always pack the way we expect.
2013-12-15 14:14:30 +01:00
Vladimir Serbinenko
9e34a34e44
* grub-core/io/lzopio.c: Remove variable length arrays.
2013-11-12 01:25:03 +01:00
Vladimir Serbinenko
3ee0869734
* grub-core/io/lzopio.c (test_header): Simplify code and remove useless
...
"checksum = checksum;".
2013-11-07 00:51:28 +01:00
Vladimir 'phcoder' Serbinenko
02adbb932d
* grub-core/io/lzopio.c: Use GRUB_PROPERLY_ALIGNED_ARRAY.
...
* grub-core/loader/i386/bsd.c: Likewise.
2013-04-28 15:18:50 +02:00
Vladimir 'phcoder' Serbinenko
5e3b8dcbb5
Import gcrypt public-key cryptography and implement signature checking.
2013-01-11 21:32:42 +01:00
Colin Watson
f8861eaf9f
* grub-core/io/bufio.c (grub_bufio_open): Use grub_zalloc instead of
...
explicitly zeroing elements.
* grub-core/io/gzio.c (grub_gzio_open): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_open): Remove explicit zeroing
of elements in a structure already allocated using grub_zalloc.
* grub-core/io/xzio.c (grub_xzio_open): Likewise.
2013-01-07 10:45:05 +00:00
Vladimir 'phcoder' Serbinenko
fd556a962e
* grub-core/io/lzopio.c (read_block_header): Fix incorrect byte swapping
...
(test_header): Likewise.
2012-04-07 19:54:51 +02:00
Vladimir 'phcoder' Serbinenko
d61386e21d
Improve string. Gettextize.
2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6
Improve gettext support. Stylistic fixes and error handling fixes while
...
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
67639fd75e
* grub-core/io/lzopio.c (uncompress_block): Fix use of incorrect
...
variable.
2012-01-30 01:18:02 +01:00
Vladimir 'phcoder' Serbinenko
9c2710789f
Eliminate grub_min/grub_max prone to overflow usage.
...
* grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Eliminate grub_min.
(poll_nonroot_hub): Likewise.
* grub-core/fs/affs.c (grub_affs_iterate_dir): Likewise.
(grub_affs_label): Likewise.
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Likewise.
* grub-core/fs/hfs.c (grub_hfs_dir): Likewise.
(grub_hfs_label): Likewise.
* grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
* grub-core/fs/zfs/zfs.c (MIN): Remove.
(zap_leaf_array_equal): Use grub_size. Remove MIN.
(zap_leaf_array_get): Likewise.
(dnode_get_path): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_read): Eliminate grub_min.
* grub-core/io/xzio.c (grub_xzio_read): Likewise.
* grub-core/script/execute.c (grub_script_break): Likewise.
* grub-core/script/lexer.c (grub_script_lexer_record): Eliminate
grub_max.
* grub-core/script/yylex.l (grub_lexer_yyrealloc): Likewise.
* include/grub/misc.h (grub_min): Removed.
(grub_max): Likewise.
2012-01-14 15:44:34 +01:00
Vladimir 'phcoder' Serbinenko
d1e293bbfa
* grub-core/io/lzopio.c (test_header): Fix incorrect memcmp instead of
...
grub_memcmp usage.
2011-10-23 22:55:32 +02:00
Szymon Janc
bc4d3f4809
* grub-core/io/lzopio.c (calculate_uncompressed_size): Fix return code.
2011-10-04 21:10:21 +02:00
Szymon Janc
0e2b7e39f2
* grub-core/fs/btrfs.c: Include <minilzo.h> instead of "minilzo.h".
...
* grub-core/io/lzopio.c: Likewise.
2011-10-03 22:25:06 +02:00
Szymon Janc
c5ed9266fc
* grub-core/io/lzopio.c: Improve crypt context alignment.
2011-10-03 22:06:10 +02:00
Szymon Janc
9c4f9ca010
* grub-core/io/lzopio.c (test_header): Some cleanups.
2011-09-06 21:21:13 +02:00
Szymon Janc
90b0a05579
Various bug fixes and improvements in lzopio. Should properly handle more
...
files now. Also added support for lzop checksums verification.
2011-08-21 18:48:19 +02:00
Szymon Janc
d6beefcfc9
Add initial support for lzop files decompression.
...
* grub-core/Makefile.core.def (lzopio): New module.
* grub-core/io/lzopio.c: New file.
* include/grub/file.h (grub_file_filter_id): New compression filter
GRUB_FILE_FILTER_LZOPIO.
2011-08-17 19:40:25 +02:00