~xnox/grub:one-grub-v3

Last commit made on 2021-02-23
Get this branch:
git clone -b one-grub-v3 https://git.launchpad.net/~xnox/grub
Only Dimitri John Ledkov can upload to this branch. If you are Dimitri John Ledkov please log in for upload directions.

Branch merges

Branch information

Name:
one-grub-v3
Repository:
lp:~xnox/grub

Recent commits

a031a29... by Dimitri John Ledkov

one-grub v3

efb804c... by Dimitri John Ledkov

releasing package grub2 version 2.04-1ubuntu40

17032fc... by Dimitri John Ledkov

merge patched-ubuntu into ubuntu

590404c... by Gustavo Luiz Duarte <email address hidden>

net: Fix crash on http

Don't free file->data on receiving FIN flag since it is used all over
without checking. http_close() will be called later to free that memory.

Fixes bug: https://bugzilla.redhat.com/show_bug.cgi?id=860834

Signed-off-by: Gustavo Luiz Duarte <email address hidden>
Signed-off-by: Javier Martinez Canillas <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>
(cherry picked from commit fc085f7f1860cb864aa61bb3f248a970565a9055)

Patch-Name: cherry-fix-crash-on-http.patch

2646b14... by Robert Marshall <email address hidden>

Update info with grub.cfg netboot selection order (#1148650)

Added documentation to the grub info page that specifies the order
netboot clients will use to select a grub configuration file.

Resolves rhbz#1148650

Patch-Name: rhboot-f34-update-info-with-grub.cfg-netboot-selection-order.patch

bfa0b5c... by Mike Gilbert

datetime: Enable the datetime module for the emu platform

Fixes a build failure:

  grub-core/commands/date.c:49: undefined reference to `grub_get_weekday_name'
  grub-core/commands/ls.c:155: undefined reference to `grub_unixtime2datetime'

Bug: https://bugs.gentoo.org/711512

Signed-off-by: Mike Gilbert <email address hidden>
Reviewed-by: Javier Martinez Canillas <email address hidden>
Tested-by: Javier Martinez Canillas <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

Patch-Name: cherry-enable-datetime-emu.patch

be1df38... by Paulo Flabiano Smorigo

normal/main: Search for specific config files for netboot

This patch implements a search for a specific configuration when the config
file is on a remoteserver. It uses the following order:
   1) DHCP client UUID option.
   2) MAC address (in lower case hexadecimal with dash separators);
   3) IP (in upper case hexadecimal) or IPv6;
   4) The original grub.cfg file.

This procedure is similar to what is used by pxelinux and yaboot:
http://www.syslinux.org/wiki/index.php/PXELINUX#config

It is enabled by default but can be disabled by setting the environment
variable "feature_net_search_cfg" to "n" in an embedded configuration.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=873406

Signed-off-by: Paulo Flabiano Smorigo <email address hidden>
Signed-off-by: Javier Martinez Canillas <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

Patch-Name: suse-search-for-specific-config-files-for-netboot.patch

3a136af... by Javier Martinez Canillas <email address hidden>

normal: Move common datetime functions out of the normal module

The common datetime helper functions are currently included in the normal
module, but this makes any other module that calls these functions to have
a dependency with the normal module only for this reason.

Since the normal module does a lot of stuff, it calls functions from other
modules. But since other modules may depend on it for calling the datetime
helpers, this could lead to circular dependencies between modules.

As an example, when platform == xen the grub_get_datetime() function from
the datetime module calls to the grub_unixtime2datetime() helper function
from the normal module. Which leads to the following module dependency:

    datetime -> normal

and send_dhcp_packet() from the net module calls the grub_get_datetime()
function, which leads to the following module dependency:

    net -> datetime -> normal

but that means that the normal module is not allowed to depend on net or
any other module that depends on it due the transitive dependency caused
by datetime. A recent patch attempted to add support to fetch the config
file over the network, which leads to the following circular dependency:

    normal -> net -> datetime -> normal

So having the datetime helpers in the normal module makes it quite fragile
and easy to add circular dependencies like these, that break the build due
the genmoddep.awk script catching the issues.

Fix this by taking the datetime helper functions out of the normal module
and instead add them to the datetime module itself. Besides fixing these
issues, it makes more sense to have these helper functions there anyways.

Reported-by: Daniel Kiper <email address hidden>
Signed-off-by: Javier Martinez Canillas <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

Patch-Name: cherry-move-common-datetime-functions.patch

c0dfbc4... by Peter Jones

efinet: also use the firmware acceleration for http

Signed-off-by: Peter Jones <email address hidden>

Patch-Name: rhboot-f34-efinet-also-use-the-firmware-acceleration-for-http.patch

f473146... by Sebastian Krahmer <email address hidden>

AUDIT-0: http boot tracker bug

Fixing a memory leak in case of error, and a integer overflow, leading to a
heap overflow due to overly large chunk sizes.

We need to check against some maximum value, otherwise values like 0xffffffff
will eventually lead in the allocation functions to small sized buffers, since
the len is rounded up to the next reasonable alignment. The following memcpy
will then smash the heap, leading to RCE.

This is no big issue for pure http boot, since its going to execute an
untrusted kernel anyway, but it will break trusted boot scenarios, where only
signed code is allowed to be executed.

Signed-off-by: Michael Chang <email address hidden>

Origin: SUSE
UEFI HTTP and related network protocol support (FATE#320130)
Patch420: 0001-add-support-for-UEFI-network-protocols.patch
Patch421: 0002-AUDIT-0-http-boot-tracker-bug.patch

Patch-Name: suse-AUDIT-0-http-boot-tracker-bug.patch