diff options
| author | Anuj Mittal <anuj.mittal@intel.com> | 2024-01-23 16:47:34 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-24 15:46:19 +0000 |
| commit | fa809fd07390a2983695bd63270d05690fa854b9 (patch) | |
| tree | c7cb2ec991e3b29e205a723466b68cac3c4a0b4b /meta/recipes-bsp/grub/files/CVE-2022-28734-net-http-Fix-OOB-write-for-split-http-headers.patch | |
| parent | 0a010ac1b46651aaaf57008fb9e6db656822b2e4 (diff) | |
| download | poky-fa809fd07390a2983695bd63270d05690fa854b9.tar.gz | |
grub2: upgrade 2.06 -> 2.12
Drop patches that have been upstreamed. Refresh others.
This version dropped extra_deps.lst from the tarball [1] and that leads
to build failures. Restore it in do_configure for now.
[1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=b835601c7639ed1890f2d3db91900a8506011a8e
(From OE-Core rev: 7c8e1e48075f7f54aec9d295605c982f440be5d5)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub/files/CVE-2022-28734-net-http-Fix-OOB-write-for-split-http-headers.patch')
| -rw-r--r-- | meta/recipes-bsp/grub/files/CVE-2022-28734-net-http-Fix-OOB-write-for-split-http-headers.patch | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/recipes-bsp/grub/files/CVE-2022-28734-net-http-Fix-OOB-write-for-split-http-headers.patch b/meta/recipes-bsp/grub/files/CVE-2022-28734-net-http-Fix-OOB-write-for-split-http-headers.patch deleted file mode 100644 index e0ca1eec44..0000000000 --- a/meta/recipes-bsp/grub/files/CVE-2022-28734-net-http-Fix-OOB-write-for-split-http-headers.patch +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | From ec6bfd3237394c1c7dbf2fd73417173318d22f4b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Axtens <dja@axtens.net> | ||
| 3 | Date: Tue, 8 Mar 2022 18:17:03 +1100 | ||
| 4 | Subject: [PATCH] net/http: Fix OOB write for split http headers | ||
| 5 | |||
| 6 | GRUB has special code for handling an http header that is split | ||
| 7 | across two packets. | ||
| 8 | |||
| 9 | The code tracks the end of line by looking for a "\n" byte. The | ||
| 10 | code for split headers has always advanced the pointer just past the | ||
| 11 | end of the line, whereas the code that handles unsplit headers does | ||
| 12 | not advance the pointer. This extra advance causes the length to be | ||
| 13 | one greater, which breaks an assumption in parse_line(), leading to | ||
| 14 | it writing a NUL byte one byte past the end of the buffer where we | ||
| 15 | reconstruct the line from the two packets. | ||
| 16 | |||
| 17 | It's conceivable that an attacker controlled set of packets could | ||
| 18 | cause this to zero out the first byte of the "next" pointer of the | ||
| 19 | grub_mm_region structure following the current_line buffer. | ||
| 20 | |||
| 21 | Do not advance the pointer in the split header case. | ||
| 22 | |||
| 23 | Fixes: CVE-2022-28734 | ||
| 24 | |||
| 25 | Signed-off-by: Daniel Axtens <dja@axtens.net> | ||
| 26 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
| 27 | |||
| 28 | Upstream-Status: Backport | ||
| 29 | CVE: CVE-2022-28734 | ||
| 30 | |||
| 31 | Reference to upstream patch: | ||
| 32 | https://git.savannah.gnu.org/cgit/grub.git/commit/?id=ec6bfd3237394c1c7dbf2fd73417173318d22f4b | ||
| 33 | |||
| 34 | Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> | ||
| 35 | --- | ||
| 36 | grub-core/net/http.c | 4 +--- | ||
| 37 | 1 file changed, 1 insertion(+), 3 deletions(-) | ||
| 38 | |||
| 39 | diff --git a/grub-core/net/http.c b/grub-core/net/http.c | ||
| 40 | index f8d7bf0cd..33a0a28c4 100644 | ||
| 41 | --- a/grub-core/net/http.c | ||
| 42 | +++ b/grub-core/net/http.c | ||
| 43 | @@ -190,9 +190,7 @@ http_receive (grub_net_tcp_socket_t sock __attribute__ ((unused)), | ||
| 44 | int have_line = 1; | ||
| 45 | char *t; | ||
| 46 | ptr = grub_memchr (nb->data, '\n', nb->tail - nb->data); | ||
| 47 | - if (ptr) | ||
| 48 | - ptr++; | ||
| 49 | - else | ||
| 50 | + if (ptr == NULL) | ||
| 51 | { | ||
| 52 | have_line = 0; | ||
| 53 | ptr = (char *) nb->tail; | ||
| 54 | -- | ||
| 55 | 2.34.1 | ||
| 56 | |||
