avahi: add CVE-2023-38473.patch to SRC_URL
PATCH 1/6 avahi: add CVE-2023-38473.patch to SRC_URL
From: Lee Chee Yang <[email protected]>
patch file added since Oe-Core rev a9203c46cd64c3ec5e5b00e381bbac85733f85df but not part of SRC_URI.
--- meta/recipes-connectivity/avahi/avahi_0.8.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-connectivity/avahi/avahi_0.8.bb +1 -0
@@ -34,6 +34,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \ file://CVE-2023-38471-1.patch \ file://CVE-2023-38471-2.patch \ file://CVE-2023-38472.patch \ + file://CVE-2023-38473.patch \ " GITHUB_BASE_URI = "https://github.com/lathiat/avahi/releases/"
Signature · 1 line
2.37.3
PATCH 2/6 grub: fix CVE-2023-4692 CVE-2023-4693
From: Lee Chee Yang <[email protected]>
checkout CVE-2023-4692.patch from OE-Core rev:c89835b37366dde6c74f8221fd5a295ecabf8225
checkout CVE-2023-4693.patch from OE-Core rev:1bbbba098dba85ec1b875512d75f7eca9026e781
--- .../grub/files/CVE-2023-4692.patch | 97 +++++++++++++++++++ .../grub/files/CVE-2023-4693.patch | 62 ++++++++++++ meta/recipes-bsp/grub/grub2.inc | 2 + 3 files changed, 161 insertions(+) create mode 100644 meta/recipes-bsp/grub/files/CVE-2023-4692.patch create mode 100644 meta/recipes-bsp/grub/files/CVE-2023-4693.patch
meta/recipes-bsp/grub/files/CVE-2023-4692.patch new file +97 -0
@@ -0,0 +1,97 @@ +From 43651027d24e62a7a463254165e1e46e42aecdea Mon Sep 17 00:00:00 2001 +From: Maxim Suhanov <[email protected]> +Date: Thu, 16 Nov 2023 07:21:50 +0000 +Subject: [PATCH] fs/ntfs: Fix an OOB write when parsing the $ATTRIBUTE_LIST + attribute for the $MFT file + +When parsing an extremely fragmented $MFT file, i.e., the file described +using the $ATTRIBUTE_LIST attribute, current NTFS code will reuse a buffer +containing bytes read from the underlying drive to store sector numbers, +which are consumed later to read data from these sectors into another buffer. + +These sectors numbers, two 32-bit integers, are always stored at predefined +offsets, 0x10 and 0x14, relative to first byte of the selected entry within +the $ATTRIBUTE_LIST attribute. Usually, this won't cause any problem. + +However, when parsing a specially-crafted file system image, this may cause +the NTFS code to write these integers beyond the buffer boundary, likely +causing the GRUB memory allocator to misbehave or fail. These integers contain +values which are controlled by on-disk structures of the NTFS file system. + +Such modification and resulting misbehavior may touch a memory range not +assigned to the GRUB and owned by firmware or another EFI application/driver. + +This fix introduces checks to ensure that these sector numbers are never +written beyond the boundary. + +Fixes: CVE-2023-4692 + +Reported-by: Maxim Suhanov <[email protected]> +Signed-off-by: Maxim Suhanov <[email protected]> +Reviewed-by: Daniel Kiper <[email protected]> + +CVE: CVE-2023-4692 +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=43651027d24e62a7a463254165e1e46e42aecdea] + +Signed-off-by: Yogita Urade <[email protected]> +--- + grub-core/fs/ntfs.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c +index 2f34f76..6009e49 100644 +--- a/grub-core/fs/ntfs.c ++++ b/grub-core/fs/ntfs.c +@@ -184,7 +184,7 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr) + } + if (at->attr_end) + { +- grub_uint8_t *pa; ++ grub_uint8_t *pa, *pa_end; + + at->emft_buf = grub_malloc (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR); + if (at->emft_buf == NULL) +@@ -209,11 +209,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr) + } + at->attr_nxt = at->edat_buf; + at->attr_end = at->edat_buf + u32at (pa, 0x30); ++ pa_end = at->edat_buf + n; + } + else + { + at->attr_nxt = at->attr_end + u16at (pa, 0x14); + at->attr_end = at->attr_end + u32at (pa, 4); ++ pa_end = at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR); + } + at->flags |= GRUB_NTFS_AF_ALST; + while (at->attr_nxt < at->attr_end) +@@ -230,6 +232,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr) + at->flags |= GRUB_NTFS_AF_GPOS; + at->attr_cur = at->attr_nxt; + pa = at->attr_cur; ++ ++ if ((pa >= pa_end) || (pa_end - pa < 0x18)) ++ { ++ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list"); ++ return NULL; ++ } ++ + grub_set_unaligned32 ((char *) pa + 0x10, + grub_cpu_to_le32 (at->mft->data->mft_start)); + grub_set_unaligned32 ((char *) pa + 0x14, +@@ -240,6 +249,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr) + { + if (*pa != attr) + break; ++ ++ if ((pa >= pa_end) || (pa_end - pa < 0x18)) ++ { ++ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list"); ++ return NULL; ++ } ++ + if (read_attr + (at, pa + 0x10, + u32at (pa, 0x10) * (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR), +-- +2.40.0
meta/recipes-bsp/grub/files/CVE-2023-4693.patch new file +62 -0
62 lines not on this page · raw message
meta/recipes-bsp/grub/grub2.inc +2 -0
@@ -42,6 +42,8 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ file://CVE-2022-3775.patch \ file://0001-risc-v-Handle-R_RISCV_CALL_PLT-reloc.patch \ file://0001-fs-ext2-Ignore-checksum-seed-incompat-feature.patch \ + file://CVE-2023-4692.patch \ + file://CVE-2023-4693.patch \ " SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
Signature · 1 line
2.37.3
PATCH 3/6 perlcross: update to 1.5.2
In reply to [email protected]From: Lee Chee Yang <[email protected]>
remove upstreamed 0001-cnf-configure_pfmt.sh-add-32-bit-integer-format-defi.patch
---
...mt.sh-add-32-bit-integer-format-defi.patch | 28 -------------------
.../{perlcross_1.5.bb => perlcross_1.5.2.bb} | 3 +-
2 files changed, 1 insertion(+), 30 deletions(-)
delete mode 100644 meta/recipes-devtools/perl-cross/files/0001-cnf-configure_pfmt.sh-add-32-bit-integer-format-defi.patch
rename meta/recipes-devtools/perl-cross/{perlcross_1.5.bb => perlcross_1.5.2.bb} (86%)meta/recipes-devtools/perl-cross/files/0001-cnf-configure_pfmt.sh-add-32-bit-integer-format-defi.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From 920abf3dc39c851a655b719622c76a6f0dc9981d Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Tue, 5 Sep 2023 19:47:33 +0200 -Subject: [PATCH] cnf/configure_pfmt.sh: add 32 bit integer format definitions - -These started to matter in perl 5.38 where they are used to print -line numbers. - -Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/143] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - cnf/configure_pfmt.sh | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/cnf/configure_pfmt.sh b/cnf/configure_pfmt.sh -index 8f93da1..7bb4b6f 100644 ---- a/cnf/configure_pfmt.sh -+++ b/cnf/configure_pfmt.sh -@@ -52,3 +52,9 @@ else - define uvxformat '"lx"' - define uvXUformat '"lX"' - fi -+ -+define i32dformat 'PRId32' -+define u32uformat 'PRIu32' -+define u32oformat 'PRIo32' -+define u32xformat 'PRIx32' -+define u32XUformat 'PRIX32'
meta/recipes-devtools/perl-cross/perlcross_1.5.2.bb renamed from meta/recipes-devtools/perl-cross/perlcross_1.5.bb +1 -2
@@ -15,11 +15,10 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/perl-cross-${PV}.tar.gz;name=perl-c file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \ file://determinism.patch \ file://0001-Makefile-check-the-file-if-patched-or-not.patch \ - file://0001-cnf-configure_pfmt.sh-add-32-bit-integer-format-defi.patch \ " GITHUB_BASE_URI = "https://github.com/arsv/perl-cross/releases/" -SRC_URI[perl-cross.sha256sum] = "d744a390939e2ebb9a12f6725b4d9c19255a141d90031eff90ea183fdfcbf211" +SRC_URI[perl-cross.sha256sum] = "584dc54c48dca25e032b676a15bef377c1fed9de318b4fc140292a5dbf326e90" S = "${WORKDIR}/perl-cross-${PV}"
Signature · 1 line
2.37.3
PATCH 4/6 perl: 5.38.0 -> 5.38.2
In reply to [email protected]From: Lee Chee Yang <[email protected]>
update include fix for CVE-2023-47100.
---
meta/recipes-devtools/perl/{perl_5.38.0.bb => perl_5.38.2.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/perl/{perl_5.38.0.bb => perl_5.38.2.bb} (99%)meta/recipes-devtools/perl/perl_5.38.2.bb renamed from meta/recipes-devtools/perl/perl_5.38.0.bb +1 -1
@@ -26,7 +26,7 @@ SRC_URI:append:class-target = " \ file://encodefix.patch \ " -SRC_URI[perl.sha256sum] = "213ef58089d2f2c972ea353517dc60ec3656f050dcc027666e118b508423e517" +SRC_URI[perl.sha256sum] = "a0a31534451eb7b83c7d6594a497543a54d488bc90ca00f5e34762577f40655e" B = "${WORKDIR}/perl-${PV}-build"
Signature · 1 line
2.37.3
PATCH 5/6 ghostscript: upgrade 10.02.0 -> 10.02.1
In reply to [email protected]From: Wang Mingyu <[email protected]>
upgrade include CVE-2023-46751.
(cherry pick from Oe-Core rev: 9492c2d51a08fbd4c107540a5a833b1a3fb70504 )
---
.../{ghostscript_10.02.0.bb => ghostscript_10.02.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-extended/ghostscript/{ghostscript_10.02.0.bb => ghostscript_10.02.1.bb} (97%)meta/recipes-extended/ghostscript/ghostscript_10.02.1.bb renamed from meta/recipes-extended/ghostscript/ghostscript_10.02.0.bb +1 -1
@@ -28,7 +28,7 @@ SRC_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/downlo file://configure.ac-add-option-to-explicitly-disable-neon.patch \ " -SRC_URI[sha256sum] = "e54062f166708d84ca82de9f8304a04344466080f936118b88082bd55ed6dc97" +SRC_URI[sha256sum] = "e429e4f5b01615a4f0f93a4128e8a1a4d932dff983b1774174c79c0630717ad9" PACKAGECONFIG ??= "" PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
Signature · 1 line
2.37.3
PATCH 6/6 perf: lift TARGET_CC_ARCH modification out of security_flags.inc
In reply to [email protected]From: Rasmus Villemoes <[email protected]>
Building perf without security_flags.inc being included in one's distro results in the buildpaths warning
WARNING: perf-1.0-r9 do_package_qa: QA Issue: File /usr/bin/trace in package perf contains reference to TMPDIR
because the ${DEBUG_PREFIX_MAP} does not get used. Most recipes get that from CFLAGS, but the perf recipe explicitly unsets that.
Now ${SELECTED_OPTIMIZATION} of course contains more than just ${DEBUG_FLAGS}/${DEBUG_PREFIX_MAP}. For most TUs, perf's build system adds its own optimization flags (-O6 for odd reasons), so for those including the -O2 or -Og doesn't change anything. But looking at the .o.cmd files show that there are some TUs which currently get built without any -O flag. So for those adding the distro's SELECTED_OPTIMIZATION seem to be the right thing to do.
(cherry-picked from Oe-Core rev: aa01c9122ef4a2159df503ef6ed25e802277f13a)
--- meta/conf/distro/include/security_flags.inc | 1 - meta/recipes-kernel/perf/perf.bb | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
meta/conf/distro/include/security_flags.inc +0 -1
@@ -69,4 +69,3 @@ SECURITY_LDFLAGS:pn-xserver-xorg = "${SECURITY_X_LDFLAGS}" TARGET_CC_ARCH:append:pn-binutils = " ${SELECTED_OPTIMIZATION}" TARGET_CC_ARCH:append:pn-gcc = " ${SELECTED_OPTIMIZATION}" TARGET_CC_ARCH:append:pn-gdb = " ${SELECTED_OPTIMIZATION}" -TARGET_CC_ARCH:append:pn-perf = " ${SELECTED_OPTIMIZATION}"
meta/recipes-kernel/perf/perf.bb +9 -0
@@ -73,6 +73,15 @@ SPDX_S = "${S}/tools/perf" # supported kernel. LDFLAGS="-ldl -lutil" +# Perf's build system adds its own optimization flags for most TUs, +# overriding the flags included here. But for some, perf does not add +# any -O option, so ensure the distro's chosen optimization gets used +# for those. Since ${SELECTED_OPTIMIZATION} always includes +# ${DEBUG_FLAGS} which in turn includes ${DEBUG_PREFIX_MAP}, this also +# ensures perf is built with appropriate -f*-prefix-map options, +# avoiding the 'buildpaths' QA warning. +TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION}" + EXTRA_OEMAKE = '\ V=1 \ VF=1 \
Signature · 1 line
2.37.3