integ/grub/grub2/debian/patches
Li Zhou 8e6824ec91 grub2/grub-efi: fix CVE-2022-28736
We add patches to fix CVEs for grub instead of upgrading because
grub2/grub-efi is ported from yocto for secure boot bringing up.

The patches for CVE-2022-28736 have conflicts with the patches for
secure boot. So refer to below link to fix this CVE:
(1) https://patchwork.yoctoproject.org/project/oe-core/patch/
20221207034254.58292-1-xiangyu.chen@eng.windriver.com/
(2)https://github.com/jiazhang0/meta-secure-core/pull/257

The special patches for grub-efi are from layers meta-lat and
meta-secure-core of yocto upstream, which are based on the patches
for grub-efi in oe-core layer (including CVE patches). We used to mix
all the patches together. Now we will move the patches from meta-lat
and meta-secure-core to the end of sequence for applying patches,
so that we can keep align with yocto upstream and make it easier
to maintain the grub here.
Since there are many patches involved here, we don't change the number
in patches' name in case confusion is caused if we rename many files.

Below commits are added for the CVE:
<loader/efi/chainloader: Simplify the loader state>
<commands/boot: Add API to pass context to loader>
<loader/efi/chainloader: Use grub_loader_set_ex()>

Below patches for secure boot are adapted for conflicts with above:
secure-core/0009 <efi: chainloader: port shim to grub>
secure-core/0010 <efi: chainloader: use shim to load and verify an image>
secure-core/0012 <efi: chainloader: take care of unload undershim>

All of them are aligned with upstream and no changes here.

Test plan:
 - PASS: build grub2/grub-efi.
 - PASS: build-image and install and boot up on lab/qemu.
 - PASS: check that the "stx.N" version number is right for both
         bios(grub2 ver) and uefi(grub-efi ver) boot.
 - PASS: the tests are done on lab with secure boot disabled and
         enabled.

Closes-Bug: #2034119

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Change-Id: I9a37cd8b804b238407f8ac6528f087a2eb0cf2de
2023-09-07 02:00:19 -04:00
..
0001-grub2-add-tboot.patch grub2: add deb folder 2021-12-07 22:45:15 +00:00
0002-grub2-checking-if-loop-devices-are-available.patch grub2: add deb folder 2021-12-07 22:45:15 +00:00
0003-kern-efi-sb-Reject-non-kernel-files-in-the-shim_lock.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0004-video-readers-Add-artificial-limit-to-image-dimensio.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0005-font-Reject-glyphs-exceeds-font-max_glyph_width-or-f.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0006-font-Fix-size-overflow-in-grub_font_get_glyph_intern.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0007-font-Fix-several-integer-overflows-in-grub_font_cons.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0008-font-Remove-grub_font_dup_glyph.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0009-font-Fix-integer-overflow-in-ensure_comb_space.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0010-font-Fix-integer-overflow-in-BMP-index.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0011-font-Fix-integer-underflow-in-binary-search-of-char-.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0012-kern-efi-sb-Enforce-verification-of-font-files.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0013-fbutil-Fix-integer-overflow.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0014-font-Fix-an-integer-underflow-in-blit_comb.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0015-font-Harden-grub_font_blit_glyph-and-grub_font_blit_.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0016-font-Assign-null_font-to-glyphs-in-ascii_font_glyph.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0017-normal-charset-Fix-an-integer-overflow-in-grub_unico.patch grub2/grub-efi: fix CVE-2022-2601/CVE-2022-3775 2023-06-01 06:08:44 -04:00
0018-video-readers-png-Drop-greyscale-support-to-fix-heap.patch grub2/grub-efi: fix CVEs 2023-09-07 01:42:31 -04:00
0019-video-readers-png-Avoid-heap-OOB-R-W-inserting-huff-.patch grub2/grub-efi: fix CVEs 2023-09-07 01:42:31 -04:00
0020-video-readers-jpeg-Block-int-underflow-wild-pointer-.patch grub2/grub-efi: fix CVEs 2023-09-07 01:42:31 -04:00
0021-net-ip-Do-IP-fragment-maths-safely.patch grub2/grub-efi: fix CVEs 2023-09-07 01:42:31 -04:00
0022-net-http-Fix-OOB-write-for-split-http-headers.patch grub2/grub-efi: fix CVEs 2023-09-07 01:42:31 -04:00
0023-net-http-Error-out-on-headers-with-LF-without-CR.patch grub2/grub-efi: fix CVEs 2023-09-07 01:42:31 -04:00
0024-loader-efi-chainloader-Simplify-the-loader-state.patch grub2/grub-efi: fix CVE-2022-28736 2023-09-07 02:00:19 -04:00
0025-commands-boot-Add-API-to-pass-context-to-loader.patch grub2/grub-efi: fix CVE-2022-28736 2023-09-07 02:00:19 -04:00
0026-loader-efi-chainloader-Use-grub_loader_set_ex.patch grub2/grub-efi: fix CVE-2022-28736 2023-09-07 02:00:19 -04:00
series grub2/grub-efi: fix CVE-2022-28736 2023-09-07 02:00:19 -04:00