Skip to content
Snippets Groups Projects
Commit 350ea27c authored by Rocky Automation's avatar Rocky Automation :tv:
Browse files

import grub2-2.02-90.el8_3.1

parent 3de3cfd0
No related branches found
Tags imports/r8/glibc-2.28-189.5.el8_6
No related merge requests found
Showing
with 120 additions and 176 deletions
......@@ -158,7 +158,7 @@ index 00000000000..dd76f00fc0e
+$0 prompts the user to set a password on the grub bootloader. The password
+is written to a file named user.cfg.
+
+Report bugs at https://bugzilla.redhat.com.
+Report bugs at https://bugs.rockylinux.org.
+EOF
+}
+
......
......@@ -51,5 +51,5 @@ index fb9d3a3b6f9..c8c0fa4199d 100644
+ -v, --version print the version information and exit
+ -o, --output_path <DIRECTORY> put user.cfg in a user-selected directory
Report bugs at https://bugzilla.redhat.com.
Report bugs at https://bugs.rockylinux.org.
EOF
From 0bde74dcdf9de128317a28796e2690f92214db0d Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 15 Apr 2020 15:45:02 -0400
Subject: [PATCH 281/314] yylex: Make lexer fatal errors actually be fatal
Subject: [PATCH] yylex: Make lexer fatal errors actually be fatal
When presented with a command that can't be tokenized to anything
smaller than YYLMAX characters, the parser calls YY_FATAL_ERROR(errmsg),
......@@ -65,6 +65,3 @@ index 7b44c37b76f..b7203c82309 100644
} while (0)
#define COPY(str, hint) \
--
2.26.2
From 42b76ec749c30cb11cad7c070d0b03a7d4f1f7d6 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 15 Jun 2020 10:58:42 -0400
Subject: [PATCH 282/314] safemath: Add some arithmetic primitives that check
for overflow
Subject: [PATCH] safemath: Add some arithmetic primitives that check for
overflow
This adds a new header, include/grub/safemath.h, that includes easy to
use wrappers for __builtin_{add,sub,mul}_overflow() declared like:
......@@ -122,6 +122,3 @@ index f3c20edc844..f8bd9116480 100644
* GNU Make
* GNU Bison 2.3 or later
* GNU gettext 0.17 or later
--
2.26.2
From 832189364ee0c85a94f670952c951252e54d3d1c Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 15 Jun 2020 12:15:29 -0400
Subject: [PATCH 283/314] calloc: Make sure we always have an overflow-checking
Subject: [PATCH] calloc: Make sure we always have an overflow-checking
calloc() available
This tries to make sure that everywhere in this source tree, we always have
......@@ -13,13 +13,13 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-commit-id: 79e51ab7a9a
---
grub-core/kern/emu/misc.c | 12 +++++++++
grub-core/kern/emu/mm.c | 10 ++++++++
grub-core/kern/mm.c | 40 ++++++++++++++++++++++++++++++
grub-core/lib/libgcrypt_wrap/mem.c | 11 ++++++--
grub-core/lib/posix_wrap/stdlib.h | 8 +++++-
grub-core/kern/emu/misc.c | 12 ++++++++++++
grub-core/kern/emu/mm.c | 10 ++++++++++
grub-core/kern/mm.c | 40 ++++++++++++++++++++++++++++++++++++++
grub-core/lib/libgcrypt_wrap/mem.c | 11 +++++++++--
grub-core/lib/posix_wrap/stdlib.h | 8 +++++++-
include/grub/emu/misc.h | 1 +
include/grub/mm.h | 6 +++++
include/grub/mm.h | 6 ++++++
7 files changed, 85 insertions(+), 3 deletions(-)
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
......@@ -238,6 +238,3 @@ index 28e2e53eb32..9c38dd3ca5d 100644
void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line,
grub_size_t size);
void *EXPORT_FUNC(grub_debug_zalloc) (const char *file, int line,
--
2.26.2
From 778ddaeac8a8a821f6844ec8b8c404d0e437991f Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 15 Jun 2020 12:26:01 -0400
Subject: [PATCH 284/314] calloc: Use calloc() at most places
Subject: [PATCH] calloc: Use calloc() at most places
This modifies most of the places we do some form of:
......@@ -23,91 +23,91 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-commit-id: 48eeedf1e4b
---
grub-core/bus/usb/usbhub.c | 8 ++--
grub-core/commands/efi/lsefisystab.c | 3 +-
grub-core/commands/legacycfg.c | 6 +--
grub-core/bus/usb/usbhub.c | 8 +++---
grub-core/commands/efi/lsefisystab.c | 3 ++-
grub-core/commands/legacycfg.c | 6 ++---
grub-core/commands/menuentry.c | 2 +-
grub-core/commands/nativedisk.c | 2 +-
grub-core/commands/parttool.c | 12 ++++--
grub-core/commands/parttool.c | 12 ++++++---
grub-core/commands/regexp.c | 2 +-
grub-core/commands/search_wrap.c | 2 +-
grub-core/disk/diskfilter.c | 4 +-
grub-core/disk/diskfilter.c | 4 +--
grub-core/disk/ieee1275/ofdisk.c | 2 +-
grub-core/disk/ldm.c | 14 +++----
grub-core/disk/ldm.c | 14 +++++-----
grub-core/disk/luks.c | 2 +-
grub-core/disk/lvm.c | 8 ++--
grub-core/disk/lvm.c | 8 +++---
grub-core/disk/xen/xendisk.c | 2 +-
grub-core/efiemu/loadcore.c | 2 +-
grub-core/efiemu/mm.c | 6 +--
grub-core/font/font.c | 3 +-
grub-core/fs/affs.c | 6 +--
grub-core/fs/btrfs.c | 4 +-
grub-core/efiemu/mm.c | 6 ++---
grub-core/font/font.c | 3 +--
grub-core/fs/affs.c | 6 ++---
grub-core/fs/btrfs.c | 4 +--
grub-core/fs/hfs.c | 2 +-
grub-core/fs/hfsplus.c | 45 +++++++++++++++--------
grub-core/fs/hfsplus.c | 45 ++++++++++++++++++++-----------
grub-core/fs/iso9660.c | 2 +-
grub-core/fs/ntfs.c | 4 +-
grub-core/fs/ntfs.c | 4 +--
grub-core/fs/sfs.c | 2 +-
grub-core/fs/tar.c | 2 +-
grub-core/fs/udf.c | 4 +-
grub-core/fs/zfs/zfs.c | 4 +-
grub-core/fs/udf.c | 4 +--
grub-core/fs/zfs/zfs.c | 4 +--
grub-core/gfxmenu/gui_string_util.c | 2 +-
grub-core/gfxmenu/widget-box.c | 4 +-
grub-core/gfxmenu/widget-box.c | 4 +--
grub-core/io/gzio.c | 2 +-
grub-core/kern/efi/efi.c | 33 ++++++++++++++---
grub-core/kern/efi/efi.c | 33 ++++++++++++++++++-----
grub-core/kern/emu/hostdisk.c | 2 +-
grub-core/kern/fs.c | 2 +-
grub-core/kern/misc.c | 2 +-
grub-core/kern/parser.c | 2 +-
grub-core/kern/uboot/uboot.c | 2 +-
grub-core/lib/libgcrypt/cipher/ac.c | 8 ++--
grub-core/lib/libgcrypt/cipher/primegen.c | 4 +-
grub-core/lib/libgcrypt/cipher/pubkey.c | 4 +-
grub-core/lib/libgcrypt/cipher/ac.c | 8 +++---
grub-core/lib/libgcrypt/cipher/primegen.c | 4 +--
grub-core/lib/libgcrypt/cipher/pubkey.c | 4 +--
grub-core/lib/priority_queue.c | 2 +-
grub-core/lib/reed_solomon.c | 7 ++--
grub-core/lib/relocator.c | 10 ++---
grub-core/lib/reed_solomon.c | 7 +++--
grub-core/lib/relocator.c | 10 +++----
grub-core/loader/arm/linux.c | 2 +-
grub-core/loader/efi/chainloader.c | 11 ++++--
grub-core/loader/efi/chainloader.c | 11 +++++---
grub-core/loader/i386/bsdXX.c | 2 +-
grub-core/loader/i386/xnu.c | 4 +-
grub-core/loader/i386/xnu.c | 4 +--
grub-core/loader/macho.c | 2 +-
grub-core/loader/multiboot_elfxx.c | 2 +-
grub-core/loader/xnu.c | 2 +-
grub-core/mmap/mmap.c | 4 +-
grub-core/mmap/mmap.c | 4 +--
grub-core/net/bootp.c | 2 +-
grub-core/net/dns.c | 10 ++---
grub-core/net/net.c | 4 +-
grub-core/normal/charset.c | 10 ++---
grub-core/normal/cmdline.c | 14 +++----
grub-core/normal/menu_entry.c | 14 +++----
grub-core/normal/menu_text.c | 4 +-
grub-core/normal/term.c | 4 +-
grub-core/osdep/linux/getroot.c | 6 +--
grub-core/net/dns.c | 10 +++----
grub-core/net/net.c | 4 +--
grub-core/normal/charset.c | 10 +++----
grub-core/normal/cmdline.c | 14 +++++-----
grub-core/normal/menu_entry.c | 14 +++++-----
grub-core/normal/menu_text.c | 4 +--
grub-core/normal/term.c | 4 +--
grub-core/osdep/linux/getroot.c | 6 ++---
grub-core/osdep/unix/config.c | 2 +-
grub-core/osdep/windows/getroot.c | 2 +-
grub-core/osdep/windows/hostdisk.c | 4 +-
grub-core/osdep/windows/hostdisk.c | 4 +--
grub-core/osdep/windows/init.c | 2 +-
grub-core/osdep/windows/platform.c | 4 +-
grub-core/osdep/windows/platform.c | 4 +--
grub-core/osdep/windows/relpath.c | 2 +-
grub-core/partmap/gpt.c | 2 +-
grub-core/partmap/msdos.c | 2 +-
grub-core/script/execute.c | 2 +-
grub-core/tests/fake_input.c | 2 +-
grub-core/tests/video_checksum.c | 6 +--
grub-core/tests/video_checksum.c | 6 ++---
grub-core/video/capture.c | 2 +-
grub-core/video/emu/sdl.c | 2 +-
grub-core/video/i386/pc/vga.c | 2 +-
grub-core/video/readers/png.c | 2 +-
util/getroot.c | 2 +-
util/grub-file.c | 2 +-
util/grub-fstest.c | 4 +-
util/grub-fstest.c | 4 +--
util/grub-install-common.c | 2 +-
util/grub-install.c | 4 +-
util/grub-mkimagexx.c | 6 +--
util/grub-mkrescue.c | 4 +-
util/grub-install.c | 4 +--
util/grub-mkimagexx.c | 6 ++---
util/grub-mkrescue.c | 4 +--
util/grub-mkstandalone.c | 2 +-
util/grub-pe2elf.c | 12 +++---
util/grub-probe.c | 4 +-
include/grub/unicode.h | 4 +-
util/grub-pe2elf.c | 12 ++++-----
util/grub-probe.c | 4 +--
include/grub/unicode.h | 4 +--
85 files changed, 231 insertions(+), 191 deletions(-)
diff --git a/grub-core/bus/usb/usbhub.c b/grub-core/bus/usb/usbhub.c
......@@ -1940,6 +1940,3 @@ index a0403e91f9a..4de986a8576 100644
if (!out->combining_ptr)
return;
grub_memcpy (out->combining_ptr, in->combining_ptr,
--
2.26.2
From 05c062003cff8dbbf1b394fa836378e88522e29c Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 15 Jun 2020 12:28:27 -0400
Subject: [PATCH 285/314] malloc: Use overflow checking primitives where we do
complex allocations
Subject: [PATCH] malloc: Use overflow checking primitives where we do complex
allocations
This attempts to fix the places where we do the following where
arithmetic_expr may include unvalidated data:
......@@ -30,29 +30,29 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-commit-id: 5fb2befbf04
---
grub-core/commands/legacycfg.c | 29 +++++++++++++++----
grub-core/commands/wildcard.c | 36 ++++++++++++++++++++----
grub-core/disk/ldm.c | 32 +++++++++++++++------
grub-core/font/font.c | 7 ++++-
grub-core/fs/btrfs.c | 29 +++++++++++++------
grub-core/fs/ext2.c | 10 ++++++-
grub-core/fs/iso9660.c | 51 ++++++++++++++++++++++++----------
grub-core/fs/sfs.c | 27 ++++++++++++++----
grub-core/fs/squash4.c | 45 ++++++++++++++++++++++--------
grub-core/fs/udf.c | 41 +++++++++++++++++----------
grub-core/fs/xfs.c | 11 +++++---
grub-core/fs/zfs/zfs.c | 22 ++++++++++-----
grub-core/fs/zfs/zfscrypt.c | 7 ++++-
grub-core/lib/arg.c | 20 +++++++++++--
grub-core/loader/i386/bsd.c | 8 +++++-
grub-core/net/dns.c | 9 +++++-
grub-core/normal/charset.c | 10 +++++--
grub-core/normal/cmdline.c | 14 ++++++++--
grub-core/normal/menu_entry.c | 13 +++++++--
grub-core/script/argv.c | 16 +++++++++--
grub-core/script/lexer.c | 21 ++++++++++++--
grub-core/video/bitmap.c | 25 +++++++++++------
grub-core/video/readers/png.c | 13 +++++++--
grub-core/commands/legacycfg.c | 29 +++++++++++++++++++-----
grub-core/commands/wildcard.c | 36 ++++++++++++++++++++++++-----
grub-core/disk/ldm.c | 32 ++++++++++++++++++--------
grub-core/font/font.c | 7 +++++-
grub-core/fs/btrfs.c | 29 ++++++++++++++++--------
grub-core/fs/ext2.c | 10 ++++++++-
grub-core/fs/iso9660.c | 51 +++++++++++++++++++++++++++++-------------
grub-core/fs/sfs.c | 27 +++++++++++++++++-----
grub-core/fs/squash4.c | 45 ++++++++++++++++++++++++++++---------
grub-core/fs/udf.c | 41 +++++++++++++++++++++------------
grub-core/fs/xfs.c | 11 +++++----
grub-core/fs/zfs/zfs.c | 22 ++++++++++++------
grub-core/fs/zfs/zfscrypt.c | 7 +++++-
grub-core/lib/arg.c | 20 +++++++++++++++--
grub-core/loader/i386/bsd.c | 8 ++++++-
grub-core/net/dns.c | 9 +++++++-
grub-core/normal/charset.c | 10 +++++++--
grub-core/normal/cmdline.c | 14 ++++++++++--
grub-core/normal/menu_entry.c | 13 +++++++++--
grub-core/script/argv.c | 16 +++++++++++--
grub-core/script/lexer.c | 21 ++++++++++++++---
grub-core/video/bitmap.c | 25 +++++++++++++--------
grub-core/video/readers/png.c | 13 +++++++++--
23 files changed, 383 insertions(+), 113 deletions(-)
diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c
......@@ -1318,6 +1318,3 @@ index e85df3c1b04..719e647e44f 100644
#ifndef GRUB_CPU_WORDS_BIGENDIAN
if (data->is_16bit || data->is_gray || data->is_palette)
--
2.26.2
From c37e76df9c58c3f170e838c42527ef8544bf4468 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Sat, 4 Jul 2020 12:25:09 -0400
Subject: [PATCH 286/314] iso9660: Don't leak memory on realloc() failures
Subject: [PATCH] iso9660: Don't leak memory on realloc() failures
Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
......@@ -64,6 +64,3 @@ index f45841e2b47..6fc9302bce3 100644
/* In pos + 1 the length of the `Component Record' is
stored. */
pos += entry->data[pos + 1] + 2;
--
2.26.2
From 0b3c4b90e1b928a2606f0801e6e872dd6cb85c42 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Kiper <daniel.kiper@oracle.com>
Date: Tue, 7 Jul 2020 15:36:26 +0200
Subject: [PATCH 287/314] font: Do not load more than one NAME section
Subject: [PATCH] font: Do not load more than one NAME section
The GRUB font file can have one NAME section only. Though if somebody
crafts a broken font file with many NAME sections and loads it then the
......@@ -33,6 +33,3 @@ index d63354fb51b..a7b955a1a74 100644
font->name = read_section_as_string (&section);
if (!font->name)
goto fail;
--
2.26.2
From 583a48bca23f7c4e0d691f0e6d065dac61bbfca1 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexey Makhalov <amakhalov@vmware.com>
Date: Wed, 8 Jul 2020 20:41:56 +0000
Subject: [PATCH 288/314] gfxmenu: Fix double free in load_image()
Subject: [PATCH] gfxmenu: Fix double free in load_image()
self->bitmap should be zeroed after free. Otherwise, there is a chance
to double free (USE_AFTER_FREE) it later in rescale_image().
......@@ -31,6 +31,3 @@ index 29784ed2d9a..6b2e976f16e 100644
if (self->raw_bitmap)
grub_video_bitmap_destroy (self->raw_bitmap);
--
2.26.2
From 301523f584d9aa624424c68ab3f085a9b7eca417 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexey Makhalov <amakhalov@vmware.com>
Date: Wed, 8 Jul 2020 21:30:43 +0000
Subject: [PATCH 289/314] xnu: Fix double free in
grub_xnu_devprop_add_property()
Subject: [PATCH] xnu: Fix double free in grub_xnu_devprop_add_property()
grub_xnu_devprop_add_property() should not free utf8 and utf16 as it get
allocated and freed in the caller.
......@@ -52,6 +51,3 @@ index ee0eaadc4ee..c760db30fc0 100644
grub_list_push (GRUB_AS_LIST_P (&dev->properties),
GRUB_AS_LIST (prop));
return GRUB_ERR_NONE;
--
2.26.2
From 656e3376d52c7244edac9264454c0fadac835749 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Thu, 9 Jul 2020 03:05:23 +0000
Subject: [PATCH 290/314] lzma: Make sure we don't dereference past array
Subject: [PATCH] lzma: Make sure we don't dereference past array
The two dimensional array p->posSlotEncoder[4][64] is being dereferenced
using the GetLenToPosState() macro which checks if len is less than 5,
......@@ -47,6 +47,3 @@ index f2ec04a8c28..753e56a95e3 100644
if (posSlot >= kStartPosModelIndex)
{
--
2.26.2
From 6df814d4f43a47ffe2b354b9fa683ed4022fa5f1 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Tue, 7 Jul 2020 15:12:25 -0400
Subject: [PATCH 291/314] term: Fix overflow on user inputs
Subject: [PATCH] term: Fix overflow on user inputs
This requires a very weird input from the serial interface but can cause
an overflow in input_buf (keys) overwriting the next variable (npending)
......@@ -61,6 +61,3 @@ index 537a5c0cb0b..44d0b3b19fb 100644
#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
if (data->npending == 1 && data->input_buf[0] == GRUB_TERM_ESC
--
2.26.2
From 1864839f0e0eeb2b93a5b20e4e36f9b80abc3c23 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Tue, 7 Jul 2020 22:02:31 -0400
Subject: [PATCH 292/314] udf: Fix memory leak
Subject: [PATCH] udf: Fix memory leak
Fixes: CID 73796
......@@ -51,6 +51,3 @@ index be41b48f913..6670beb5665 100644
if (filename && hook (filename, type, child, hook_data))
{
--
2.26.2
From 9b970d31434e3fd6a8de36a6adef5cc721b265a8 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Fri, 26 Jun 2020 10:51:43 -0400
Subject: [PATCH 293/314] multiboot2: Fix memory leak if
grub_create_loader_cmdline() fails
Subject: [PATCH] multiboot2: Fix memory leak if grub_create_loader_cmdline()
fails
Fixes: CID 292468
......@@ -42,6 +42,3 @@ index 54078455e2f..872dcd42e97 100644
if (modules_last)
modules_last->next = newmod;
--
2.26.2
From 0ecb57c7bc38cb5de4a1b23909203a3331f5c84b Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexey Makhalov <amakhalov@vmware.com>
Date: Thu, 9 Jul 2020 08:10:40 +0000
Subject: [PATCH 294/314] tftp: Do not use priority queue
Subject: [PATCH] tftp: Do not use priority queue
There is not need to reassemble the order of blocks. Per RFC 1350,
server must wait for the ACK, before sending next block. Data packets
......@@ -31,7 +31,7 @@ Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-commit-id: 8316694c4f7
---
grub-core/net/tftp.c | 174 ++++++++++++++-----------------------------
grub-core/net/tftp.c | 174 ++++++++++++++++-----------------------------------
1 file changed, 54 insertions(+), 120 deletions(-)
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
......@@ -284,6 +284,3 @@ index e267af354f4..79c16f9b041 100644
grub_free (data);
return GRUB_ERR_NONE;
}
--
2.26.2
From 320fe69ffff39f90169f793402de4d4223a1a64c Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexey Makhalov <amakhalov@vmware.com>
Date: Wed, 15 Jul 2020 06:42:37 +0000
Subject: [PATCH 295/314] relocator: Protect grub_relocator_alloc_chunk_addr()
input args against integer underflow/overflow
Subject: [PATCH] relocator: Protect grub_relocator_alloc_chunk_addr() input
args against integer underflow/overflow
Use arithmetic macros from safemath.h to accomplish it. In this commit,
I didn't want to be too paranoid to check every possible math equation
......@@ -145,6 +145,3 @@ index dc7d5409e1e..2bf02489bad 100644
grub_xnu_heap_size += size;
grub_dprintf ("xnu", "val=%p\n", *src);
return GRUB_ERR_NONE;
--
2.26.2
From 93d697a46b43ee13e0343c79777af5ce23c313b7 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexey Makhalov <amakhalov@vmware.com>
Date: Wed, 8 Jul 2020 01:44:38 +0000
Subject: [PATCH 296/314] relocator: Protect grub_relocator_alloc_chunk_align()
Subject: [PATCH] relocator: Protect grub_relocator_alloc_chunk_align()
max_addr against integer underflow
This commit introduces integer underflow mitigation in max_addr calculation
......@@ -20,7 +20,7 @@ Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-commit-id: 10498c8ba17
---
grub-core/lib/i386/relocator.c | 28 ++++++++++----------------
grub-core/lib/i386/relocator.c | 28 +++++++++++-----------------
grub-core/lib/mips/relocator.c | 6 ++----
grub-core/lib/powerpc/relocator.c | 6 ++----
grub-core/lib/x86_64/efi/relocator.c | 7 +++----
......@@ -29,10 +29,10 @@ Upstream-commit-id: 10498c8ba17
grub-core/loader/i386/pc/linux.c | 6 ++----
grub-core/loader/mips/linux.c | 9 +++------
grub-core/loader/multiboot.c | 2 +-
grub-core/loader/multiboot_elfxx.c | 10 ++++-----
grub-core/loader/multiboot_mbi2.c | 10 ++++-----
grub-core/loader/multiboot_elfxx.c | 10 +++++-----
grub-core/loader/multiboot_mbi2.c | 10 +++++-----
grub-core/loader/xnu_resume.c | 2 +-
include/grub/relocator.h | 29 +++++++++++++++++++++++++++
include/grub/relocator.h | 29 +++++++++++++++++++++++++++++
13 files changed, 69 insertions(+), 58 deletions(-)
diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c
......@@ -333,6 +333,3 @@ index 24d8672d22c..1b3bdd92ac6 100644
#define GRUB_RELOCATOR_PREFERENCE_NONE 0
#define GRUB_RELOCATOR_PREFERENCE_LOW 1
#define GRUB_RELOCATOR_PREFERENCE_HIGH 2
--
2.26.2
From 19d627a430f6917afeee167daa9190d1ec83d7b7 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Coulson <chris.coulson@canonical.com>
Date: Fri, 10 Jul 2020 11:21:14 +0100
Subject: [PATCH 297/314] script: Remove unused fields from
grub_script_function struct
Subject: [PATCH] script: Remove unused fields from grub_script_function struct
Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
......@@ -29,6 +28,3 @@ index 360c2be1f05..b382bcf09bc 100644
};
typedef struct grub_script_function *grub_script_function_t;
--
2.26.2
From c1de65c0e3d630f33160d34e1e85925f01966b0d Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Coulson <chris.coulson@canonical.com>
Date: Fri, 10 Jul 2020 14:41:45 +0100
Subject: [PATCH 298/314] script: Avoid a use-after-free when redefining a
function during execution
Subject: [PATCH] script: Avoid a use-after-free when redefining a function
during execution
Defining a new function with the same name as a previously defined
function causes the grub_script and associated resources for the
......@@ -103,6 +103,3 @@ index 4f0ab8319e3..f80b86b6f15 100644
}
state->scripts = $<scripts>3;
--
2.26.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment