Patch review
cover Patch review
Please review this set of changes for dunfell and have comments back by end of day Tuesday, November 14
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6174
The following changes since commit 0dbf3a15321b8033ff8ed86c6aa261fdb9c3d5bb:
build-appliance-image: Update to dunfell head revision (2023-10-27 04:22:17 -1000)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/dunfell-nut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut
Ashish Sharma (1):
zlib: Backport fix for CVE-2023-45853
Hitendra Prajapati (1):
tiff: Security fix for CVE-2023-40745
Lee Chee Yang (1):
kexec-tools: Ignore Fedora/RedHat specific CVE-2021-20269
Mikko Rapeli (1):
lz4: use CFLAGS from bitbake
Naveen Saini (2):
assimp: Explicitly use nobranch=1 in SRC_URI
resolvconf: Fix fetch error
Peter Marko (1):
glibc: ignore CVE-2023-4527
Ross Burton (3):
cve-check: sort the package list in the JSON report
cve-check: slightly more verbose warning when adding the same package
twice
cve-check: don't warn if a patch is remote
Soumya Sambu (1):
libwebp: Fix CVE-2023-4863
Steve Sakoman (2):
Revert "qemu: Backport fix for CVE-2023-0330"
lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Vijay Anusuri (2):
tiff: CVE patch correction for CVE-2023-3576
xserver-xorg: Fix for CVE-2023-5367 and CVE-2023-5380
meta/classes/cve-check.bbclass | 2 +
meta/lib/oe/cve_check.py | 13 +-
.../resolvconf/resolvconf_1.82.bb | 2 +-
meta/recipes-core/glibc/glibc_2.31.bb | 7 +
.../zlib/zlib/CVE-2023-45853.patch | 40 ++++++
meta/recipes-core/zlib/zlib_1.2.11.bb | 1 +
meta/recipes-devtools/qemu/qemu.inc | 3 +-
...-2023-0330_1.patch => CVE-2023-0330.patch} | 0
.../qemu/qemu/CVE-2023-0330_2.patch | 135 ------------------
meta/recipes-graphics/vulkan/assimp_5.0.1.bb | 2 +-
.../xserver-xorg/CVE-2023-5367.patch | 84 +++++++++++
.../xserver-xorg/CVE-2023-5380.patch | 102 +++++++++++++
.../xorg-xserver/xserver-xorg_1.20.14.bb | 2 +
.../kexec/kexec-tools_2.0.20.bb | 3 +
...-2023-3618-1.patch => CVE-2023-3576.patch} | 3 +-
...-2023-3618-2.patch => CVE-2023-3618.patch} | 0
.../libtiff/files/CVE-2023-40745.patch | 34 +++++
meta/recipes-multimedia/libtiff/tiff_4.1.0.bb | 5 +-
...23-5129.patch => CVE-2023-4863-0001.patch} | 27 ++--
.../webp/files/CVE-2023-4863-0002.patch | 53 +++++++
meta/recipes-multimedia/webp/libwebp_1.1.0.bb | 3 +-
meta/recipes-support/lz4/lz4_1.9.2.bb | 3 +-
22 files changed, 358 insertions(+), 166 deletions(-)
create mode 100644 meta/recipes-core/zlib/zlib/CVE-2023-45853.patch
rename meta/recipes-devtools/qemu/qemu/{CVE-2023-0330_1.patch => CVE-2023-0330.patch} (100%)
delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2023-0330_2.patch
create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5367.patch
create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5380.patch
rename meta/recipes-multimedia/libtiff/files/{CVE-2023-3618-1.patch => CVE-2023-3576.patch} (93%)
rename meta/recipes-multimedia/libtiff/files/{CVE-2023-3618-2.patch => CVE-2023-3618.patch} (100%)
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
rename meta/recipes-multimedia/webp/files/{CVE-2023-5129.patch => CVE-2023-4863-0001.patch} (95%)
create mode 100644 meta/recipes-multimedia/webp/files/CVE-2023-4863-0002.patchSignature · 1 line
2.34.1
PATCH 1/15 kexec-tools: Ignore Fedora/RedHat specific CVE-2021-20269
From: Lee Chee Yang <[email protected]>
--- meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb +3 -0
@@ -30,6 +30,9 @@ inherit autotools update-rc.d systemd export LDFLAGS = "-L${STAGING_LIBDIR}" EXTRA_OECONF = " --with-zlib=yes" +# affects kexec-tools shipped by Fedora versions prior to 2.0.21-8 and RHEL versions prior to 2.0.20-47. +CVE_CHECK_WHITELIST += "CVE-2021-20269" + do_compile_prepend() { # Remove the prepackaged config.h from the source tree as it overrides # the same file generated by configure and placed in the build tree
Signature · 1 line
2.34.1
PATCH 2/15 tiff: CVE patch correction for CVE-2023-3576
In reply to Steve SakomanFrom: Vijay Anusuri <[email protected]>
- The commit [https://gitlab.com/libtiff/libtiff/-/commit/881a070194783561fd209b7c789a4e75566f7f37]
fixes CVE-2023-3576
- Hence, renamed the CVE-2023-3618-1.patch to CVE-2023-3576.patch
- Reference: https://security-tracker.debian.org/tracker/CVE-2023-3576
https://security-tracker.debian.org/tracker/CVE-2023-3618
---
.../files/{CVE-2023-3618-1.patch => CVE-2023-3576.patch} | 3 ++-
.../files/{CVE-2023-3618-2.patch => CVE-2023-3618.patch} | 0
meta/recipes-multimedia/libtiff/tiff_4.1.0.bb | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
rename meta/recipes-multimedia/libtiff/files/{CVE-2023-3618-1.patch => CVE-2023-3576.patch} (93%)
rename meta/recipes-multimedia/libtiff/files/{CVE-2023-3618-2.patch => CVE-2023-3618.patch} (100%)meta/recipes-multimedia/libtiff/files/CVE-2023-3576.patch renamed from meta/recipes-multimedia/libtiff/files/CVE-2023-3618-1.patch +2 -1
@@ -4,8 +4,9 @@ Date: Tue, 7 Mar 2023 15:02:08 +0800 Subject: [PATCH] Fix memory leak in tiffcrop.c Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/881a070194783561fd209b7c789a4e75566f7f37] -CVE: CVE-2023-3618 +CVE: CVE-2023-3576 Signed-off-by: Hitendra Prajapati <[email protected]> +Signed-off-by: Vijay Anusuri <[email protected]> --- tools/tiffcrop.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-multimedia/libtiff/files/CVE-2023-3618.patch renamed from meta/recipes-multimedia/libtiff/files/CVE-2023-3618-2.patch +0 -0
meta/recipes-multimedia/libtiff/tiff_4.1.0.bb +2 -2
@@ -43,8 +43,8 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ file://CVE-2023-26966.patch \ file://CVE-2023-2908.patch \ file://CVE-2023-3316.patch \ - file://CVE-2023-3618-1.patch \ - file://CVE-2023-3618-2.patch \ + file://CVE-2023-3576.patch \ + file://CVE-2023-3618.patch \ " SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424" SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"
Signature · 1 line
2.34.1
PATCH 3/15 glibc: ignore CVE-2023-4527
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
This vulnerability was introduced in 2.36, so 2.31 is not vulnerable.
--- meta/recipes-core/glibc/glibc_2.31.bb | 7 +++++++ 1 file changed, 7 insertions(+)
meta/recipes-core/glibc/glibc_2.31.bb +7 -0
@@ -29,6 +29,13 @@ CVE_CHECK_WHITELIST += "CVE-2019-1010025" # https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dunfell&id=e1e89ff7d75c3d2223f9e3bd875b9b0c5e15836b CVE_CHECK_WHITELIST += "CVE-2021-35942" +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-4527 +# This vulnerability was introduced in 2.36 by commit +# f282cdbe7f436c75864e5640a409a10485e9abb2 resolv: Implement no-aaaa stub resolver option +# so our version is not yet vulnerable +# See https://sourceware.org/bugzilla/show_bug.cgi?id=30842 +CVE_CHECK_WHITELIST += "CVE-2023-4527" + DEPENDS += "gperf-native bison-native make-native" NATIVESDKFIXES ?= ""
Signature · 1 line
2.34.1
PATCH 4/15 libwebp: Fix CVE-2023-4863
In reply to Steve SakomanFrom: Soumya Sambu <[email protected]>
Heap buffer overflow in WebP in Google Chrome prior to 116.0.5845.187 allowed a remote attacker to perform an out of bounds memory write via a crafted HTML page.
Removed CVE-2023-5129.patch as CVE-2023-5129 is duplicate of CVE-2023-4863.
CVE: CVE-2023-4863
References:
https://nvd.nist.gov/vuln/detail/CVE-2023-4863
https://security-tracker.debian.org/tracker/CVE-2023-4863
https://bugzilla.redhat.com/show_bug.cgi?id=2238431#c12
---
...23-5129.patch => CVE-2023-4863-0001.patch} | 27 ++++------
.../webp/files/CVE-2023-4863-0002.patch | 53 +++++++++++++++++++
meta/recipes-multimedia/webp/libwebp_1.1.0.bb | 3 +-
3 files changed, 66 insertions(+), 17 deletions(-)
rename meta/recipes-multimedia/webp/files/{CVE-2023-5129.patch => CVE-2023-4863-0001.patch} (95%)
create mode 100644 meta/recipes-multimedia/webp/files/CVE-2023-4863-0002.patchmeta/recipes-multimedia/webp/files/CVE-2023-4863-0001.patch renamed from meta/recipes-multimedia/webp/files/CVE-2023-5129.patch +11 -16
@@ -1,7 +1,7 @@ -From 12b11893edf6c201710ebeee7c84743a8573fad6 Mon Sep 17 00:00:00 2001 +From 902bc9190331343b2017211debcec8d2ab87e17a Mon Sep 17 00:00:00 2001 From: Vincent Rabaud <[email protected]> Date: Thu, 7 Sep 2023 21:16:03 +0200 -Subject: [PATCH 1/1] Fix OOB write in BuildHuffmanTable. +Subject: [PATCH 1/2] Fix OOB write in BuildHuffmanTable. First, BuildHuffmanTable is called to check if the data is valid. If it is and the table is not big enough, more memory is allocated.
@@ -12,16 +12,11 @@ codes) streams are still decodable. Bug: chromium:1479274 Change-Id: I31c36dbf3aa78d35ecf38706b50464fd3d375741 -Notice that it references different CVE id: -https://nvd.nist.gov/vuln/detail/CVE-2023-5129 -which was marked as a rejected duplicate of: -https://nvd.nist.gov/vuln/detail/CVE-2023-4863 -but it's the same issue. Hence update CVE ID CVE-2023-4863 +CVE: CVE-2023-4863 -CVE: CVE-2023-5129 CVE-2023-4863 -Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/2af26267cdfcb63a88e5c74a85927a12d6ca1d76] -Signed-off-by: Colin McAllister <[email protected]> -Signed-off-by: Pawan Badganchi <[email protected]> +Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/902bc9190331343b2017211debcec8d2ab87e17a] + +Signed-off-by: Soumya Sambu <[email protected]> --- src/dec/vp8l_dec.c | 46 ++++++++++--------- src/dec/vp8li_dec.h | 2 +-
@@ -30,7 +25,7 @@ Signed-off-by: Pawan Badganchi <[email protected]> 4 files changed, 129 insertions(+), 43 deletions(-) diff --git a/src/dec/vp8l_dec.c b/src/dec/vp8l_dec.c -index 93615d4e..0d38314d 100644 +index 93615d4..0d38314 100644 --- a/src/dec/vp8l_dec.c +++ b/src/dec/vp8l_dec.c @@ -253,11 +253,11 @@ static int ReadHuffmanCodeLengths(
@@ -178,7 +173,7 @@ index 93615d4e..0d38314d 100644 assert(dec->hdr_.num_htree_groups_ > 0); diff --git a/src/dec/vp8li_dec.h b/src/dec/vp8li_dec.h -index 72b2e861..32540a4b 100644 +index 72b2e86..32540a4 100644 --- a/src/dec/vp8li_dec.h +++ b/src/dec/vp8li_dec.h @@ -51,7 +51,7 @@ typedef struct {
@@ -191,7 +186,7 @@ index 72b2e861..32540a4b 100644 typedef struct VP8LDecoder VP8LDecoder; diff --git a/src/utils/huffman_utils.c b/src/utils/huffman_utils.c -index 0cba0fbb..9efd6283 100644 +index 0cba0fb..9efd628 100644 --- a/src/utils/huffman_utils.c +++ b/src/utils/huffman_utils.c @@ -177,21 +177,24 @@ static int BuildHuffmanTable(HuffmanCode* const root_table, int root_bits,
@@ -322,7 +317,7 @@ index 0cba0fbb..9efd6283 100644 + } +} diff --git a/src/utils/huffman_utils.h b/src/utils/huffman_utils.h -index 13b7ad1a..98415c53 100644 +index 13b7ad1..98415c5 100644 --- a/src/utils/huffman_utils.h +++ b/src/utils/huffman_utils.h @@ -43,6 +43,29 @@ typedef struct {
@@ -367,5 +362,5 @@ index 13b7ad1a..98415c53 100644 #ifdef __cplusplus -- -2.34.1 +2.40.0
meta/recipes-multimedia/webp/files/CVE-2023-4863-0002.patch new file +53 -0
53 lines not on this page · raw message
meta/recipes-multimedia/webp/libwebp_1.1.0.bb +2 -1
@@ -21,7 +21,8 @@ UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html" SRC_URI += " \ file://CVE-2023-1999.patch \ - file://CVE-2023-5129.patch \ + file://CVE-2023-4863-0001.patch \ + file://CVE-2023-4863-0002.patch \ " EXTRA_OECONF = " \
Signature · 1 line
2.34.1
PATCH 5/15 tiff: Security fix for CVE-2023-40745
In reply to Steve SakomanFrom: Hitendra Prajapati <[email protected]>
Upstream-Status: Backport from https://gitlab.com/libtiff/libtiff/-/commit/4fc16f649fa2875d5c388cf2edc295510a247ee5
--- .../libtiff/files/CVE-2023-40745.patch | 34 +++++++++++++++++++ meta/recipes-multimedia/libtiff/tiff_4.1.0.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 4fc16f649fa2875d5c388cf2edc295510a247ee5 Mon Sep 17 00:00:00 2001 +From: Arie Haenel <[email protected]> +Date: Wed, 19 Jul 2023 19:34:25 +0000 +Subject: [PATCH] tiffcp: fix memory corruption (overflow) on hostile images + (fixes #591) + +Upstream-Status: Backport from [https://gitlab.com/libtiff/libtiff/-/commit/4fc16f649fa2875d5c388cf2edc295510a247ee5] +CVE: CVE-2023-40745 +Signed-off-by: Hitendra Prajapati <[email protected]> +--- + tools/tiffcp.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/tools/tiffcp.c b/tools/tiffcp.c +index 83b3910..007bd05 100644 +--- a/tools/tiffcp.c ++++ b/tools/tiffcp.c +@@ -1437,6 +1437,13 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) + TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)"); + return 0; + } ++ ++ if ( (imagew - tilew * spp) > INT_MAX ){ ++ TIFFError(TIFFFileName(in), ++ "Error, image raster scan line size is too large"); ++ return 0; ++ } ++ + iskew = imagew - tilew*spp; + tilebuf = _TIFFmalloc(tilesize); + if (tilebuf == 0) +-- +2.25.1 +
meta/recipes-multimedia/libtiff/tiff_4.1.0.bb +1 -0
@@ -45,6 +45,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ file://CVE-2023-3316.patch \ file://CVE-2023-3576.patch \ file://CVE-2023-3618.patch \ + file://CVE-2023-40745.patch \ " SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424" SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"
Signature · 1 line
2.34.1
PATCH 6/15 zlib: Backport fix for CVE-2023-45853
In reply to Steve SakomanFrom: Ashish Sharma <[email protected]>
Upstream-Status: Backport from [https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c]
--- .../zlib/zlib/CVE-2023-45853.patch | 40 +++++++++++++++++++ meta/recipes-core/zlib/zlib_1.2.11.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-core/zlib/zlib/CVE-2023-45853.patch
meta/recipes-core/zlib/zlib/CVE-2023-45853.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 73331a6a0481067628f065ffe87bb1d8f787d10c Mon Sep 17 00:00:00 2001 +From: Hans Wennborg <[email protected]> +Date: Fri, 18 Aug 2023 11:05:33 +0200 +Subject: [PATCH] Reject overflows of zip header fields in minizip. + +This checks the lengths of the file name, extra field, and comment +that would be put in the zip headers, and rejects them if they are +too long. They are each limited to 65535 bytes in length by the zip +format. This also avoids possible buffer overflows if the provided +fields are too long. + +Upstream-Status: Backport from [https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c] +CVE: CVE-2023-45853 +Signed-off-by: Ashish Sharma <[email protected]> +--- + contrib/minizip/zip.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c +index 3d3d4cadd..0446109b2 100644 +--- a/contrib/minizip/zip.c ++++ b/contrib/minizip/zip.c +@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c + return ZIP_PARAMERROR; + #endif + ++ // The filename and comment length must fit in 16 bits. ++ if ((filename!=NULL) && (strlen(filename)>0xffff)) ++ return ZIP_PARAMERROR; ++ if ((comment!=NULL) && (strlen(comment)>0xffff)) ++ return ZIP_PARAMERROR; ++ // The extra field length must fit in 16 bits. If the member also requires ++ // a Zip64 extra block, that will also need to fit within that 16-bit ++ // length, but that will be checked for later. ++ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff)) ++ return ZIP_PARAMERROR; ++ + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 1)
meta/recipes-core/zlib/zlib_1.2.11.bb +1 -0
@@ -11,6 +11,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \ file://CVE-2018-25032.patch \ file://run-ptest \ file://CVE-2022-37434.patch \ + file://CVE-2023-45853.patch \ " UPSTREAM_CHECK_URI = "http://zlib.net/"
Signature · 1 line
2.34.1
PATCH 7/15 Revert "qemu: Backport fix for CVE-2023-0330"
In reply to Steve SakomanThis reverts commit 45ce9885351a2344737170e6e810dc67ab3e7ea9.
Unfortunately this backport results in qemuarmv5 failing to boot with a qemu lsi hw error.
[YOCTO #15274]
See discussion: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15274
---
meta/recipes-devtools/qemu/qemu.inc | 3 +-
...-2023-0330_1.patch => CVE-2023-0330.patch} | 0
.../qemu/qemu/CVE-2023-0330_2.patch | 135 ------------------
3 files changed, 1 insertion(+), 137 deletions(-)
rename meta/recipes-devtools/qemu/qemu/{CVE-2023-0330_1.patch => CVE-2023-0330.patch} (100%)
delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2023-0330_2.patchmeta/recipes-devtools/qemu/qemu.inc +1 -2
@@ -137,8 +137,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3409-4.patch \ file://CVE-2021-3409-5.patch \ file://hw-display-qxl-Pass-requested-buffer-size-to-qxl_phy.patch \ - file://CVE-2023-0330_1.patch \ - file://CVE-2023-0330_2.patch \ + file://CVE-2023-0330.patch \ file://CVE-2023-3354.patch \ file://CVE-2023-3180.patch \ file://CVE-2020-24165.patch \
meta/recipes-devtools/qemu/qemu/CVE-2023-0330.patch renamed from meta/recipes-devtools/qemu/qemu/CVE-2023-0330_1.patch +0 -0
meta/recipes-devtools/qemu/qemu/CVE-2023-0330_2.patch deleted +0 -135
135 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 8/15 xserver-xorg: Fix for CVE-2023-5367 and CVE-2023-5380
In reply to Steve SakomanFrom: Vijay Anusuri <[email protected]>
Upstream-Status: Backport
[https://gitlab.freedesktop.org/xorg/xserver/-/commit/541ab2ecd41d4d8689e71855d93e492bc554719a
&
https://gitlab.freedesktop.org/xorg/xserver/-/commit/564ccf2ce9616620456102727acb8b0256b7bbd7]
--- .../xserver-xorg/CVE-2023-5367.patch | 84 +++++++++++++++ .../xserver-xorg/CVE-2023-5380.patch | 102 ++++++++++++++++++ .../xorg-xserver/xserver-xorg_1.20.14.bb | 2 + 3 files changed, 188 insertions(+) create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5367.patch create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5380.patch
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5367.patch new file +84 -0
@@ -0,0 +1,84 @@ +From 541ab2ecd41d4d8689e71855d93e492bc554719a Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <[email protected]> +Date: Tue, 3 Oct 2023 11:53:05 +1000 +Subject: [PATCH] Xi/randr: fix handling of PropModeAppend/Prepend + +The handling of appending/prepending properties was incorrect, with at +least two bugs: the property length was set to the length of the new +part only, i.e. appending or prepending N elements to a property with P +existing elements always resulted in the property having N elements +instead of N + P. + +Second, when pre-pending a value to a property, the offset for the old +values was incorrect, leaving the new property with potentially +uninitalized values and/or resulting in OOB memory writes. +For example, prepending a 3 element value to a 5 element property would +result in this 8 value array: + [N, N, N, ?, ?, P, P, P ] P, P + ^OOB write + +The XI2 code is a copy/paste of the RandR code, so the bug exists in +both. + +CVE-2023-5367, ZDI-CAN-22153 + +This vulnerability was discovered by: +Jan-Niklas Sohn working with Trend Micro Zero Day Initiative + +Signed-off-by: Peter Hutterer <[email protected]> + +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/541ab2ecd41d4d8689e71855d93e492bc554719a] +CVE: CVE-2023-5367 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + Xi/xiproperty.c | 4 ++-- + randr/rrproperty.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c +index 066ba21fba..d315f04d0e 100644 +--- a/Xi/xiproperty.c ++++ b/Xi/xiproperty.c +@@ -730,7 +730,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, + XIDestroyDeviceProperty(prop); + return BadAlloc; + } +- new_value.size = len; ++ new_value.size = total_len; + new_value.type = type; + new_value.format = format; + +@@ -747,7 +747,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, + case PropModePrepend: + new_data = new_value.data; + old_data = (void *) (((char *) new_value.data) + +- (prop_value->size * size_in_bytes)); ++ (len * size_in_bytes)); + break; + } + if (new_data) +diff --git a/randr/rrproperty.c b/randr/rrproperty.c +index c2fb9585c6..25469f57b2 100644 +--- a/randr/rrproperty.c ++++ b/randr/rrproperty.c +@@ -209,7 +209,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, + RRDestroyOutputProperty(prop); + return BadAlloc; + } +- new_value.size = len; ++ new_value.size = total_len; + new_value.type = type; + new_value.format = format; + +@@ -226,7 +226,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, + case PropModePrepend: + new_data = new_value.data; + old_data = (void *) (((char *) new_value.data) + +- (prop_value->size * size_in_bytes)); ++ (len * size_in_bytes)); + break; + } + if (new_data) +-- +GitLab +
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2023-5380.patch new file +102 -0
102 lines not on this page · raw message
meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.14.bb +2 -0
@@ -16,6 +16,8 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat file://CVE-2022-46344.patch \ file://CVE-2023-0494.patch \ file://CVE-2023-1393.patch \ + file://CVE-2023-5367.patch \ + file://CVE-2023-5380.patch \ " SRC_URI[md5sum] = "453fc86aac8c629b3a5b77e8dcca30bf" SRC_URI[sha256sum] = "54b199c9280ff8bf0f73a54a759645bd0eeeda7255d1c99310d5b7595f3ac066"
Signature · 1 line
2.34.1
PATCH 9/15 cve-check: sort the package list in the JSON report
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
The JSON report generated by the cve-check class is basically a huge list of packages. This list of packages is, however, unsorted.
To make things easier for people comparing the JSON, or more specifically for git when archiving the JSON over time in a git repository, we can sort the list by package name.
--- meta/classes/cve-check.bbclass | 2 ++ 1 file changed, 2 insertions(+)
meta/classes/cve-check.bbclass +2 -0
@@ -97,6 +97,8 @@ def generate_json_report(d, out_path, link_path): cve_check_merge_jsons(summary, data) filename = f.readline() + summary["package"].sort(key=lambda d: d['name']) + with open(out_path, "w") as f: json.dump(summary, f, indent=2)
Signature · 1 line
2.34.1
PATCH 10/15 cve-check: slightly more verbose warning when adding the same package twice
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
Occasionally the cve-check tool will warn that it is adding the same package twice. Knowing what this package is might be the first step towards understanding where this message comes from.
--- meta/lib/oe/cve_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/cve_check.py +1 -1
@@ -75,7 +75,7 @@ def cve_check_merge_jsons(output, data): for product in output["package"]: if product["name"] == data["package"][0]["name"]: - bb.error("Error adding the same package twice") + bb.error("Error adding the same package %s twice" % product["name"]) return output["package"].append(data["package"][0])
Signature · 1 line
2.34.1
Patchtest results for [OE-core][dunfell 10/15] cve-check: slightly more verbose warning when adding the same package twice
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/dunfell-10-15-cve-check-slightly-more-verbose-warning-when-adding-the-same-package-twice.patch
FAIL: test shortlog length: Edit shortlog so that it is 90 characters or less (currently 91 characters) (test_mbox.TestMbox.test_shortlog_length)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test pylint (test_python_pylint.PyLint.test_pylint)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
PATCH 11/15 cve-check: don't warn if a patch is remote
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
We don't make do_cve_check depend on do_unpack because that would be a waste of time 99% of the time. The compromise here is that we can't scan remote patches for issues, but this isn't a problem so downgrade the warning to a note.
Also move the check for CVEs in the filename before the local file check so that even with remote patches, we still check for CVE references in the name.
--- meta/lib/oe/cve_check.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
meta/lib/oe/cve_check.py +6 -5
@@ -114,11 +114,6 @@ def get_patched_cves(d): for url in oe.patch.src_patches(d): patch_file = bb.fetch.decodeurl(url)[2] - # Remote compressed patches may not be unpacked, so silently ignore them - if not os.path.isfile(patch_file): - bb.warn("%s does not exist, cannot extract CVE list" % patch_file) - continue - # Check patch file name for CVE ID fname_match = cve_file_name_match.search(patch_file) if fname_match:
@@ -126,6 +121,12 @@ def get_patched_cves(d): patched_cves.add(cve) bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file)) + # Remote patches won't be present and compressed patches won't be + # unpacked, so say we're not scanning them + if not os.path.isfile(patch_file): + bb.note("%s is remote or compressed, not scanning content" % patch_file) + continue + with open(patch_file, "r", encoding="utf-8") as f: try: patch_text = f.read()
Signature · 1 line
2.34.1
PATCH 12/15 assimp: Explicitly use nobranch=1 in SRC_URI
In reply to Steve SakomanFrom: Naveen Saini <[email protected]>
Branch 'assimp_5.0_release' is not present in repo.
Error:
assimp-5.0.1-r0 do_fetch: Fetcher failure: Unable to find revision 8f0c6b04b2257a520aaab38421b2e090204b69df in branch assimp_5.0_release even from upstream
Set nobranch=1, to fetch from v5.0.1 tag.
--- meta/recipes-graphics/vulkan/assimp_5.0.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/vulkan/assimp_5.0.1.bb +1 -1
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271" DEPENDS = "zlib" -SRC_URI = "git://github.com/assimp/assimp.git;branch=assimp_5.0_release;protocol=https \ +SRC_URI = "git://github.com/assimp/assimp.git;nobranch=1;protocol=https \ file://0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch \ file://0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch \ "
Signature · 1 line
2.34.1
PATCH 13/15 resolvconf: Fix fetch error
In reply to Steve SakomanFrom: Naveen Saini <[email protected]>
Branch 'master' renamed to 'unstable', which causing following failure.
Error:
Fetcher failure: Unable to find revision cb19bbfbe7e52174332f68bf2f295b39d119fad3 in branch master even from upstream
Switch to 'unstanble' branch.
--- meta/recipes-connectivity/resolvconf/resolvconf_1.82.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/resolvconf/resolvconf_1.82.bb +1 -1
@@ -11,7 +11,7 @@ AUTHOR = "Thomas Hood" HOMEPAGE = "http://packages.debian.org/resolvconf" RDEPENDS_${PN} = "bash" -SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=master \ +SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \ file://fix-path-for-busybox.patch \ file://99_resolvconf \ "
Signature · 1 line
2.34.1
PATCH 14/15 lz4: use CFLAGS from bitbake
In reply to Steve SakomanFrom: Mikko Rapeli <[email protected]>
Currently lz4 uses it's own defaults which include O3 optimization. Switch from O3 to bitbake default O2 reduces binary package size from 467056 to 331888 bytes. Enables also building with Os if needed.
--- meta/recipes-support/lz4/lz4_1.9.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/lz4/lz4_1.9.2.bb +1 -1
@@ -23,7 +23,7 @@ S = "${WORKDIR}/git" # Fixed in r118, which is larger than the current version. CVE_CHECK_WHITELIST += "CVE-2014-4715" -EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" +EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" do_install() { oe_runmake install
Signature · 1 line
2.34.1
Re: [OE-core][dunfell 14/15] lz4: use CFLAGS from bitbake
Quoted 7 lines · Steve Sakoman
From: Mikko Rapeli <[email protected]>
Currently lz4 uses it's own defaults which include O3 optimization. Switch from O3 to bitbake default O2 reduces binary package size from 467056 to 331888 bytes. Enables also building with Os if needed.
diverging away from package defaults means treading a less travelled path and prone to errors
this could be the reason for the reproducibility problem that Steve sent a patch for.
how does it impact runtime performance ?
Quoted 33 lines
Signed-off-by Mikko Rapeli <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit abaaf8c6bcd368728d298937a9406eb2aebc7a7d)Signed-off-by Steve Sakoman <[email protected]>--- meta/recipes-support/lz4/lz4_1.9.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-support/lz4/lz4_1.9.2.bb +1
-2@@ -23,7 +23,7 @@ S = "${WORKDIR}/git" # Fixed in r118, which is larger than the current version. CVE_CHECK_WHITELIST += "CVE-2014-4715" -EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" +EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" do_install() { oe_runmake install --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190429): https://lists.openembedded.org/g/openembedded-core/message/190429
Mute This Topic: https://lists.openembedded.org/mt/102526883/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 15/15 lz4: specify gnu17 in CFLAGS to fix reproducibility issues
In reply to Steve SakomanWe are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Specify std=gnu17 rather than leave this to chance.
--- meta/recipes-support/lz4/lz4_1.9.2.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-support/lz4/lz4_1.9.2.bb +1 -0
@@ -23,6 +23,7 @@ S = "${WORKDIR}/git" # Fixed in r118, which is larger than the current version. CVE_CHECK_WHITELIST += "CVE-2014-4715" +CFLAGS_append = " -std=gnu17" EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" do_install() {
Signature · 1 line
2.34.1
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 2 lines · Steve Sakoman
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Why is gcc-cross doing that? It is supposed to be deterministic so we really need to get to the bottom of this :/.
Cheers,
Richard
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 7 lines · Richard Purdie
Quoted 2 lines · Steve Sakoman
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Why is gcc-cross doing that? It is supposed to be deterministic so we really need to get to the bottom of this :/.
I think the previous patch to enforce OE cflags is exposing this problem. Now, it could be a
bug in how gcc is invoked or in gcc itself, but there is one file that shows up these c11 tags
in debug info segments.
Quoted 14 lines
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190434): https://lists.openembedded.org/g/openembedded-core/message/190434
Mute This Topic: https://lists.openembedded.org/mt/102526884/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 5 lines · Khem Raj
Quoted 2 lines · Richard Purdie
On Sat, 2023-11-11 at 05:03 -1000, Steve Sakoman wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Why is gcc-cross doing that? It is supposed to be deterministic so we really need to get to the bottom of this :/.
I think the previous patch to enforce OE cflags is exposing this problem.
No, the problem also exists without the previous patch.
Richard suggested the backport as a potential solution, since it fixed a repro issue in master.
It turned out to not be a complete fix in dunfell, hence my second patch.
I agree that it would be good to get to the bottom of the gcc reproducibility problem. But until we do, this second patch will fix the issue now and will do no harm once gcc is fixed since it is just explicitly specifying what should be the gcc default.
Steve
Quoted 19 lines
Now, it could be a
bug in how gcc is invoked or in gcc itself, but there is one file that shows up these c11 tags
in debug info segments.Quoted 14 lines
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190434): https://lists.openembedded.org/g/openembedded-core/message/190434
Mute This Topic: https://lists.openembedded.org/mt/102526884/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 20 lines · Steve Sakoman
Quoted 5 lines · Khem Raj
Quoted 2 lines · Richard Purdie
On Sat, 2023-11-11 at 05:03 -1000, Steve Sakoman wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Why is gcc-cross doing that? It is supposed to be deterministic so we really need to get to the bottom of this :/.
I think the previous patch to enforce OE cflags is exposing this problem.
No, the problem also exists without the previous patch.
Richard suggested the backport as a potential solution, since it fixed a repro issue in master.
Quoted 6 lines
It turned out to not be a complete fix in dunfell, hence my second patch.
I agree that it would be good to get to the bottom of the gcc reproducibility problem. But until we do, this second patch will fix the issue now and will do no harm once gcc is fixed since it is just explicitly specifying what should be the gcc default.
I worry that if we merge that, we'll not spend the time needed to get to the bottom of the gcc issue :(. We don't know if the issue is there on master or not :/.
Cheers,
Richard
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 24 lines · Richard Purdie
Quoted 22 lines · Steve Sakoman
Quoted 5 lines · Khem Raj
Quoted 2 lines · Richard Purdie
On Sat, 2023-11-11 at 05:03 -1000, Steve Sakoman wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Why is gcc-cross doing that? It is supposed to be deterministic so we really need to get to the bottom of this :/.
I think the previous patch to enforce OE cflags is exposing this problem.
No, the problem also exists without the previous patch.
Richard suggested the backport as a potential solution, since it fixed a repro issue in master.
It turned out to not be a complete fix in dunfell, hence my second patch.
Quoted 8 lines
Quoted 4 lines
I agree that it would be good to get to the bottom of the gcc reproducibility problem. But until we do, this second patch will fix the issue now and will do no harm once gcc is fixed since it is just explicitly specifying what should be the gcc default.
I worry that if we merge that, we'll not spend the time needed to get to the bottom of the gcc issue :(. We don't know if the issue is there on master or not :/.
Given that my knowledge of gcc is pretty much non-existent, I don't see myself getting to the bottom of this while still maintaining the three stable branches. So help from experts is required.
If you are OK with ongoing lz4 repro errors in dunfell, I'm happy to drop the patches and wait for someone knowledgeable to fix gcc.
Steve
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
In reply to Steve SakomanQuoted 16 lines · Steve Sakoman
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Specify std=gnu17 rather than leave this to chance.
Signed-off-by Steve Sakoman <[email protected]>Signed-off-by Khem Raj <[email protected]>--- meta/recipes-support/lz4/lz4_1.9.2.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-support/lz4/lz4_1.9.2.bb +0
-0
meta/recipes-support/lz4/lz4_1.9.2.bb S = "${WORKDIR}/git" · line 29
Quoted 7 lines
meta/recipes-support/lz4/lz4_1.9.2.bb +1
-0@@ -23,6 +23,7 @@ S = "${WORKDIR}/git" # Fixed in r118, which is larger than the current version. CVE_CHECK_WHITELIST += "CVE-2014-4715" +CFLAGS_append = " -std=gnu17" EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" do_install() {
I've looked into this a lot more and I'm now of the opinion this is totally wrong and definitely should not merge.
An example failure is:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231109-ch73ktqp/packages/diff-html/
First, it is worth noting the huge size difference. It appears debug line information is being missed out. The difference in cflags is a false lead, it is because crti.S is compiled with c17 and the producer string is being mis-compared, the data is missing on one side.
So what we're looking for really is a cflags issue where -g is going missing.
I did check older failures which look similar:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231105-_xpb575y/packages/diff-html/
Since we're looking for cflags issues:
https://github.com/lz4/lz4/commit/7d8d1075e696d585238e6aa6a4f43dc759da250e
looks interesting and leads to:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=59230
If the makefile had intermittently picked up CFLAGS from the environment, the output would be identical to the previous cflags patch in the series, which would cross link the hash equivalence inputs/outputs and could generally confuse things.
The real question is which autobuilder worker is compiling without the -g option and is it a make bug? Perhaps it doesn't matter and we just need to force the input and output hashes to change to stop the errors once the previous patch is applied.
Cheers,
Richard
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 49 lines · Richard Purdie
Quoted 16 lines · Steve Sakoman
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Specify std=gnu17 rather than leave this to chance.
Signed-off-by Steve Sakoman <[email protected]>Signed-off-by Khem Raj <[email protected]>--- meta/recipes-support/lz4/lz4_1.9.2.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-support/lz4/lz4_1.9.2.bb +0
-0meta/recipes-support/lz4/lz4_1.9.2.bb S = "${WORKDIR}/git" · line 29
Quoted 7 lines
meta/recipes-support/lz4/lz4_1.9.2.bb +1
-0@@ -23,6 +23,7 @@ S = "${WORKDIR}/git" # Fixed in r118, which is larger than the current version. CVE_CHECK_WHITELIST += "CVE-2014-4715" +CFLAGS_append = " -std=gnu17" EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" do_install() {I've looked into this a lot more and I'm now of the opinion this is totally wrong and definitely should not merge.
An example failure is:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231109-ch73ktqp/packages/diff-html/
First, it is worth noting the huge size difference. It appears debug line information is being missed out. The difference in cflags is a false lead, it is because
crti.Sis compiled with c17 and the producer string is being mis-compared, the data is missing on one side.So what we're looking for really is a cflags issue where -g is going missing.
I did check older failures which look similar:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231105-_xpb575y/packages/diff-html/
Since we're looking for cflags issues:
https://github.com/lz4/lz4/commit/7d8d1075e696d585238e6aa6a4f43dc759da250e
Quoted 8 lines
looks interesting and leads to:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=59230
If the makefile had intermittently picked up CFLAGS from the environment, the output would be identical to the previous cflags patch in the series, which would cross link the hash equivalence inputs/outputs and could generally confuse things.
Thanks for looking into this! I will remove the patch from the series.
Quoted 4 lines
The real question is which autobuilder worker is compiling without the -g option and is it a make bug? Perhaps it doesn't matter and we just need to force the input and output hashes to change to stop the errors once the previous patch is applied.
What is the proper way to force the input and output hashes to change?
Thanks again!
Steve
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 62 lines · Steve Sakoman
Quoted 49 lines · Richard Purdie
Quoted 16 lines · Steve Sakoman
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Specify std=gnu17 rather than leave this to chance.
Signed-off-by Steve Sakoman <[email protected]>Signed-off-by Khem Raj <[email protected]>--- meta/recipes-support/lz4/lz4_1.9.2.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-support/lz4/lz4_1.9.2.bb +0
-0meta/recipes-support/lz4/lz4_1.9.2.bb S = "${WORKDIR}/git" · line 29
Quoted 7 lines
meta/recipes-support/lz4/lz4_1.9.2.bb +1
-0@@ -23,6 +23,7 @@ S = "${WORKDIR}/git" # Fixed in r118, which is larger than the current version. CVE_CHECK_WHITELIST += "CVE-2014-4715" +CFLAGS_append = " -std=gnu17" EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" do_install() {I've looked into this a lot more and I'm now of the opinion this is totally wrong and definitely should not merge.
An example failure is:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231109-ch73ktqp/packages/diff-html/
First, it is worth noting the huge size difference. It appears debug line information is being missed out. The difference in cflags is a false lead, it is because
crti.Sis compiled with c17 and the producer string is being mis-compared, the data is missing on one side.So what we're looking for really is a cflags issue where -g is going missing.
I did check older failures which look similar:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231105-_xpb575y/packages/diff-html/
Since we're looking for cflags issues:
https://github.com/lz4/lz4/commit/7d8d1075e696d585238e6aa6a4f43dc759da250e
Quoted 8 lines
looks interesting and leads to:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=59230
If the makefile had intermittently picked up CFLAGS from the environment, the output would be identical to the previous cflags patch in the series, which would cross link the hash equivalence inputs/outputs and could generally confuse things.
Thanks for looking into this! I will remove the patch from the series.
Quoted 8 lines
Quoted 4 lines
The real question is which autobuilder worker is compiling without the -g option and is it a make bug? Perhaps it doesn't matter and we just need to force the input and output hashes to change to stop the errors once the previous patch is applied.
What is the proper way to force the input and output hashes to change?
Thanks again!
https://git.yoctoproject.org/poky/commit/?id=ad3dfac07f856917434deb073fe9c8a788d4c21d
is an example.
Cheers,
Richard
Re: [OE-core][dunfell 15/15] lz4: specify gnu17 in CFLAGS to fix reproducibility issues
Quoted 69 lines · Richard Purdie
Quoted 67 lines · Steve Sakoman
Quoted 49 lines · Richard Purdie
Quoted 16 lines · Steve Sakoman
We are seeing reproducibility issues where gcc-cross sometimes defaults to gnu11 and other times to gnu17.
Specify std=gnu17 rather than leave this to chance.
Signed-off-by Steve Sakoman <[email protected]>Signed-off-by Khem Raj <[email protected]>--- meta/recipes-support/lz4/lz4_1.9.2.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-support/lz4/lz4_1.9.2.bb +0
-0meta/recipes-support/lz4/lz4_1.9.2.bb S = "${WORKDIR}/git" · line 29
Quoted 7 lines
meta/recipes-support/lz4/lz4_1.9.2.bb +1
-0@@ -23,6 +23,7 @@ S = "${WORKDIR}/git" # Fixed in r118, which is larger than the current version. CVE_CHECK_WHITELIST += "CVE-2014-4715" +CFLAGS_append = " -std=gnu17" EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" do_install() {I've looked into this a lot more and I'm now of the opinion this is totally wrong and definitely should not merge.
An example failure is:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231109-ch73ktqp/packages/diff-html/
First, it is worth noting the huge size difference. It appears debug line information is being missed out. The difference in cflags is a false lead, it is because
crti.Sis compiled with c17 and the producer string is being mis-compared, the data is missing on one side.So what we're looking for really is a cflags issue where -g is going missing.
I did check older failures which look similar:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20231105-_xpb575y/packages/diff-html/
Since we're looking for cflags issues:
https://github.com/lz4/lz4/commit/7d8d1075e696d585238e6aa6a4f43dc759da250e
Quoted 8 lines
looks interesting and leads to:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=59230
If the makefile had intermittently picked up CFLAGS from the environment, the output would be identical to the previous cflags patch in the series, which would cross link the hash equivalence inputs/outputs and could generally confuse things.
Thanks for looking into this! I will remove the patch from the series.
Quoted 4 lines
The real question is which autobuilder worker is compiling without the -g option and is it a make bug? Perhaps it doesn't matter and we just need to force the input and output hashes to change to stop the errors once the previous patch is applied.
Quoted 7 lines
Quoted 3 lines
What is the proper way to force the input and output hashes to change?
Thanks again!
https://git.yoctoproject.org/poky/commit/?id=ad3dfac07f856917434deb073fe9c8a788d4c21d
is an example.
Thanks Richard! I'll test with this and resubmit the series.
Steve