Patch review
cover Patch review
Please review this set of changes for kirkstone and have comments back by end of day Thursday, October 31
Passed a-full on autobuilder:
https://valkyrie.yoctoproject.org/#/builders/29/builds/362
The following changes since commit 983e3efb51ab22f1fa5f90cbbfba2d701aa425fc:
kmscube: create_framebuffer: backport modifier fix (2024-10-16 06:55:13 -0700)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut
Antoine Lubineau (1):
cve-check: add CVSS vector string to CVE database and reports
Ashish Sharma (1):
ghostscript: Backport CVE-2024-29508
Eilís 'pidge' Ní Fhlannagáin (1):
nativesdk-intercept: Fix bad intercept chgrp/chown logic
Khem Raj (3):
zip: Make configure checks to be more robust
zip: Fix build with gcc-14
util-linux: Define pidfd_* function signatures
Martin Jansa (3):
vala: add -Wno-error=incompatible-pointer-types work around
libffi: backport a fix to build libffi-native with gcc-14
at-spi2-core: backport a patch to fix build with gcc-14 on host
Peter Marko (3):
openssl: patch CVE-2024-9143
python3: ignore fixed CVEs
cve-check: add support for cvss v4.0
Rohini Sangam (1):
vim: Upgrade 9.1.0698 -> 9.1.0764
Siddharth Doshi (1):
vim: Upgrade 9.1.0682 -> 9.1.0698
Steve Sakoman (1):
bmap-tools: update HOMEPAGE and SRC_URI
Wang Mingyu (1):
orc: upgrade 0.4.39 -> 0.4.40
Yogita Urade (1):
qemu: fix CVE-2023-3019
Zoltan Boszormenyi (1):
cracklib: Modify patch to compile with GCC 14
[email protected] (1):
overlayfs-etc: add option to skip creation of mount dirs
meta/classes/cve-check.bbclass | 12 +-
meta/classes/overlayfs-etc.bbclass | 5 +-
meta/files/overlayfs-etc-preinit.sh.in | 16 +-
.../openssl/openssl/CVE-2024-9143.patch | 202 ++++++
.../openssl/openssl_3.0.15.bb | 1 +
.../meta/cve-update-nvd2-native.bb | 19 +-
meta/recipes-core/util-linux/util-linux.inc | 1 +
.../0001-check-for-sys-pidfd.h.patch | 50 ++
.../orc/{orc_0.4.39.bb => orc_0.4.40.bb} | 2 +-
.../python/python3_3.10.15.bb | 2 +
meta/recipes-devtools/qemu/qemu.inc | 18 +-
.../qemu/qemu/CVE-2023-3019-0001.patch | 622 ++++++++++++++++++
.../qemu/qemu/CVE-2023-3019-0002.patch | 91 +++
meta/recipes-devtools/vala/vala.inc | 4 +
...port-dictionary-byte-order-dependent.patch | 2 +-
.../ghostscript/CVE-2024-29508-1.patch | 308 +++++++++
.../ghostscript/CVE-2024-29508-2.patch | 29 +
.../ghostscript/ghostscript_9.55.0.bb | 2 +
...e-dirent.h-for-closedir-opendir-APIs.patch | 45 ++
...y-correct-function-signatures-and-de.patch | 134 ++++
meta/recipes-extended/zip/zip_3.0.bb | 2 +
.../0001-Fix-function-prototype.patch | 27 +
.../atk/at-spi2-core_2.42.0.bb | 1 +
.../bmap-tools/bmap-tools_git.bb | 4 +-
...ward-declare-open_temp_exec_file-764.patch | 47 ++
meta/recipes-support/libffi/libffi_3.4.4.bb | 1 +
meta/recipes-support/vim/vim.inc | 4 +-
scripts/nativesdk-intercept/chgrp | 5 +-
scripts/nativesdk-intercept/chown | 5 +-
29 files changed, 1630 insertions(+), 31 deletions(-)
create mode 100755 meta/recipes-connectivity/openssl/openssl/CVE-2024-9143.patch
create mode 100644 meta/recipes-core/util-linux/util-linux/0001-check-for-sys-pidfd.h.patch
rename meta/recipes-devtools/orc/{orc_0.4.39.bb => orc_0.4.40.bb} (92%)
create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2023-3019-0001.patch
create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2023-3019-0002.patch
create mode 100644 meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29508-1.patch
create mode 100644 meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29508-2.patch
create mode 100644 meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch
create mode 100644 meta/recipes-extended/zip/zip-3.0/0001-configure-Specify-correct-function-signatures-and-de.patch
create mode 100644 meta/recipes-support/atk/at-spi2-core/0001-Fix-function-prototype.patch
create mode 100644 meta/recipes-support/libffi/libffi/0001-Forward-declare-open_temp_exec_file-764.patchSignature · 1 line
2.34.1
PATCH 1/19 ghostscript: Backport CVE-2024-29508
From: Ashish Sharma <[email protected]>
Import patch from ubuntu to fix
CVE-2024-29508
Upstream-Status: Backport [https://git.launchpad.net/ubuntu/+source/ghostscript/commit/?h=ubuntu/focal-security&id=22b23aa6de7613a4d9c1da9c84d72427c9d0cf1a]
Upstream commit: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=ff1013a0ab485b66783b70145e342a82c670906a
--- .../ghostscript/CVE-2024-29508-1.patch | 308 ++++++++++++++++++ .../ghostscript/CVE-2024-29508-2.patch | 29 ++ .../ghostscript/ghostscript_9.55.0.bb | 2 + 3 files changed, 339 insertions(+) create mode 100644 meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29508-1.patch create mode 100644 meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29508-2.patch
meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29508-1.patch new file +308 -0
@@ -0,0 +1,308 @@ +Backport of: +Note: updated to fix compiler warning. + +From ff1013a0ab485b66783b70145e342a82c670906a Mon Sep 17 00:00:00 2001 +From: Ken Sharp <[email protected]> +Date: Thu, 25 Jan 2024 11:53:44 +0000 +Subject: Bug 707510 - review printing of pointers + +This is for item 4 of the report, which is addressed by the change in +gdevpdtb.c. That change uses a fixed name for fonts which have no name +instead of using the pointer to the address of the font. + +The remaining changes are all due to reviewing the use of PRI_INTPTR. +In general we only use that for debugging purposes but there were a few +places which were printing pointers arbitrarily, even in a release build. + +We really don't want to do that so I've modified the places which were +printing pointer unconditionally so that they only do so if DEBUG is +set at compile time, or a specific debug flag is set. + +CVE: CVE-2024-29508 +Upstream-Status: Backport [https://git.launchpad.net/ubuntu/+source/ghostscript/commit/?h=ubuntu/focal-security&id=22b23aa6de7613a4d9c1da9c84d72427c9d0cf1a] +Upstream commit: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=ff1013a0ab485b66783b70145e342a82c670906a +Signed-off-by: Ashish Sharma <[email protected]> + + base/gsfont.c | 4 ++-- + base/gsicc_cache.c | 8 ++++---- + base/gsmalloc.c | 4 ++-- + base/gxclmem.c | 5 ++--- + base/gxcpath.c | 6 +++++- + base/gxpath.c | 8 +++++++- + base/szlibc.c | 4 +++- + devices/gdevupd.c | 7 ++++++- + devices/vector/gdevpdtb.c | 4 ++-- + psi/ialloc.c | 4 ++-- + psi/igc.c | 6 +++--- + psi/igcstr.c | 6 +++--- + psi/iinit.c | 6 +++++- + psi/imainarg.c | 5 +++-- + psi/isave.c | 4 ++-- + psi/iutil.c | 6 +++++- + 16 files changed, 56 insertions(+), 31 deletions(-) + +--- a/base/gsfont.c ++++ b/base/gsfont.c +@@ -778,7 +778,7 @@ gs_purge_font(gs_font * pfont) + else if (pdir->scaled_fonts == pfont) + pdir->scaled_fonts = next; + else { /* Shouldn't happen! */ +- lprintf1("purged font "PRI_INTPTR" not found\n", (intptr_t)pfont); ++ if_debug1m('u', pfont->memory, "purged font "PRI_INTPTR" not found\n", (intptr_t)pfont); + } + + /* Purge the font from the scaled font cache. */ +--- a/base/gsicc_cache.c ++++ b/base/gsicc_cache.c +@@ -149,7 +149,7 @@ icc_linkcache_finalize(const gs_memory_t + + while (link_cache->head != NULL) { + if (link_cache->head->ref_count != 0) { +- emprintf2(mem, "link at "PRI_INTPTR" being removed, but has ref_count = %d\n", ++ if_debug2m(gs_debug_flag_icc, mem, "link at "PRI_INTPTR" being removed, but has ref_count = %d\n", + (intptr_t)link_cache->head, link_cache->head->ref_count); + link_cache->head->ref_count = 0; /* force removal */ + } +@@ -560,7 +560,7 @@ gsicc_findcachelink(gsicc_hashlink_t has + /* that was building it failed to be able to complete building it */ + /* this is probably a fatal error. MV ??? */ + if (curr->valid == false) { +- emprintf1(curr->memory, "link "PRI_INTPTR" lock released, but still not valid.\n", (intptr_t)curr); /* Breakpoint here */ ++ if_debug1m(gs_debug_flag_icc, curr->memory, "link "PRI_INTPTR" lock released, but still not valid.\n", (intptr_t)curr); /* Breakpoint here */ + } + gx_monitor_enter(icc_link_cache->lock); /* re-enter to loop and check */ + } +@@ -587,7 +587,7 @@ gsicc_remove_link(gsicc_link_t *link, co + /* NOTE: link->ref_count must be 0: assert ? */ + gx_monitor_enter(icc_link_cache->lock); + if (link->ref_count != 0) { +- emprintf2(memory, "link at "PRI_INTPTR" being removed, but has ref_count = %d\n", (intptr_t)link, link->ref_count); ++ if_debug2m(gs_debug_flag_icc, memory, "link at "PRI_INTPTR" being removed, but has ref_count = %d\n", (intptr_t)link, link->ref_count); + } + curr = icc_link_cache->head; + prev = NULL; +--- a/base/gsmalloc.c ++++ b/base/gsmalloc.c +@@ -419,7 +419,7 @@ gs_heap_resize_string(gs_memory_t * mem, + client_name_t cname) + { + if (gs_heap_object_type(mem, data) != &st_bytes) +- lprintf2("%s: resizing non-string "PRI_INTPTR"!\n", ++ if_debug2m('a', mem, "%s: resizing non-string "PRI_INTPTR"!\n", + client_name_string(cname), (intptr_t)data); + return gs_heap_resize_object(mem, data, new_num, cname); + } +--- a/base/gxclmem.c ++++ b/base/gxclmem.c +@@ -490,8 +490,7 @@ memfile_fclose(clist_file_ptr cf, const + /* leaks if other users of the memfile don't 'fclose with delete=true */ + if (f->openlist != NULL || ((f->base_memfile != NULL) && f->base_memfile->is_open)) { + /* TODO: do the cleanup rather than just giving an error */ +- emprintf1(f->memory, +- "Attempt to delete a memfile still open for read: "PRI_INTPTR"\n", ++ if_debug1(':', "Attempt to delete a memfile still open for read: "PRI_INTPTR"\n", + (intptr_t)f); + return_error(gs_error_invalidfileaccess); + } else { +--- a/base/gxcpath.c ++++ b/base/gxcpath.c +@@ -172,8 +172,10 @@ gx_cpath_init_contained_shared(gx_clip_p + { + if (shared) { + if (shared->path.segments == &shared->path.local_segments) { ++#ifdef DEBUG + lprintf1("Attempt to share (local) segments of clip path "PRI_INTPTR"!\n", + (intptr_t)shared); ++#endif + return_error(gs_error_Fatal); + } + *pcpath = *shared; +@@ -230,8 +232,10 @@ gx_cpath_init_local_shared_nested(gx_cli + if (shared) { + if ((shared->path.segments == &shared->path.local_segments) && + !safely_nested) { ++#ifdef DEBUG + lprintf1("Attempt to share (local) segments of clip path "PRI_INTPTR"!\n", + (intptr_t)shared); ++#endif + return_error(gs_error_Fatal); + } + pcpath->path = shared->path; +--- a/base/gxpath.c ++++ b/base/gxpath.c +@@ -137,8 +137,10 @@ gx_path_init_contained_shared(gx_path * + { + if (shared) { + if (shared->segments == &shared->local_segments) { ++#ifdef DEBUG + lprintf1("Attempt to share (local) segments of path "PRI_INTPTR"!\n", + (intptr_t)shared); ++#endif + return_error(gs_error_Fatal); + } + *ppath = *shared; +@@ -172,8 +174,10 @@ gx_path_alloc_shared(const gx_path * sha + ppath->procs = &default_path_procs; + if (shared) { + if (shared->segments == &shared->local_segments) { ++#ifdef DEBUG + lprintf1("Attempt to share (local) segments of path "PRI_INTPTR"!\n", + (intptr_t)shared); ++#endif + gs_free_object(mem, ppath, cname); + return 0; + } +@@ -203,8 +207,10 @@ gx_path_init_local_shared(gx_path * ppat + { + if (shared) { + if (shared->segments == &shared->local_segments) { ++#ifdef DEBUG + lprintf1("Attempt to share (local) segments of path "PRI_INTPTR"!\n", + (intptr_t)shared); ++#endif + return_error(gs_error_Fatal); + } + *ppath = *shared; +--- a/base/szlibc.c ++++ b/base/szlibc.c +@@ -110,7 +110,9 @@ s_zlib_free(void *zmem, void *data) + gs_free_object(mem, data, "s_zlib_free(data)"); + for (; ; block = block->next) { + if (block == 0) { ++#ifdef DEBUG + lprintf1("Freeing unrecorded data "PRI_INTPTR"!\n", (intptr_t)data); ++#endif + return; + } + if (block->data == data) +--- a/devices/gdevupd.c ++++ b/devices/gdevupd.c +@@ -1039,8 +1039,13 @@ upd_print_page(gx_device_printer *pdev, + */ + if(!upd || B_OK4GO != (upd->flags & (B_OK4GO | B_ERROR))) { + #if UPD_MESSAGES & (UPD_M_ERROR | UPD_M_TOPCALLS) ++#ifdef DEBUG + errprintf(pdev->memory, "CALL-REJECTED upd_print_page(" PRI_INTPTR "," PRI_INTPTR ")\n", + (intptr_t)udev,(intptr_t) out); ++#else ++ errprintf(pdev->memory, "CALL-REJECTED upd_print_page\n", ++ (intptr_t)udev,(intptr_t) out); ++#endif + #endif + return_error(gs_error_undefined); + } +--- a/devices/vector/gdevpdtb.c ++++ b/devices/vector/gdevpdtb.c +@@ -371,7 +371,7 @@ pdf_base_font_alloc(gx_device_pdf *pdev, + font_name.size -= SUBSET_PREFIX_SIZE; + } + } else { +- gs_sprintf(fnbuf, ".F" PRI_INTPTR, (intptr_t)copied); ++ gs_snprintf(fnbuf, sizeof(fnbuf), "Anonymous"); + font_name.data = (byte *)fnbuf; + font_name.size = strlen(fnbuf); + } +--- a/psi/ialloc.c ++++ b/psi/ialloc.c +@@ -386,7 +386,7 @@ gs_free_ref_array(gs_ref_memory_t * mem, + size = num_refs * sizeof(ref); + break; + default: +- lprintf3("Unknown type 0x%x in free_ref_array(%u,"PRI_INTPTR")!", ++ if_debug3('A', "Unknown type 0x%x in free_ref_array(%u,"PRI_INTPTR")!", + r_type(parr), num_refs, (intptr_t)obj); + return; + } +--- a/psi/igc.c ++++ b/psi/igc.c +@@ -1061,7 +1061,7 @@ gc_extend_stack(gc_mark_stack * pms, gc_ + + if (cp == 0) { /* We were tracing outside collectible */ + /* storage. This can't happen. */ +- lprintf1("mark stack overflowed while outside collectible space at "PRI_INTPTR"!\n", ++ if_debug1('6', "mark stack overflowed while outside collectible space at "PRI_INTPTR"!\n", + (intptr_t)cptr); + gs_abort(pstate->heap); + } +@@ -1290,7 +1290,7 @@ igc_reloc_struct_ptr(const void /*obj_he + + if (cp != 0 && cp->cbase <= (byte *)obj && (byte *)obj <cp->ctop) { + if (back > (cp->ctop - cp->cbase) >> obj_back_shift) { +- lprintf2("Invalid back pointer %u at "PRI_INTPTR"!\n", ++ if_debug2('6', "Invalid back pointer %u at "PRI_INTPTR"!\n", + back, (intptr_t)obj); + gs_abort(NULL); + } +--- a/psi/igcstr.c ++++ b/psi/igcstr.c +@@ -152,7 +152,7 @@ gc_string_mark(const byte * ptr, uint si + return false; + #ifdef DEBUG + if (ptr - HDR_ID_OFFSET < cp->ctop) { +- lprintf4("String pointer "PRI_INTPTR"[%u] outside ["PRI_INTPTR".."PRI_INTPTR")\n", ++ if_debug4('6', "String pointer "PRI_INTPTR"[%u] outside ["PRI_INTPTR".."PRI_INTPTR")\n", + (intptr_t)ptr - HDR_ID_OFFSET, size, (intptr_t)cp->ctop, (intptr_t)cp->climit); + return false; + } else if (ptr + size > cp->climit) { /* +@@ -171,7 +171,7 @@ gc_string_mark(const byte * ptr, uint si + while (ptr - HDR_ID_OFFSET == scp->climit && scp->outer != 0) + scp = scp->outer; + if (ptr - HDR_ID_OFFSET + size > scp->climit) { +- lprintf4("String pointer "PRI_INTPTR"[%u] outside ["PRI_INTPTR".."PRI_INTPTR")\n", ++ if_debug4('6', "String pointer "PRI_INTPTR"[%u] outside ["PRI_INTPTR".."PRI_INTPTR")\n", + (intptr_t)ptr - HDR_ID_OFFSET, size, + (intptr_t)scp->ctop, (intptr_t)scp->climit); + return false; +--- a/psi/iinit.c ++++ b/psi/iinit.c +@@ -395,8 +395,12 @@ zop_init(i_ctx_t *i_ctx_p) + if (def->proc != 0) { + code = def->proc(i_ctx_p); + if (code < 0) { ++#ifdef DEBUG + lprintf2("op_init proc "PRI_INTPTR" returned error %d!\n", + (intptr_t)def->proc, code); ++#else ++ lprintf("op_init proc returned error !\n"); ++#endif + return code; + } + } +--- a/psi/imainarg.c ++++ b/psi/imainarg.c +@@ -229,7 +229,8 @@ gs_main_init_with_args01(gs_main_instanc + if (gs_debug[':'] && !have_dumped_args) { + int i; + +- dmprintf1(minst->heap, "%% Args passed to instance "PRI_INTPTR": ", ++ if (gs_debug_c(gs_debug_flag_init_details)) ++ dmprintf1(minst->heap, "%% Args passed to instance "PRI_INTPTR": ", + (intptr_t)minst); + for (i=1; i<argc; i++) + dmprintf1(minst->heap, "%s ", argv[i]); +--- a/psi/isave.c ++++ b/psi/isave.c +@@ -487,7 +487,7 @@ alloc_save_change_in(gs_ref_memory_t *me + else if (r_is_struct(pcont)) + cp->offset = (byte *) where - (byte *) pcont->value.pstruct; + else { +- lprintf3("Bad type %u for save! pcont = "PRI_INTPTR", where = "PRI_INTPTR"\n", ++ if_debug3('u', "Bad type %u for save! pcont = "PRI_INTPTR", where = "PRI_INTPTR"\n", + r_type(pcont), (intptr_t) pcont, (intptr_t) where); + gs_abort((const gs_memory_t *)mem); + } +--- a/psi/iutil.c ++++ b/psi/iutil.c +@@ -537,7 +537,11 @@ other: + break; + } + /* Internal operator, no name. */ +- gs_sprintf(buf, "@"PRI_INTPTR, (intptr_t) op->value.opproc); ++#ifdef DEBUG ++ gs_snprintf(buf, sizeof(buf), "@"PRI_INTPTR, (intptr_t) op->value.opproc); ++#else ++ gs_snprintf(buf, sizeof(buf), "@anonymous_operator", (intptr_t) op->value.opproc); ++#endif + break; + } + case t_real:
meta/recipes-extended/ghostscript/ghostscript/CVE-2024-29508-2.patch new file +29 -0
@@ -0,0 +1,29 @@ +From d084021e06ba1caa1373fbbcf24a8510f43830ab Mon Sep 17 00:00:00 2001 +From: Ken Sharp <[email protected]> +Date: Sat, 27 Jan 2024 09:30:30 +0000 +Subject: [PATCH] Coverity IDs 414141 & 414145 + +These are the same problem reported two different ways. I forgot to +remove the arguments to errprintf when I removed the format specifiers +from the string as part of reviewing the pointer printing. + +CVE: CVE-2024-29508 +Upstream-Status: Backport [https://git.launchpad.net/ubuntu/+source/ghostscript/commit/?h=ubuntu/focal-security&id=22b23aa6de7613a4d9c1da9c84d72427c9d0cf1a] +Upstream commit: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=ff1013a0ab485b66783b70145e342a82c670906a +Signed-off-by: Ashish Sharma <[email protected]> + + devices/gdevupd.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/devices/gdevupd.c ++++ b/devices/gdevupd.c +@@ -1043,8 +1043,7 @@ upd_print_page(gx_device_printer *pdev, + errprintf(pdev->memory, "CALL-REJECTED upd_print_page(" PRI_INTPTR "," PRI_INTPTR ")\n", + (intptr_t)udev,(intptr_t) out); + #else +- errprintf(pdev->memory, "CALL-REJECTED upd_print_page\n", +- (intptr_t)udev,(intptr_t) out); ++ errprintf(pdev->memory, "CALL-REJECTED upd_print_page\n"); + #endif + #endif + return_error(gs_error_undefined);
meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb +2 -0
@@ -54,6 +54,8 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d file://CVE-2024-29511-0002.patch \ file://CVE-2024-29509.patch \ file://CVE-2024-29506.patch \ + file://CVE-2024-29508-1.patch \ + file://CVE-2024-29508-2.patch \ " SRC_URI = "${SRC_URI_BASE} \
Signature · 1 line
2.34.1
PATCH 2/19 openssl: patch CVE-2024-9143
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
Pick patch from branch openssl-3.0.
--- .../openssl/openssl/CVE-2024-9143.patch | 202 ++++++++++++++++++ .../openssl/openssl_3.0.15.bb | 1 + 2 files changed, 203 insertions(+) create mode 100755 meta/recipes-connectivity/openssl/openssl/CVE-2024-9143.patch
meta/recipes-connectivity/openssl/openssl/CVE-2024-9143.patch new file +202 -0
@@ -0,0 +1,202 @@ +From 72ae83ad214d2eef262461365a1975707f862712 Mon Sep 17 00:00:00 2001 +From: Viktor Dukhovni <[email protected]> +Date: Thu, 19 Sep 2024 01:02:40 +1000 +Subject: [PATCH] Harden BN_GF2m_poly2arr against misuse. + +The BN_GF2m_poly2arr() function converts characteristic-2 field +(GF_{2^m}) Galois polynomials from a representation as a BIGNUM bitmask, +to a compact array with just the exponents of the non-zero terms. + +These polynomials are then used in BN_GF2m_mod_arr() to perform modular +reduction. A precondition of calling BN_GF2m_mod_arr() is that the +polynomial must have a non-zero constant term (i.e. the array has `0` as +its final element). + +Internally, callers of BN_GF2m_poly2arr() did not verify that +precondition, and binary EC curve parameters with an invalid polynomial +could lead to out of bounds memory reads and writes in BN_GF2m_mod_arr(). + +The precondition is always true for polynomials that arise from the +standard form of EC parameters for characteristic-two fields (X9.62). +See the "Finite Field Identification" section of: + + https://www.itu.int/ITU-T/formal-language/itu-t/x/x894/2018-cor1/ANSI-X9-62.html + +The OpenSSL GF(2^m) code supports only the trinomial and pentanomial +basis X9.62 forms. + +This commit updates BN_GF2m_poly2arr() to return `0` (failure) when +the constant term is zero (i.e. the input bitmask BIGNUM is not odd). + +Additionally, the return value is made unambiguous when there is not +enough space to also pad the array with a final `-1` sentinel value. +The return value is now always the number of elements (including the +final `-1`) that would be filled when the output array is sufficiently +large. Previously the same count was returned both when the array has +just enough room for the final `-1` and when it had only enough space +for non-sentinel values. + +Finally, BN_GF2m_poly2arr() is updated to reject polynomials whose +degree exceeds `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against +CPU exhausition attacks via excessively large inputs. + +The above issues do not arise in processing X.509 certificates. These +generally have EC keys from "named curves", and RFC5840 (Section 2.1.1) +disallows explicit EC parameters. The TLS code in OpenSSL enforces this +constraint only after the certificate is decoded, but, even if explicit +parameters are specified, they are in X9.62 form, which cannot represent +problem values as noted above. + +Initially reported as oss-fuzz issue 71623. + +A closely related issue was earlier reported in +<https://github.com/openssl/openssl/issues/19826>. + +Severity: Low, CVE-2024-9143 + +Reviewed-by: Matt Caswell <[email protected]> +Reviewed-by: Bernd Edlinger <[email protected]> +Reviewed-by: Paul Dale <[email protected]> +Reviewed-by: Tomas Mraz <[email protected]> +(Merged from https://github.com/openssl/openssl/pull/25639) + +(cherry picked from commit 8e008cb8b23ec7dc75c45a66eeed09c815b11cd2) + +CVE: CVE-2024-9143 +Upstream-Status: Backport [https://github.com/openssl/openssl/commit/72ae83ad214d2eef262461365a1975707f862712] +Signed-off-by: Peter Marko <[email protected]> +--- + crypto/bn/bn_gf2m.c | 28 +++++++++++++++------- + test/ec_internal_test.c | 51 +++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 71 insertions(+), 8 deletions(-) + +diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c +index c811ae82d6b15..bcc66613cc14d 100644 +--- a/crypto/bn/bn_gf2m.c ++++ b/crypto/bn/bn_gf2m.c +@@ -15,6 +15,7 @@ + #include "bn_local.h" + + #ifndef OPENSSL_NO_EC2M ++# include <openssl/ec.h> + + /* + * Maximum number of iterations before BN_GF2m_mod_solve_quad_arr should +@@ -1140,16 +1141,26 @@ int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + /* + * Convert the bit-string representation of a polynomial ( \sum_{i=0}^n a_i * + * x^i) into an array of integers corresponding to the bits with non-zero +- * coefficient. Array is terminated with -1. Up to max elements of the array +- * will be filled. Return value is total number of array elements that would +- * be filled if array was large enough. ++ * coefficient. The array is intended to be suitable for use with ++ * `BN_GF2m_mod_arr()`, and so the constant term of the polynomial must not be ++ * zero. This translates to a requirement that the input BIGNUM `a` is odd. ++ * ++ * Given sufficient room, the array is terminated with -1. Up to max elements ++ * of the array will be filled. ++ * ++ * The return value is total number of array elements that would be filled if ++ * array was large enough, including the terminating `-1`. It is `0` when `a` ++ * is not odd or the constant term is zero contrary to requirement. ++ * ++ * The return value is also `0` when the leading exponent exceeds ++ * `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against CPU exhaustion attacks, + */ + int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + { + int i, j, k = 0; + BN_ULONG mask; + +- if (BN_is_zero(a)) ++ if (!BN_is_odd(a)) + return 0; + + for (i = a->top - 1; i >= 0; i--) { +@@ -1167,12 +1178,13 @@ int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + } + } + +- if (k < max) { ++ if (k > 0 && p[0] > OPENSSL_ECC_MAX_FIELD_BITS) ++ return 0; ++ ++ if (k < max) + p[k] = -1; +- k++; +- } + +- return k; ++ return k + 1; + } + + /* +diff --git a/test/ec_internal_test.c b/test/ec_internal_test.c +index 8c2cd05631696..02cfd4e9d8858 100644 +--- a/test/ec_internal_test.c ++++ b/test/ec_internal_test.c +@@ -155,6 +155,56 @@ static int field_tests_ecp_mont(void) + } + + #ifndef OPENSSL_NO_EC2M ++/* Test that decoding of invalid GF2m field parameters fails. */ ++static int ec2m_field_sanity(void) ++{ ++ int ret = 0; ++ BN_CTX *ctx = BN_CTX_new(); ++ BIGNUM *p, *a, *b; ++ EC_GROUP *group1 = NULL, *group2 = NULL, *group3 = NULL; ++ ++ TEST_info("Testing GF2m hardening\n"); ++ ++ BN_CTX_start(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ if (!TEST_ptr(b = BN_CTX_get(ctx)) ++ || !TEST_true(BN_one(a)) ++ || !TEST_true(BN_one(b))) ++ goto out; ++ ++ /* Even pentanomial value should be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf2))) ++ goto out; ++ if (!TEST_ptr_null(group1 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Zero constant term accepted in GF2m polynomial"); ++ ++ /* Odd hexanomial should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf3))) ++ goto out; ++ if (!TEST_ptr_null(group2 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Hexanomial accepted as GF2m polynomial"); ++ ++ /* Excessive polynomial degree should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0x71)) ++ || !TEST_true(BN_set_bit(p, OPENSSL_ECC_MAX_FIELD_BITS + 1))) ++ goto out; ++ if (!TEST_ptr_null(group3 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("GF2m polynomial degree > %d accepted", ++ OPENSSL_ECC_MAX_FIELD_BITS); ++ ++ ret = group1 == NULL && group2 == NULL && group3 == NULL; ++ ++ out: ++ EC_GROUP_free(group1); ++ EC_GROUP_free(group2); ++ EC_GROUP_free(group3); ++ BN_CTX_end(ctx); ++ BN_CTX_free(ctx); ++ ++ return ret; ++} ++ + /* test EC_GF2m_simple_method directly */ + static int field_tests_ec2_simple(void) + { +@@ -443,6 +493,7 @@ int setup_tests(void) + ADD_TEST(field_tests_ecp_simple); + ADD_TEST(field_tests_ecp_mont); + #ifndef OPENSSL_NO_EC2M ++ ADD_TEST(ec2m_field_sanity); + ADD_TEST(field_tests_ec2_simple); + #endif + ADD_ALL_TESTS(field_tests_default, crv_len);
meta/recipes-connectivity/openssl/openssl_3.0.15.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "https://github.com/openssl/openssl/releases/download/openssl-${PV}/op file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ + file://CVE-2024-9143.patch \ " SRC_URI:append:class-nativesdk = " \
Signature · 1 line
2.34.1
PATCH 3/19 qemu: fix CVE-2023-3019
In reply to Steve SakomanFrom: Yogita Urade <[email protected]>
A DMA reentrancy issue leading to a use-after-free error was found in the e1000e NIC emulation code in QEMU. This issue could allow a privileged guest user to crash the QEMU process on the host, resulting in a denial of service.
CVE-2023-3019-0002 is the CVE fix and CVE-2023-3019-0001 is dependent CVE fix.
fix indent issue in qemu.inc file.
CVE-2023-3019 patch required Mem ReenttranceyGuard structure definition, it's defined in commit:
https://github.com/qemu/qemu/commit/a2e1753b8054344f32cf94f31c6399a58794a380
but the patch is causing errors:
Failed: qemux86 does not shutdown within timeout(120) so backported only required structure definition.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2023-3019
Upstream patches:
https://github.com/qemu/qemu/commit/7d0fefdf81f5973334c344f6b8e1896c309dff66
https://github.com/qemu/qemu/commit/3c0463a650008aec7de29cf84540652730510921
--- meta/recipes-devtools/qemu/qemu.inc | 18 +- .../qemu/qemu/CVE-2023-3019-0001.patch | 622 ++++++++++++++++++ .../qemu/qemu/CVE-2023-3019-0002.patch | 91 +++ 3 files changed, 723 insertions(+), 8 deletions(-) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2023-3019-0001.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2023-3019-0002.patch
meta/recipes-devtools/qemu/qemu.inc +10 -8
@@ -97,14 +97,14 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2023-3301.patch \ file://CVE-2023-3255.patch \ file://CVE-2023-2861.patch \ - file://CVE-2020-14394.patch \ - file://CVE-2023-3354.patch \ - file://CVE-2023-3180.patch \ - file://CVE-2021-3638.patch \ - file://CVE-2023-1544.patch \ - file://CVE-2023-5088.patch \ - file://CVE-2024-24474.patch \ - file://CVE-2023-6693.patch \ + file://CVE-2020-14394.patch \ + file://CVE-2023-3354.patch \ + file://CVE-2023-3180.patch \ + file://CVE-2021-3638.patch \ + file://CVE-2023-1544.patch \ + file://CVE-2023-5088.patch \ + file://CVE-2024-24474.patch \ + file://CVE-2023-6693.patch \ file://scsi-disk-allow-MODE-SELECT-block-desriptor-to-set-the-block-size.patch \ file://scsi-disk-ensure-block-size-is-non-zero-and-changes-limited-to-bits-8-15.patch \ file://CVE-2023-42467.patch \
@@ -118,6 +118,8 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2024-4467-0003.patch \ file://CVE-2024-4467-0004.patch \ file://CVE-2024-4467-0005.patch \ + file://CVE-2023-3019-0001.patch \ + file://CVE-2023-3019-0002.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2023-3019-0001.patch new file +622 -0
622 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2023-3019-0002.patch new file +91 -0
91 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 4/19 python3: ignore fixed CVEs
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
These CVEs were fixed in 3.10.15
Commit 487e8cdf1df6feba6d88fa29e11791f4ebaaa362 removed patches in favor of version upgrade, which caused the CVEs to re-appear in reports.
--- meta/recipes-devtools/python/python3_3.10.15.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/python/python3_3.10.15.bb +2 -0
@@ -63,6 +63,8 @@ CVE_CHECK_IGNORE += "CVE-2020-15523 CVE-2022-26488" CVE_CHECK_IGNORE += "CVE-2015-20107" # Not an issue, in fact expected behaviour CVE_CHECK_IGNORE += "CVE-2023-36632" +# Fixes are included in 3.10.15 +CVE_CHECK_IGNORE += "CVE-2023-27043 CVE-2024-6232 CVE-2024-7592" PYTHON_MAJMIN = "3.10"
Signature · 1 line
2.34.1
PATCH 5/19 cve-check: add CVSS vector string to CVE database and reports
In reply to Steve SakomanFrom: Antoine Lubineau <[email protected]>
This allows building detailed vulnerability analysis tools without relying on external resources.
(From OE-Core rev: 048ff0ad927f4d37cc5547ebeba9e0c221687ea6)
--- meta/classes/cve-check.bbclass | 5 ++++- meta/recipes-core/meta/cve-update-nvd2-native.bb | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-)
meta/classes/cve-check.bbclass +4 -1
@@ -26,7 +26,7 @@ CVE_PRODUCT ??= "${BPN}" CVE_VERSION ??= "${PV}" CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK" -CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2.db" +CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2-1.db" CVE_CHECK_DB_FILE_LOCK ?= "${CVE_CHECK_DB_FILE}.lock" CVE_CHECK_LOG ?= "${T}/cve.log"
@@ -399,6 +399,7 @@ def get_cve_info(d, cves): cve_data[row[0]]["scorev3"] = row[3] cve_data[row[0]]["modified"] = row[4] cve_data[row[0]]["vector"] = row[5] + cve_data[row[0]]["vectorString"] = row[6] cursor.close() conn.close() return cve_data
@@ -455,6 +456,7 @@ def cve_write_data_text(d, patched, unpatched, ignored, cve_data): write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["scorev2"] write_string += "CVSS v3 BASE SCORE: %s\n" % cve_data[cve]["scorev3"] write_string += "VECTOR: %s\n" % cve_data[cve]["vector"] + write_string += "VECTORSTRING: %s\n" % cve_data[cve]["vectorString"] write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve) if unpatched_cves and d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1":
@@ -569,6 +571,7 @@ def cve_write_data_json(d, patched, unpatched, ignored, cve_data, cve_status): "scorev2" : cve_data[cve]["scorev2"], "scorev3" : cve_data[cve]["scorev3"], "vector" : cve_data[cve]["vector"], + "vectorString" : cve_data[cve]["vectorString"], "status" : status, "link": issue_link }
meta/recipes-core/meta/cve-update-nvd2-native.bb +8 -3
@@ -247,7 +247,7 @@ def initialize_db(conn): c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)") c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \ - SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)") + SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT, VECTORSTRING TEXT)") c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \ VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \
@@ -321,6 +321,7 @@ def update_db(conn, elt): """ accessVector = None + vectorString = None cveId = elt['cve']['id'] if elt['cve']['vulnStatus'] == "Rejected": c = conn.cursor()
@@ -335,25 +336,29 @@ def update_db(conn, elt): date = elt['cve']['lastModified'] try: accessVector = elt['cve']['metrics']['cvssMetricV2'][0]['cvssData']['accessVector'] + vectorString = elt['cve']['metrics']['cvssMetricV2'][0]['cvssData']['vectorString'] cvssv2 = elt['cve']['metrics']['cvssMetricV2'][0]['cvssData']['baseScore'] except KeyError: cvssv2 = 0.0 cvssv3 = None try: accessVector = accessVector or elt['cve']['metrics']['cvssMetricV30'][0]['cvssData']['attackVector'] + vectorString = vectorString or elt['cve']['metrics']['cvssMetricV30'][0]['cvssData']['vectorString'] cvssv3 = elt['cve']['metrics']['cvssMetricV30'][0]['cvssData']['baseScore'] except KeyError: pass try: accessVector = accessVector or elt['cve']['metrics']['cvssMetricV31'][0]['cvssData']['attackVector'] + vectorString = vectorString or elt['cve']['metrics']['cvssMetricV31'][0]['cvssData']['vectorString'] cvssv3 = cvssv3 or elt['cve']['metrics']['cvssMetricV31'][0]['cvssData']['baseScore'] except KeyError: pass accessVector = accessVector or "UNKNOWN" + vectorString = vectorString or "UNKNOWN" cvssv3 = cvssv3 or 0.0 - conn.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)", - [cveId, cveDesc, cvssv2, cvssv3, date, accessVector]).close() + conn.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?, ?)", + [cveId, cveDesc, cvssv2, cvssv3, date, accessVector, vectorString]).close() try: # Remove any pre-existing CVE configuration. Even for partial database
Signature · 1 line
2.34.1
PATCH 6/19 cve-check: add support for cvss v4.0
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
https://nvd.nist.gov/general/news/cvss-v4-0-official-support
CVSS v4.0 was released in November 2023
NVD announced support for it in June 2024
Current stats are:
* cvss v4 provided, but also v3, so cve-check showed a value sqlite> select count(*) from nvd where scorev4 != 0.0 and scorev3 != 0.0; 2069
* only cvss v4 provided, so cve-check did not show any sqlite> select count(*) from nvd where scorev4 != 0.0 and scorev3 = 0.0; 260
(From OE-Core rev: 358dbfcd80ae1fa414d294c865dd293670c287f0)
--- meta/classes/cve-check.bbclass | 11 +++++++---- meta/recipes-core/meta/cve-update-nvd2-native.bb | 14 ++++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-)
meta/classes/cve-check.bbclass +7 -4
@@ -26,7 +26,7 @@ CVE_PRODUCT ??= "${BPN}" CVE_VERSION ??= "${PV}" CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK" -CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2-1.db" +CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2-2.db" CVE_CHECK_DB_FILE_LOCK ?= "${CVE_CHECK_DB_FILE}.lock" CVE_CHECK_LOG ?= "${T}/cve.log"
@@ -397,9 +397,10 @@ def get_cve_info(d, cves): cve_data[row[0]]["summary"] = row[1] cve_data[row[0]]["scorev2"] = row[2] cve_data[row[0]]["scorev3"] = row[3] - cve_data[row[0]]["modified"] = row[4] - cve_data[row[0]]["vector"] = row[5] - cve_data[row[0]]["vectorString"] = row[6] + cve_data[row[0]]["scorev4"] = row[4] + cve_data[row[0]]["modified"] = row[5] + cve_data[row[0]]["vector"] = row[6] + cve_data[row[0]]["vectorString"] = row[7] cursor.close() conn.close() return cve_data
@@ -455,6 +456,7 @@ def cve_write_data_text(d, patched, unpatched, ignored, cve_data): write_string += "CVE SUMMARY: %s\n" % cve_data[cve]["summary"] write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["scorev2"] write_string += "CVSS v3 BASE SCORE: %s\n" % cve_data[cve]["scorev3"] + write_string += "CVSS v4 BASE SCORE: %s\n" % cve_data[cve]["scorev4"] write_string += "VECTOR: %s\n" % cve_data[cve]["vector"] write_string += "VECTORSTRING: %s\n" % cve_data[cve]["vectorString"] write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve)
@@ -570,6 +572,7 @@ def cve_write_data_json(d, patched, unpatched, ignored, cve_data, cve_status): "summary" : cve_data[cve]["summary"], "scorev2" : cve_data[cve]["scorev2"], "scorev3" : cve_data[cve]["scorev3"], + "scorev4" : cve_data[cve]["scorev4"], "vector" : cve_data[cve]["vector"], "vectorString" : cve_data[cve]["vectorString"], "status" : status,
meta/recipes-core/meta/cve-update-nvd2-native.bb +10 -4
@@ -247,7 +247,7 @@ def initialize_db(conn): c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)") c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \ - SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT, VECTORSTRING TEXT)") + SCOREV2 TEXT, SCOREV3 TEXT, SCOREV4 TEXT, MODIFIED INTEGER, VECTOR TEXT, VECTORSTRING TEXT)") c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \ VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \
@@ -353,12 +353,18 @@ def update_db(conn, elt): cvssv3 = cvssv3 or elt['cve']['metrics']['cvssMetricV31'][0]['cvssData']['baseScore'] except KeyError: pass + cvssv3 = cvssv3 or 0.0 + try: + accessVector = accessVector or elt['cve']['metrics']['cvssMetricV40'][0]['cvssData']['attackVector'] + vectorString = vectorString or elt['cve']['metrics']['cvssMetricV40'][0]['cvssData']['vectorString'] + cvssv4 = elt['cve']['metrics']['cvssMetricV40'][0]['cvssData']['baseScore'] + except KeyError: + cvssv4 = 0.0 accessVector = accessVector or "UNKNOWN" vectorString = vectorString or "UNKNOWN" - cvssv3 = cvssv3 or 0.0 - conn.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?, ?)", - [cveId, cveDesc, cvssv2, cvssv3, date, accessVector, vectorString]).close() + conn.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?, ?, ?)", + [cveId, cveDesc, cvssv2, cvssv3, cvssv4, date, accessVector, vectorString]).close() try: # Remove any pre-existing CVE configuration. Even for partial database
Signature · 1 line
2.34.1
PATCH 7/19 vim: Upgrade 9.1.0682 -> 9.1.0698
In reply to Steve SakomanFrom: Siddharth Doshi <[email protected]>
This includes CVE-fix for CVE-2024-43790 and CVE-2024-43802
Changes between 9.1.0682 -> 9.1.0698
====================================
https://github.com/vim/vim/compare/v9.1.0682...v9.1.0698
--- meta/recipes-support/vim/vim.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/vim/vim.inc +2 -2
@@ -18,8 +18,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://no-path-adjust.patch \ " -PV .= ".0682" -SRCREV = "cb90ea9cba6f033fe141db0e466fb4117f28402b" +PV .= ".0698" +SRCREV = "d56c451e1c05310562c5282352d7bb287c16323c" # Do not consider .z in x.y.z, as that is updated with every commit UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
Signature · 1 line
2.34.1
PATCH 8/19 vim: Upgrade 9.1.0698 -> 9.1.0764
In reply to Steve SakomanFrom: Rohini Sangam <[email protected]>
This includes CVE-fix for CVE-2024-45306 and CVE-2024-47814
Changes between 9.1.0698 -> 9.1.0764
====================================
https://github.com/vim/vim/compare/v9.1.0698...v9.1.0764
--- meta/recipes-support/vim/vim.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/vim/vim.inc +2 -2
@@ -18,8 +18,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://no-path-adjust.patch \ " -PV .= ".0698" -SRCREV = "d56c451e1c05310562c5282352d7bb287c16323c" +PV .= ".0764" +SRCREV = "51b62387be93c65fa56bbabe1c3c1ea5df187641" # Do not consider .z in x.y.z, as that is updated with every commit UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
Signature · 1 line
2.34.1
PATCH 9/19 orc: upgrade 0.4.39 -> 0.4.40
In reply to Steve SakomanFrom: Wang Mingyu <[email protected]>
Changelog:
===========
- Security: Minor follow-up fixes for CVE-2024-40897
- powerpc: fix div255w which still used the inexact substitution
- x86: work around old GCC versions (pre 9.0) having broken xgetbv implementations
- x86: consider MSYS2/Cygwin as Windows for ABI purposes only
- x86: handle unnatural and misaligned array pointers
- orccodemem: Assorted memory mapping fixes
- Fix include header use from C++
- Some compatibility fixes for Musl
- ppc: Disable VSX and ISA 2.07 for Apple targets
- ppc: Allow detection of ppc64 in Mac OS
- x86: Fix non-C11 typedefs
- meson: Fix detecting XSAVE on older AppleClang
- x86: try fixing AVX detection again by adding check for XSAVE
- Check return values of malloc() and realloc()
---
meta/recipes-devtools/orc/{orc_0.4.39.bb => orc_0.4.40.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/orc/{orc_0.4.39.bb => orc_0.4.40.bb} (92%)meta/recipes-devtools/orc/orc_0.4.40.bb renamed from meta/recipes-devtools/orc/orc_0.4.39.bb +1 -1
@@ -5,7 +5,7 @@ LICENSE = "BSD-2-Clause & BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e" SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz" -SRC_URI[sha256sum] = "33ed2387f49b825fa1b9c3b0072e05f259141b895474ad085ae51143d3040cc0" +SRC_URI[sha256sum] = "3fc2bee78dfb7c41fd9605061fc69138db7df007eae2f669a1f56e8bacef74ab" inherit meson pkgconfig gtk-doc
Signature · 1 line
2.34.1
PATCH 10/19 overlayfs-etc: add option to skip creation of mount dirs
In reply to Steve SakomanFrom: "[email protected]" <[email protected]>
The 'preinit' script can't create mount directories when rootfs is read-only. Add an option to skip this step. The user must make sure that all required directories are already in the rootfs directory layout.
--- meta/classes/overlayfs-etc.bbclass | 5 ++++- meta/files/overlayfs-etc-preinit.sh.in | 16 +++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-)
meta/classes/overlayfs-etc.bbclass +4 -1
@@ -35,6 +35,7 @@ OVERLAYFS_ETC_USE_ORIG_INIT_NAME ??= "1" OVERLAYFS_ETC_MOUNT_OPTIONS ??= "defaults" OVERLAYFS_ETC_INIT_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-etc-preinit.sh.in" OVERLAYFS_ETC_EXPOSE_LOWER ??= "0" +OVERLAYFS_ETC_CREATE_MOUNT_DIRS ??= "1" python create_overlayfs_etc_preinit() { overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT")
@@ -56,6 +57,7 @@ python create_overlayfs_etc_preinit() { initBaseName = oe.path.join(d.getVar("base_sbindir"), "init") origInitNameSuffix = ".orig" exposeLower = oe.types.boolean(d.getVar('OVERLAYFS_ETC_EXPOSE_LOWER')) + createMoundDirs = oe.types.boolean(d.getVar('OVERLAYFS_ETC_CREATE_MOUNT_DIRS')) args = { 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint,
@@ -63,7 +65,8 @@ python create_overlayfs_etc_preinit() { 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType, 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice, 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName, - 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false" + 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false", + 'CREATE_MOUNT_DIRS': "true" if createMoundDirs else "false" } if useOrigInit:
meta/files/overlayfs-etc-preinit.sh.in +9 -7
@@ -3,12 +3,15 @@ echo "PREINIT: Start" PATH=/sbin:/bin:/usr/sbin:/usr/bin -mount -o remount,rw / - -mkdir -p /proc -mkdir -p /sys -mkdir -p /run -mkdir -p /var/run +if {CREATE_MOUNT_DIRS}; then + mount -o remount,rw / + + mkdir -p /proc + mkdir -p /sys + mkdir -p /run + mkdir -p /var/run + mkdir -p {OVERLAYFS_ETC_MOUNT_POINT} +fi mount -t proc proc /proc mount -t sysfs sysfs /sys
@@ -20,7 +23,6 @@ UPPER_DIR=$BASE_OVERLAY_ETC_DIR/upper WORK_DIR=$BASE_OVERLAY_ETC_DIR/work LOWER_DIR=$BASE_OVERLAY_ETC_DIR/lower -mkdir -p {OVERLAYFS_ETC_MOUNT_POINT} if mount -n -t {OVERLAYFS_ETC_FSTYPE} \ -o {OVERLAYFS_ETC_MOUNT_OPTIONS} \ {OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT}
Signature · 1 line
2.34.1
PATCH 11/19 bmap-tools: update HOMEPAGE and SRC_URI
In reply to Steve SakomanThe bmaptool (previously: bmap-tools, bmap-tool, bmaptool) has been moved to be under the Yocto Project umbrella and is now hosted at:
github.com/yoctoproject/bmaptool
--- meta/recipes-support/bmap-tools/bmap-tools_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/bmap-tools/bmap-tools_git.bb +2 -2
@@ -4,12 +4,12 @@ bmap. Bmaptool is a generic tool for creating the block map (bmap) for a file, \ and copying files using the block map. The idea is that large file containing \ unused blocks, like raw system image files, can be copied or flashed a lot \ faster with bmaptool than with traditional tools like "dd" or "cp"." -HOMEPAGE = "https://github.com/01org/bmap-tools" +HOMEPAGE = "https://github.com/yoctoproject/bmaptool" SECTION = "console/utils" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://github.com/intel/${BPN};branch=main;protocol=https" +SRC_URI = "git://github.com/yoctoproject/bmaptool.git;branch=main;protocol=https" SRCREV = "c0673962a8ec1624b5189dc1d24f33fe4f06785a" S = "${WORKDIR}/git"
Signature · 1 line
2.34.1
PATCH 12/19 nativesdk-intercept: Fix bad intercept chgrp/chown logic
In reply to Steve SakomanFrom: Eilís 'pidge' Ní Fhlannagáin <[email protected]>
Running either of these ends up corrupting the os.execv args.
If we run:./scripts/nativesdk-intercept/chown -R foo:foo bar
The loop here ends up missing the conversion of foo:foo to root:root because it sees sys.argv[0] and assumes that it's the user:group argument and that we should convert that. We end up a os.execv(path, args) that have the following args:
['root:root', '-R', 'foo:foo', 'bar']
As os.execv ignores args[0], we can just populate it with sys.argv[0] and then loop through sys.argv[1:]. As both chgrp and chown would have either flags and USER[:GROUP] next, this fixes the issue.
(Backported from OE-Core rev: 2a75f647ec7696d353f4b09099d777ba53f34d36)
--- scripts/nativesdk-intercept/chgrp | 5 ++++- scripts/nativesdk-intercept/chown | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
scripts/nativesdk-intercept/chgrp +4 -1
@@ -14,7 +14,10 @@ real_chgrp = shutil.which('chgrp', path=path) args = list() found = False -for i in sys.argv: + +args.append(real_chgrp) + +for i in sys.argv[1:]: if i.startswith("-"): args.append(i) continue
scripts/nativesdk-intercept/chown +4 -1
@@ -14,7 +14,10 @@ real_chown = shutil.which('chown', path=path) args = list() found = False -for i in sys.argv: + +args.append(real_chown) + +for i in sys.argv[1:]: if i.startswith("-"): args.append(i) continue
Signature · 1 line
2.34.1
PATCH 13/19 zip: Make configure checks to be more robust
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
Newer compilers are strict and have turned some warnings into hard errors which results in subtle configure check failures. Therefore fix these tests and also enable largefile support via cflags when its desired
--- ...y-correct-function-signatures-and-de.patch | 134 ++++++++++++++++++ ...2-unix.c-Do-not-redefine-DIR-as-FILE.patch | 35 +++++ meta/recipes-extended/zip/zip_3.0.bb | 2 + 3 files changed, 171 insertions(+) create mode 100644 meta/recipes-extended/zip/zip-3.0/0001-configure-Specify-correct-function-signatures-and-de.patch create mode 100644 meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch
meta/recipes-extended/zip/zip-3.0/0001-configure-Specify-correct-function-signatures-and-de.patch new file +134 -0
@@ -0,0 +1,134 @@ +From 8810f2643c9372a8083272dc1fc157427646d961 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 10 Aug 2022 17:16:23 -0700 +Subject: [PATCH 1/2] configure: Specify correct function signatures and + declarations + +Include needed system headers in configure tests, this is needed because +newer compilers are getting stricter about the C99 specs and turning +-Wimplicit-function-declaration into hard error e.g. clang-15+ + +Upstream-Status: Inactive-Upstream +Signed-off-by: Khem Raj <[email protected]> +--- + unix/configure | 79 +++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 66 insertions(+), 13 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 1d9a9bb..f2b3d02 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -513,21 +513,70 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + # Check for missing functions + # add NO_'function_name' to flags if missing + +-for func in rmdir strchr strrchr rename mktemp mktime mkstemp +-do +- echo Check for $func +- echo "int main(){ $func(); return 0; }" > conftest.c +- $CC $CFLAGS $LDFLAGS $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null +- [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`" +-done ++echo Check for rmdir ++cat > conftest.c << _EOF_ ++#include <unistd.h> ++int main(){ rmdir(NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_RMDIR" ++ ++echo Check for strchr ++cat > conftest.c << _EOF_ ++#include <string.h> ++int main(){ strchr(NULL,0); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_STRCHR" + ++echo Check for strrchr ++cat > conftest.c << _EOF_ ++#include <string.h> ++int main(){ strrchr(NULL,0); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_STRRCHR" ++ ++echo Check for rename ++cat > conftest.c << _EOF_ ++#include <stdio.h> ++int main(){ rename(NULL,NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_RENAME" ++ ++echo Check for mktemp ++cat > conftest.c << _EOF_ ++#include <stdlib.h> ++int main(){ mktemp(NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_MKTEMP" ++ ++echo Check for mktime ++cat > conftest.c << _EOF_ ++#include <time.h> ++int main(){ mktime(NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_MKTIME" ++ ++echo Check for mkstemp ++cat > conftest.c << _EOF_ ++#include <stdlib.h> ++int main(){ return mkstemp(NULL); } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_MKSTEMP" + + echo Check for memset +-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c ++cat > conftest.c << _EOF_ ++#include <string.h> ++int main(){ char k; memset(&k,0,0); return 0; } ++_EOF_ + $CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM" + +- + echo Check for memmove + cat > conftest.c << _EOF_ + #include <string.h> +@@ -548,7 +597,7 @@ $CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null + echo Check for errno declaration + cat > conftest.c << _EOF_ + #include <errno.h> +-main() ++int main() + { + errno = 0; + return 0; +@@ -625,14 +674,18 @@ CFLAGS="${CFLAGS} ${OPT}" + + echo Check for valloc + cat > conftest.c << _EOF_ +-main() ++#include <stdlib.h> ++int main() + { + #ifdef MMAP +- valloc(); ++ valloc(0); + #endif ++ return 0; + } + _EOF_ +-$CC ${CFLAGS} -c conftest.c > /dev/null 2>/dev/null ++#$CC ${CFLAGS} -c conftest.c > /dev/null 2>/dev/null ++$CC ${CFLAGS} -c conftest.c ++echo "===========================================" + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_VALLOC" + + +-- +2.37.1 +
meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 76f5bf3546d826dcbc03acbefcf0b10b972bf136 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 10 Aug 2022 17:19:38 -0700 +Subject: [PATCH 2/2] unix.c: Do not redefine DIR as FILE + +DIR is already provided on Linux via +/usr/include/dirent.h system header + +Upstream-Status: Inactive-Upstream +Signed-off-by: Khem Raj <[email protected]> +--- + unix/unix.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/unix/unix.c b/unix/unix.c +index ba87614..6e6f4d2 100644 +--- a/unix/unix.c ++++ b/unix/unix.c +@@ -61,13 +61,11 @@ local time_t label_utim = 0; + /* Local functions */ + local char *readd OF((DIR *)); + +- + #ifdef NO_DIR /* for AT&T 3B1 */ + #include <sys/dir.h> + #ifndef dirent + # define dirent direct + #endif +-typedef FILE DIR; + /* + ** Apparently originally by Rich Salz. + ** Cleaned up and modified by James W. Birdsall. +-- +2.37.1 +
meta/recipes-extended/zip/zip_3.0.bb +2 -0
@@ -17,6 +17,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar. file://0001-configure-use-correct-CPP.patch \ file://0002-configure-support-PIC-code-build.patch \ file://0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch \ + file://0001-configure-Specify-correct-function-signatures-and-de.patch \ + file://0002-unix.c-Do-not-redefine-DIR-as-FILE.patch \ file://0001-unix-configure-use-_Static_assert-to-do-correct-dete.patch \ " UPSTREAM_VERSION_UNKNOWN = "1"
Signature · 1 line
2.34.1
PATCH 14/19 zip: Fix build with gcc-14
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
zip's configure fails to link this piece of test code:
int main() { return closedir(opendir(".")); }
with GCC-14 because it now treats implicit declaration of function as error, unline older GCC version where it was just a warning and this test would build fine.
Remove 0002-unix.c-Do-not-redefine-DIR-as-FILE.patch which is now unnecessary (MJ: this part wasn't applicable for kirkstone).
--- ...e-dirent.h-for-closedir-opendir-APIs.patch | 45 +++++++++++++++++++ ...2-unix.c-Do-not-redefine-DIR-as-FILE.patch | 35 --------------- meta/recipes-extended/zip/zip_3.0.bb | 2 +- 3 files changed, 46 insertions(+), 36 deletions(-) create mode 100644 meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch delete mode 100644 meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch
meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 9db2f8cdbbc0dfb359d3b4e5dfe48c18652ce531 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 8 May 2024 19:02:46 -0700 +Subject: [PATCH] configure: Include dirent.h for closedir/opendir APIs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC-14 is strict about function prototypes and since the +testcase tries to compile/link opendir/closedir functions +without including signatures, it fails to build the test +due to missing signatures which come from dirent.h + +Therefore include the needed system header and make it more +robust. + +Fixes +a.c:2:21: error: implicit declaration of function ‘closedir’ [-Wimplicit-function-declaration] + 2 | int main() { return closedir(opendir(".")); } + | ^~~~~~~~ +a.c:2:30: error: implicit declaration of function ‘opendir’ [-Wimplicit-function-declaration] + 2 | int main() { return closedir(opendir(".")); } + | ^~~~~~~ + +Upstream-Status: Inactive-Upstream +Signed-off-by: Khem Raj <[email protected]> +--- + unix/configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/unix/configure b/unix/configure +index f917086..1dd98c6 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -591,6 +591,7 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + + echo Check for directory libraries + cat > conftest.c << _EOF_ ++#include <dirent.h> + int main() { return closedir(opendir(".")); } + _EOF_ + +-- +2.45.0 +
meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From 76f5bf3546d826dcbc03acbefcf0b10b972bf136 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Wed, 10 Aug 2022 17:19:38 -0700 -Subject: [PATCH 2/2] unix.c: Do not redefine DIR as FILE - -DIR is already provided on Linux via -/usr/include/dirent.h system header - -Upstream-Status: Inactive-Upstream -Signed-off-by: Khem Raj <[email protected]> ---- - unix/unix.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/unix/unix.c b/unix/unix.c -index ba87614..6e6f4d2 100644 ---- a/unix/unix.c -+++ b/unix/unix.c -@@ -61,13 +61,11 @@ local time_t label_utim = 0; - /* Local functions */ - local char *readd OF((DIR *)); - -- - #ifdef NO_DIR /* for AT&T 3B1 */ - #include <sys/dir.h> - #ifndef dirent - # define dirent direct - #endif --typedef FILE DIR; - /* - ** Apparently originally by Rich Salz. - ** Cleaned up and modified by James W. Birdsall. --- -2.37.1 -
meta/recipes-extended/zip/zip_3.0.bb +1 -1
@@ -18,8 +18,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar. file://0002-configure-support-PIC-code-build.patch \ file://0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch \ file://0001-configure-Specify-correct-function-signatures-and-de.patch \ - file://0002-unix.c-Do-not-redefine-DIR-as-FILE.patch \ file://0001-unix-configure-use-_Static_assert-to-do-correct-dete.patch \ + file://0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch \ " UPSTREAM_VERSION_UNKNOWN = "1"
Signature · 1 line
2.34.1
PATCH 15/19 vala: add -Wno-error=incompatible-pointer-types work around
In reply to Steve SakomanFrom: Martin Jansa <[email protected]>
* to allow building vala-native on hosts with gcc-14
* we could backport:
https://gitlab.gnome.org/GNOME/vala/-/commit/23ec71b1a5c4cead3d1bdac82e184d0a63fa7b79
which is already included in scarthgap, but that's big patch doing almost the same
--- meta/recipes-devtools/vala/vala.inc | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-devtools/vala/vala.inc +4 -0
@@ -39,6 +39,10 @@ EOF EXTRA_OECONF += " --disable-valadoc" +# work around for vala-native build with gcc-14 instead of backporting +# https://gitlab.gnome.org/GNOME/vala/-/commit/23ec71b1a5c4cead3d1bdac82e184d0a63fa7b79 +BUILD_CFLAGS += "-Wno-error=incompatible-pointer-types" + # Vapigen wrapper needs to be available system-wide, because it will be used # to build vapi files from all other packages with vala support do_install:append:class-target() {
Signature · 1 line
2.34.1
PATCH 16/19 cracklib: Modify patch to compile with GCC 14
In reply to Steve SakomanFrom: Zoltan Boszormenyi <[email protected]>
GCC 14 implicitly turns a warning into a compiler error:
| ../../git/src/lib/packlib.c: In function ‘PWClose’:
| ../../git/src/lib/packlib.c:554:40: error: passing argument 1 of ‘HwmsHostToBigEndian’ from incompatible pointer type [-Wincompatible-pointer-types]
| 554 | HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32);
| | ~~~~~~~^~~~~
| | |
| | uint32_t * {aka unsigned int *}
| ../../git/src/lib/packlib.c:142:27: note: expected ‘char *’ but argument is of type ‘uint32_t *’ {aka ‘unsigned int *’}
| 142 | HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType)
| | ~~~~~~^~~~~Add the cast to (char *) to silence it.
--- ...0001-packlib.c-support-dictionary-byte-order-dependent.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch +1 -1
@@ -303,7 +303,7 @@ index 8acb7be..a9d8750 100644 + PWDICT tmp_pwp; + + memcpy(&tmp_pwp, pwp, sizeof(PWDICT)); -+ HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); ++ HwmsHostToBigEndian((char *)tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); + fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp); } }
Signature · 1 line
2.34.1
PATCH 17/19 libffi: backport a fix to build libffi-native with gcc-14
In reply to Steve SakomanFrom: Martin Jansa <[email protected]>
--- ...ward-declare-open_temp_exec_file-764.patch | 47 +++++++++++++++++++ meta/recipes-support/libffi/libffi_3.4.4.bb | 1 + 2 files changed, 48 insertions(+) create mode 100644 meta/recipes-support/libffi/libffi/0001-Forward-declare-open_temp_exec_file-764.patch
meta/recipes-support/libffi/libffi/0001-Forward-declare-open_temp_exec_file-764.patch new file +47 -0
@@ -0,0 +1,47 @@ +From 216bf8daeb30880957e0c888efbed1f0a7478c32 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille <[email protected]> +Date: Thu, 2 Feb 2023 14:46:29 +0000 +Subject: [PATCH] Forward declare open_temp_exec_file (#764) + +It's defined in closures.c and used in tramp.c. +Also declare it as an hidden symbol, as it should be. + +Co-authored-by: serge-sans-paille <[email protected]> +Signed-off-by: Martin Jansa <[email protected]> + +Upstream-Status: Backport [v3.4.5 https://github.com/libffi/libffi/commit/ce077e5565366171aa1b4438749b0922fce887a4] +--- + include/ffi_common.h | 4 ++++ + src/tramp.c | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/include/ffi_common.h b/include/ffi_common.h +index 2bd31b0..c53a794 100644 +--- a/include/ffi_common.h ++++ b/include/ffi_common.h +@@ -128,6 +128,10 @@ void *ffi_data_to_code_pointer (void *data) FFI_HIDDEN; + static trampoline. */ + int ffi_tramp_is_present (void *closure) FFI_HIDDEN; + ++/* Return a file descriptor of a temporary zero-sized file in a ++ writable and executable filesystem. */ ++int open_temp_exec_file(void) FFI_HIDDEN; ++ + /* Extended cif, used in callback from assembly routine */ + typedef struct + { +diff --git a/src/tramp.c b/src/tramp.c +index b9d273a..c3f4c99 100644 +--- a/src/tramp.c ++++ b/src/tramp.c +@@ -39,6 +39,10 @@ + #ifdef __linux__ + #define _GNU_SOURCE 1 + #endif ++ ++#include <ffi.h> ++#include <ffi_common.h> ++ + #include <stdio.h> + #include <unistd.h> + #include <stdlib.h>
meta/recipes-support/libffi/libffi_3.4.4.bb +1 -0
@@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=32c0d09a0641daf4903e5d61cc8f23a8" SRC_URI = "https://github.com/libffi/libffi/releases/download/v${PV}/${BPN}-${PV}.tar.gz \ file://not-win32.patch \ file://0001-arm-sysv-reverted-clang-VFP-mitigation.patch \ + file://0001-Forward-declare-open_temp_exec_file-764.patch \ " SRC_URI[sha256sum] = "d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676" UPSTREAM_CHECK_URI = "https://github.com/libffi/libffi/releases/"
Signature · 1 line
2.34.1
PATCH 18/19 at-spi2-core: backport a patch to fix build with gcc-14 on host
In reply to Steve SakomanFrom: Martin Jansa <[email protected]>
* fixes:
| ../at-spi2-core-2.42.0/atspi/atspi-device-listener.c: In function ?atspi_device_listener_new_simple?:
| ../at-spi2-core-2.42.0/atspi/atspi-device-listener.c:252:37: error: passing argument 1 of ?atspi_device_listener_new? from incompatible pointer type [-Wincompatible-pointer-types]
| 252 | return atspi_device_listener_new (device_remove_datum, callback, callback_destroyed);
| | ^~~~~~~~~~~~~~~~~~~
| | |
| | gboolean (*)(const AtspiDeviceEvent *, void *) {aka int (*)(const struct _AtspiDeviceEvent *, void *)}
| ../at-spi2-core-2.42.0/atspi/atspi-device-listener.c:222:50: note: expected ?AtspiDeviceListenerCB? {aka ?int (*)(struct _AtspiDeviceEvent *, void *)?} but argument is of type ?gboolean (*)(const AtspiDeviceEvent *, void *)? {aka ?int (*)(const struct _AtspiDeviceEvent *, void *)?}
| 222 | atspi_device_listener_new (AtspiDeviceListenerCB callback,
| | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~--- .../0001-Fix-function-prototype.patch | 27 +++++++++++++++++++ .../atk/at-spi2-core_2.42.0.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-support/atk/at-spi2-core/0001-Fix-function-prototype.patch
meta/recipes-support/atk/at-spi2-core/0001-Fix-function-prototype.patch new file +27 -0
@@ -0,0 +1,27 @@ +From b29826379068a05cdd42ba6e956d17e4d6681c7b Mon Sep 17 00:00:00 2001 +From: Federico Mena Quintero <[email protected]> +Date: Tue, 23 Nov 2021 11:18:51 -0600 +Subject: [PATCH] Fix function prototype + +device_remove_datum already implicitly casts its cb to a +AtspiDeviceListenerSimpleCB, which takes a const *event. + +Signed-off-by: Martin Jansa <[email protected]> +Upstream-Status: Backport [v2.43.92 https://github.com/GNOME/at-spi2-core/commit/1e91fc4cff2080696be914e26f4cdf0bf32d1550] +--- + atspi/atspi-device-listener.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/atspi/atspi-device-listener.c b/atspi/atspi-device-listener.c +index 69f77d1..9776ebd 100644 +--- a/atspi/atspi-device-listener.c ++++ b/atspi/atspi-device-listener.c +@@ -53,7 +53,7 @@ device_event_handler_new (AtspiDeviceListenerCB callback, + } + + static gboolean +-device_remove_datum (const AtspiDeviceEvent *event, void *user_data) ++device_remove_datum (AtspiDeviceEvent *event, void *user_data) + { + AtspiDeviceListenerSimpleCB cb = user_data; + return cb (event);
meta/recipes-support/atk/at-spi2-core_2.42.0.bb +1 -0
@@ -11,6 +11,7 @@ MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ file://0001-Ensure-x11_dep-is-defined.patch \ + file://0001-Fix-function-prototype.patch \ " SRC_URI[sha256sum] = "4b5da10e94fa3c6195f95222438f63a0234b99ef9df772c7640e82baeaa6e386"
Signature · 1 line
2.34.1
PATCH 19/19 util-linux: Define pidfd_* function signatures
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
glibc 2.36 has added sys/pidfd.h and APIs forpidfd_send_signal and pidfd_open, therefore check
for this header and include it if it exists
--- meta/recipes-core/util-linux/util-linux.inc | 1 + .../0001-check-for-sys-pidfd.h.patch | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 meta/recipes-core/util-linux/util-linux/0001-check-for-sys-pidfd.h.patch
meta/recipes-core/util-linux/util-linux.inc +1 -0
@@ -35,6 +35,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://run-ptest \ file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ + file://0001-check-for-sys-pidfd.h.patch \ file://CVE-2024-28085-0001.patch \ file://CVE-2024-28085-0002.patch \ file://CVE-2024-28085-0003.patch \
meta/recipes-core/util-linux/util-linux/0001-check-for-sys-pidfd.h.patch new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
2.34.1