Patch review
cover Patch review
Please review this set of changes for scarthgap and have comments back by end of day Monday, September 2
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/7287
The following changes since commit 8b5c66c91d94f4c8521fe9443e65d86063dba5e5:
oeqa/utils/postactions: transfer whole archive over ssh instead of doing individual copies (2024-08-20 05:03:49 -0700)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/scarthgap-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/scarthgap-nut
Archana Polampalli (2):
ffmpeg: fix CVE-2024-32230
qemu: fix CVE-2024-7409
Bartosz Golaszewski (1):
linux-firmware: add a package for ath12k firmware
Changqing Li (2):
expect-native: fix do_compile failure with gcc-14
libcap-ng: update SRC_URI
Niko Mauno (1):
util-linux: Add PACKAGECONFIG option to mitigate rootfs remount error
Peter Marko (2):
libyaml: Ignore CVE-2024-35325
curl: Patch CVE-2024-7264
Quentin Schulz (1):
weston-init: fix weston not starting when xwayland is enabled
Siddharth Doshi (1):
vim: Upgrade 9.1.0114 -> 9.1.0682
Simone Weiß (1):
curl: Ignore CVE-2024-32928
Yogita Urade (1):
qemu: fix CVE-2024-4467
.../util-linux/util-linux_2.39.3.bb | 12 +- meta/recipes-devtools/expect/expect_5.45.4.bb | 2 +- meta/recipes-devtools/qemu/qemu.inc | 9 + .../qemu/qemu/CVE-2024-4467-0001.patch | 112 ++ .../qemu/qemu/CVE-2024-4467-0002.patch | 55 + .../qemu/qemu/CVE-2024-4467-0003.patch | 57 + .../qemu/qemu/CVE-2024-4467-0004.patch | 1187 +++++++++++++++++ .../qemu/qemu/CVE-2024-4467-0005.patch | 239 ++++ .../qemu/qemu/CVE-2024-7409-0001.patch | 167 +++ .../qemu/qemu/CVE-2024-7409-0002.patch | 175 +++ .../qemu/qemu/CVE-2024-7409-0003.patch | 126 ++ .../qemu/qemu/CVE-2024-7409-0004.patch | 164 +++ meta/recipes-graphics/wayland/weston-init.bb | 2 +- .../linux-firmware/linux-firmware_20240312.bb | 8 +- .../ffmpeg/ffmpeg/CVE-2024-32230.patch | 36 + .../recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb | 1 + .../curl/curl/CVE-2024-7264-1.patch | 61 + .../curl/curl/CVE-2024-7264-2.patch | 316 +++++ meta/recipes-support/curl/curl_8.7.1.bb | 3 + .../libcap-ng/libcap-ng-python_0.8.5.bb | 2 - meta/recipes-support/libcap-ng/libcap-ng.inc | 8 +- meta/recipes-support/libyaml/libyaml_0.2.5.bb | 1 + ...m-add-knob-whether-elf.h-are-checked.patch | 39 - meta/recipes-support/vim/vim.inc | 5 +- 24 files changed, 2737 insertions(+), 50 deletions(-) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0001.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0002.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0003.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0004.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0005.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0001.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0002.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0003.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0004.patch create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-32230.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2024-7264-1.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2024-7264-2.patch delete mode 100644 meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch
Signature · 1 line
2.34.1
PATCH 1/12 qemu: fix CVE-2024-4467
From: Yogita Urade <[email protected]>
A flaw was found in the QEMU disk image utility (qemu-img) 'info' command. A specially crafted image file containing a json:{} value describing block devices in QMP could cause the qemu-img process on the host to consume large amounts of memory or CPU time, leading to denial of service or read/write to an existing external file
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-4467
Upstream Patches:
https://gitlab.com/qemu-project/qemu/-/commit/bd385a5298d7062668e804d73944d52aec9549f1
https://gitlab.com/qemu-project/qemu/-/commit/2eb42a728d27a43fdcad5f37d3f65706ce6deba5
https://gitlab.com/qemu-project/qemu/-/commit/7e1110664ecbc4826f3c978ccb06b6c1bce823e6
https://gitlab.com/qemu-project/qemu/-/commit/6bc30f19498547fac9cef98316a65cf6c1f14205
https://gitlab.com/qemu-project/qemu/-/commit/7ead946998610657d38d1a505d5f25300d4ca613
--- meta/recipes-devtools/qemu/qemu.inc | 5 + .../qemu/qemu/CVE-2024-4467-0001.patch | 112 ++ .../qemu/qemu/CVE-2024-4467-0002.patch | 55 + .../qemu/qemu/CVE-2024-4467-0003.patch | 57 + .../qemu/qemu/CVE-2024-4467-0004.patch | 1187 +++++++++++++++++ .../qemu/qemu/CVE-2024-4467-0005.patch | 239 ++++ 6 files changed, 1655 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0001.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0002.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0003.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0004.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0005.patch
meta/recipes-devtools/qemu/qemu.inc +5 -0
@@ -40,6 +40,11 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0005-tests-tcg-Check-that-shmat-does-not-break-proc-self-.patch \ file://qemu-guest-agent.init \ file://qemu-guest-agent.udev \ + file://CVE-2024-4467-0001.patch \ + file://CVE-2024-4467-0002.patch \ + file://CVE-2024-4467-0003.patch \ + file://CVE-2024-4467-0004.patch \ + file://CVE-2024-4467-0005.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0001.patch new file +112 -0
112 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0002.patch new file +55 -0
55 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0003.patch new file +57 -0
57 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0004.patch new file +1187 -0
1,187 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2024-4467-0005.patch new file +239 -0
239 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 2/12 libyaml: Ignore CVE-2024-35325
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
This is similar CVE as the previous ones from the same author.
https://github.com/yaml/libyaml/issues/303 explain why this is misuse (or wrong use) of libyaml.
--- meta/recipes-support/libyaml/libyaml_0.2.5.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-support/libyaml/libyaml_0.2.5.bb +1 -0
@@ -18,6 +18,7 @@ inherit autotools DISABLE_STATIC:class-nativesdk = "" DISABLE_STATIC:class-native = "" +CVE_STATUS[CVE-2024-35325] = "upstream-wontfix: Upstream thinks this is a misuse (or wrong use) of the libyaml API - https://github.com/yaml/libyaml/issues/303" CVE_STATUS[CVE-2024-35326] = "upstream-wontfix: Upstream thinks there is no working code that is exploitable - https://github.com/yaml/libyaml/issues/302" CVE_STATUS[CVE-2024-35328] = "upstream-wontfix: Upstream thinks there is no working code that is exploitable - https://github.com/yaml/libyaml/issues/302"
Signature · 1 line
2.34.1
PATCH 3/12 curl: Patch CVE-2024-7264
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
Pick commits per https://curl.se/docs/CVE-2024-7264.html
--- .../curl/curl/CVE-2024-7264-1.patch | 61 ++++ .../curl/curl/CVE-2024-7264-2.patch | 316 ++++++++++++++++++ meta/recipes-support/curl/curl_8.7.1.bb | 2 + 3 files changed, 379 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2024-7264-1.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2024-7264-2.patch
meta/recipes-support/curl/curl/CVE-2024-7264-1.patch new file +61 -0
@@ -0,0 +1,61 @@ +From 3c914bc680155b32178f1f15ca8d47c7f4640afe Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg <[email protected]> +Date: Tue, 30 Jul 2024 10:05:17 +0200 +Subject: [PATCH] x509asn1: clean up GTime2str + +Co-authored-by: Stefan Eissing +Reported-by: Dov Murik + +Closes #14307 + +CVE: CVE-2024-7264 +Upstream-Status: Backport [https://github.com/curl/curl/commit/3c914bc680155b32178f1f15ca8d47c7f4640afe.patch] +Signed-off-by: Peter Marko <[email protected]> +--- + lib/vtls/x509asn1.c | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c +index 1bc4243ddae343..e3a9fe4232a4ea 100644 +--- a/lib/vtls/x509asn1.c ++++ b/lib/vtls/x509asn1.c +@@ -488,7 +488,7 @@ static CURLcode GTime2str(struct dynbuf *store, + /* Convert an ASN.1 Generalized time to a printable string. + Return the dynamically allocated string, or NULL if an error occurs. */ + +- for(fracp = beg; fracp < end && *fracp >= '0' && *fracp <= '9'; fracp++) ++ for(fracp = beg; fracp < end && ISDIGIT(*fracp); fracp++) + ; + + /* Get seconds digits. */ +@@ -507,17 +507,22 @@ static CURLcode GTime2str(struct dynbuf *store, + return CURLE_BAD_FUNCTION_ARGUMENT; + } + +- /* Scan for timezone, measure fractional seconds. */ ++ /* timezone follows optional fractional seconds. */ + tzp = fracp; +- fracl = 0; ++ fracl = 0; /* no fractional seconds detected so far */ + if(fracp < end && (*fracp == '.' || *fracp == ',')) { +- fracp++; +- do ++ /* Have fractional seconds, e.g. "[.,]\d+". How many? */ ++ tzp = fracp++; /* should be a digit char or BAD ARGUMENT */ ++ while(tzp < end && ISDIGIT(*tzp)) + tzp++; +- while(tzp < end && *tzp >= '0' && *tzp <= '9'); +- /* Strip leading zeroes in fractional seconds. */ +- for(fracl = tzp - fracp - 1; fracl && fracp[fracl - 1] == '0'; fracl--) +- ; ++ if(tzp == fracp) /* never looped, no digit after [.,] */ ++ return CURLE_BAD_FUNCTION_ARGUMENT; ++ fracl = tzp - fracp - 1; /* number of fractional sec digits */ ++ DEBUGASSERT(fracl > 0); ++ /* Strip trailing zeroes in fractional seconds. ++ * May reduce fracl to 0 if only '0's are present. */ ++ while(fracl && fracp[fracl - 1] == '0') ++ fracl--; + } + + /* Process timezone. */
meta/recipes-support/curl/curl/CVE-2024-7264-2.patch new file +316 -0
316 lines not on this page · raw message
meta/recipes-support/curl/curl_8.7.1.bb +2 -0
@@ -16,6 +16,8 @@ SRC_URI = " \ file://disable-tests \ file://no-test-timeout.patch \ file://CVE-2024-6197.patch \ + file://CVE-2024-7264-1.patch \ + file://CVE-2024-7264-2.patch \ " SRC_URI[sha256sum] = "6fea2aac6a4610fbd0400afb0bcddbe7258a64c63f1f68e5855ebc0c659710cd"
Signature · 1 line
2.34.1
PATCH 4/12 curl: Ignore CVE-2024-32928
In reply to Steve SakomanFrom: Simone Weiß <[email protected]>
This CVE affects google cloud services that utilize libcurl wrongly.
--- meta/recipes-support/curl/curl_8.7.1.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-support/curl/curl_8.7.1.bb +1 -0
@@ -23,6 +23,7 @@ SRC_URI[sha256sum] = "6fea2aac6a4610fbd0400afb0bcddbe7258a64c63f1f68e5855ebc0c65 # Curl has used many names over the years... CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" +CVE_STATUS[CVE-2024-32928] = "ignored: CURLOPT_SSL_VERIFYPEER was disabled on google cloud services causing a potential man in the middle attack" inherit autotools pkgconfig binconfig multilib_header ptest
Signature · 1 line
2.34.1
PATCH 5/12 ffmpeg: fix CVE-2024-32230
In reply to Steve SakomanFrom: Archana Polampalli <[email protected]>
FFmpeg 7.0 is vulnerable to Buffer Overflow. There is a negative-size-param bug at libavcodec/mpegvideo_enc.c:1216:21 in load_input_picture in FFmpeg7.0
--- .../ffmpeg/ffmpeg/CVE-2024-32230.patch | 36 +++++++++++++++++++ .../recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-32230.patch
meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-32230.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <[email protected]> +Date: Mon, 8 Apr 2024 18:38:42 +0200 +Subject: [PATCH] avcodec/mpegvideo_enc: Fix 1 line and one column images + +Fixes: Ticket10952 +Fixes: poc21ffmpeg +Signed-off-by: Michael Niedermayer <[email protected]> + +CVE: CVE-2024-32230 + +Upstream-Status: Backport [https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1] + +Signed-off-by: Archana Polampalli <[email protected]> +--- + libavcodec/mpegvideo_enc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c +index e460ca4..fb4aaa2 100644 +--- a/libavcodec/mpegvideo_enc.c ++++ b/libavcodec/mpegvideo_enc.c +@@ -1198,8 +1198,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) + int dst_stride = i ? s->uvlinesize : s->linesize; + int h_shift = i ? s->chroma_x_shift : 0; + int v_shift = i ? s->chroma_y_shift : 0; +- int w = s->width >> h_shift; +- int h = s->height >> v_shift; ++ int w = AV_CEIL_RSHIFT(s->width , h_shift); ++ int h = AV_CEIL_RSHIFT(s->height, v_shift); + const uint8_t *src = pic_arg->data[i]; + uint8_t *dst = pic->f->data[i]; + int vpad = 16; +-- +2.40.0 +
meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb +1 -0
@@ -31,6 +31,7 @@ SRC_URI = " \ file://CVE-2024-31578.patch \ file://CVE-2024-31582.patch \ file://CVE-2023-50008.patch \ + file://CVE-2024-32230.patch \ " SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968"
Signature · 1 line
2.34.1
PATCH 6/12 qemu: fix CVE-2024-7409
In reply to Steve SakomanFrom: Archana Polampalli <[email protected]>
A flaw was found in the QEMU NBD Server. This vulnerability allows a denial of service (DoS) attack via improper synchronization during socket closure when a client keeps a socket open as the server is taken offline.
--- meta/recipes-devtools/qemu/qemu.inc | 4 + .../qemu/qemu/CVE-2024-7409-0001.patch | 167 +++++++++++++++++ .../qemu/qemu/CVE-2024-7409-0002.patch | 175 ++++++++++++++++++ .../qemu/qemu/CVE-2024-7409-0003.patch | 126 +++++++++++++ .../qemu/qemu/CVE-2024-7409-0004.patch | 164 ++++++++++++++++ 5 files changed, 636 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0001.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0002.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0003.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0004.patch
meta/recipes-devtools/qemu/qemu.inc +4 -0
@@ -45,6 +45,10 @@ 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-2024-7409-0001.patch \ + file://CVE-2024-7409-0002.patch \ + file://CVE-2024-7409-0003.patch \ + file://CVE-2024-7409-0004.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0001.patch new file +167 -0
167 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0002.patch new file +175 -0
175 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0003.patch new file +126 -0
126 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0004.patch new file +164 -0
164 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 7/12 vim: Upgrade 9.1.0114 -> 9.1.0682
In reply to Steve SakomanFrom: Siddharth Doshi <[email protected]>
This includes CVE-fix for CVE-2024-41957, CVE-2024-41965 and CVE-2024-43374
Changes between 9.1.0114 -> 9.1.0682
====================================
https://github.com/vim/vim/compare/v9.1.0114...v9.1.0682
Note:
====
Removed patch "vim-add-knob-whether-elf.h-are-checked.patch" as libelf checks are removed from configure.ac as per commit https://github.com/vim/vim/commit/1acc67ac4412aa9a75d1c58ebf93f2b29585a960
--- ...m-add-knob-whether-elf.h-are-checked.patch | 39 ------------------- meta/recipes-support/vim/vim.inc | 5 +-- 2 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch
meta/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From 38de4bccdb8a861ffdd447f12fdab19d6d852c02 Mon Sep 17 00:00:00 2001 -From: Chong Lu <[email protected]> -Date: Tue, 26 Jun 2018 17:34:15 +0800 -Subject: [PATCH] vim: add knob whether elf.h are checked - -Previously, it still was checked when there was no elf library in sysroots directory. -Add knob to decide whether elf.h are checked or not. - -Upstream-Status: Pending - -Signed-off-by: Chong Lu <[email protected]> -Signed-off-by: Changqing Li <[email protected]> ---- - src/configure.ac | 7 +++++++ - 1 file changed, 7 insertions(+) - -Index: git/src/configure.ac -=================================================================== ---- git.orig/src/configure.ac -+++ git/src/configure.ac -@@ -3264,11 +3264,18 @@ AC_TRY_COMPILE([#include <stdio.h>], [in - AC_MSG_RESULT(no)) - - dnl Checks for header files. -+AC_MSG_CHECKING(whether or not to look for elf.h) -+AC_ARG_ENABLE(elf-check, -+ [ --enable-elf-check If elfutils, check for elf.h [default=no]], -+ , enable_elf_check="no") -+AC_MSG_RESULT($enable_elf_check) -+if test "x$enable_elf_check" != "xno"; then - AC_CHECK_HEADER(elf.h, HAS_ELF=1) - dnl AC_CHECK_HEADER(dwarf.h, SVR4=1) - if test "$HAS_ELF" = 1; then - AC_CHECK_LIB(elf, main) - fi -+fi - - AC_HEADER_DIRENT -
meta/recipes-support/vim/vim.inc +2 -3
@@ -14,13 +14,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d1a651ab770b45d41c0f8cb5a8ca930e" SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://disable_acl_header_check.patch \ - file://vim-add-knob-whether-elf.h-are-checked.patch \ file://0001-src-Makefile-improve-reproducibility.patch \ file://no-path-adjust.patch \ " -PV .= ".0114" -SRCREV = "fcaed6a70faf73bff3e5405ada556d726024f866" +PV .= ".0682" +SRCREV = "cb90ea9cba6f033fe141db0e466fb4117f28402b" # 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/12 util-linux: Add PACKAGECONFIG option to mitigate rootfs remount error
In reply to Steve SakomanFrom: Niko Mauno <[email protected]>
The 2.39 version of util-linux took new file descriptors based mount kernel API into use. In relation to this change, the upstream release notes in
https://github.com/util-linux/util-linux/blob/v2.39/Documentation/releases/v2.39-ReleaseNotes#L14-L21
mention that
This change is very aggressive to libmount code, but hopefully, it does not introduce regressions in traditional mount(8) behavior.
After observing following failure when booting a board using a bit older 6.1 series kernel together with initramfs rootfs based boot flow
[FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details.
closer inspection revealed:
demoboard ~ # systemctl status -l systemd-remount-fs.service
x systemd-remount-fs.service - Remount Root and Kernel File Systems
Loaded: loaded (/usr/lib/systemd/system/systemd-remount-fs.service; enabled-runtime; preset: disabled)
Active: failed (Result: exit-code) since Wed 2024-08-14 14:53:48 UTC; 1min 22s ago
Docs: man:systemd-remount-fs.service(8)
https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
Process: 76 ExecStart=/usr/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)
Main PID: 76 (code=exited, status=1/FAILURE)
Aug 14 14:53:48 demoboard systemd-remount-fs[76]: /usr/bin/mount for / exited with exit status 32. Aug 14 14:53:48 demoboard systemd-remount-fs[81]: mount: /: mount point not mounted or bad option. Aug 14 14:53:48 demoboard systemd-remount-fs[81]: dmesg(1) may have more information after failed mount system call. Aug 14 14:53:48 demoboard systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE Aug 14 14:53:48 demoboard systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'. Aug 14 14:53:48 demoboard systemd[1]: Failed to start Remount Root and Kernel File Systems.
also consequentially, 'systemctl status' reported:
State: degraded
When issuing 'strace -ff mount -o remount /' the failure occurred at
mount_setattr(3, "", AT_EMPTY_PATH, {attr_set=MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOATIME|MOUNT_ATTR_NODIRATIME, attr_clr=MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_NOATIME|MOUNT_ATTR_STRICTATIME|MOUNT_ATTR_NOSYMFOLLOW|0x40, propagation=0 /* MS_??? */, userns_fd=0}, 32) = -1 EINVAL (Invalid argument)
After further investigation, The issue was pinpointed to lack of Linux kernel commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=95de4ad173ca0e61034f3145d66917970961c210
("fs: relax mount_setattr() permission checks") in the kernel version that was being used. Above mitigation was discussed in email related to then-rejected CVE-2024-26821:
https://lore.kernel.org/linux-cve-announce/2024051606-imaging-entrench-b327@gregkh/T/
After testing with qemuarm64 machine different linux-yocto versions, it was observed that the issue impacts following versions of currently supported LTS kernels:
- 6.6.17 (fixed since 6.6.18 i.e. mount_setattr() returns 0)
- 6.1.78 (fixed since 6.1.79 i.e. mount_setattr() returns 0)
- 5.15.164 which is currently the newest of 5.15.y series (i.e. no known working version)
Taking the above findings into consideration, add a new PACKAGECONFIG option removing which enables users to opt-out from using the feature which can cause issues with a bit older kernels. The option is enabled only for class-target here, since it otherwise causes following error during util-linux-native's do_configure task on Debian 11 build host (mountfd_api requirement fails):
| configure: error: libmount_mountfd_support selected, but required mount FDs based API not available
Versions 5.10.223, 5.4.279 and 4.10.317 were also tested with qemuarm64 but the issue was not reproduced with those versions - using strace showed that the mount_setattr call associated with the new mount API problem was not issued with these LTS kernel versions, which seemed to be confirmed also by following libmount debug message in these cases:
415: libmount: HOOK: [0x7fa115e818]: failed to init new API
Note: In addition to the aforementioned, this change was tested also briefly using the current latest kernel versions 6.1.104, 6.6.45 and 6.10.3 that using the old mount API with newest kernels did not introduce any observable regression to the boot flow.
(From OE-Core rev: dc086d9a8613143607af3583c72ed892e20b4d66)
--- meta/recipes-core/util-linux/util-linux_2.39.3.bb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
meta/recipes-core/util-linux/util-linux_2.39.3.bb +11 -1
@@ -90,7 +90,10 @@ EXTRA_OECONF:append = " --disable-hwclock-gplv3" # build host versions during development # PACKAGECONFIG ?= "pcre2" -PACKAGECONFIG:class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'chfn-chsh pam', '', d)}" +PACKAGECONFIG:class-target ?= "\ + libmount-mountfd-support \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'chfn-chsh pam', '', d)} \ +" # inherit manpages requires this to be present, however util-linux does not have # configuration options, and installs manpages always PACKAGECONFIG[manpages] = ""
@@ -106,6 +109,13 @@ PACKAGECONFIG[pcre2] = ",,libpcre2" PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" PACKAGECONFIG[chfn-chsh] = "--enable-chfn-chsh,--disable-chfn-chsh," PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" +# Using the new file descriptors based mount kernel API can cause rootfs remount failure with some older kernels. +# Of currently supported LTS kernels, the old mount API should be used with: +# - versions prior to 6.6.18 in the 6.6.y series. +# - versions prior to 6.1.79 in the 6.1.y series. +# - versions till at least 5.15.164 in the 5.15.y series. +# - with 5.10.y, 5.4.y and 4.19.y series kernels, libmount seemed to use the old API regardless of this option. +PACKAGECONFIG[libmount-mountfd-support] = "--enable-libmount-mountfd-support,--disable-libmount-mountfd-support" EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'"
Signature · 1 line
2.34.1
PATCH 9/12 weston-init: fix weston not starting when xwayland is enabled
In reply to Steve SakomanFrom: Quentin Schulz <[email protected]>
When xwayland PACKAGECONFIG option is set, xwayland is enabled in
weston.ini. However, if the xwayland module isn't installed, weston will
refuse to start with the following error message:
Failed to load module: /usr/lib/libweston-13/xwayland.so: cannot open shared object file: No such file or directory
Therefore, whenever the xwayland PACKAGECONFIG is set, weston-init should depend on weston-xwayland to bring this module in.
--- meta/recipes-graphics/wayland/weston-init.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston-init.bb +1 -1
@@ -83,7 +83,7 @@ USERADD_PACKAGES = "${PN}" # require ${THISDIR}/required-distro-features.inc -RDEPENDS:${PN} = "weston kbd" +RDEPENDS:${PN} = "weston kbd ${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'weston-xwayland', '', d)}" INITSCRIPT_NAME = "weston" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
Signature · 1 line
2.34.1
PATCH 10/12 expect-native: fix do_compile failure with gcc-14
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
In native.bbclass, CFLAGS is overrided by 'CFLAGS = "${BUILD_CFLAGS}"', this make "CFLAGS +=" not work for expect-native, use append to make it also work for native.
--- meta/recipes-devtools/expect/expect_5.45.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/expect/expect_5.45.4.bb +1 -1
@@ -85,4 +85,4 @@ BBCLASSEXTEND = "native nativesdk" # http://errors.yoctoproject.org/Errors/Details/766950/ # expect5.45.4/exp_chan.c:62:5: error: initialization of 'struct Tcl_ChannelTypeVersion_ *' from incompatible pointer type 'int (*)(void *, int)' [-Wincompatible-pointer-types] -CFLAGS += "-Wno-error=incompatible-pointer-types" +CFLAGS:append = " -Wno-error=incompatible-pointer-types"
Signature · 1 line
2.34.1
PATCH 11/12 libcap-ng: update SRC_URI
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
Refer [1], people.redhat.com has certificate issue, so update SRC_URI to fix do_fetch warning
[1] https://github.com/stevegrubb/libcap-ng/issues/56
--- meta/recipes-support/libcap-ng/libcap-ng-python_0.8.5.bb | 2 -- meta/recipes-support/libcap-ng/libcap-ng.inc | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-)
meta/recipes-support/libcap-ng/libcap-ng-python_0.8.5.bb +0 -2
@@ -9,8 +9,6 @@ inherit lib_package autotools python3targetconfig # drop setuptools when version > 0.8.3 is released; it's needed only for distutils DEPENDS += "libcap-ng python3 swig-native python3-setuptools-native" -S = "${WORKDIR}/libcap-ng-${PV}" - EXTRA_OECONF += "--with-python3" do_install:append() {
meta/recipes-support/libcap-ng/libcap-ng.inc +6 -2
@@ -7,11 +7,15 @@ LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" -SRC_URI = "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \ +SRC_URI = "git://github.com/stevegrubb/libcap-ng.git;protocol=https;branch=master \ file://0001-Fix-python-path-when-invoking-py-compile-54.patch \ " +SRCREV = "f5d39702622208b3ada064d7b2eaeaf1454c9bd3" +S = "${WORKDIR}/git" -SRC_URI[sha256sum] = "3ba5294d1cbdfa98afaacfbc00b6af9ed2b83e8a21817185dfd844cc8c7ac6ff" +do_configure:prepend() { + touch ${S}/NEWS +} EXTRA_OECONF:append:class-target = " --with-capability_header=${STAGING_INCDIR}/linux/capability.h" EXTRA_OECONF:append:class-nativesdk = " --with-capability_header=${STAGING_INCDIR}/linux/capability.h"
Signature · 1 line
2.34.1
PATCH 12/12 linux-firmware: add a package for ath12k firmware
In reply to Steve SakomanFrom: Bartosz Golaszewski <[email protected]>
Add the firmware package for the ATH12K module.
--- .../linux-firmware/linux-firmware_20240312.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-kernel/linux-firmware/linux-firmware_20240312.bb +7 -1
@@ -322,7 +322,7 @@ PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \ ${PN}-cnm-license ${PN}-cnm \ ${PN}-atheros-license ${PN}-ar5523 ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k ${PN}-ath3k \ ${PN}-carl9170 \ - ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k ${PN}-ath11k ${PN}-qca \ + ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k ${PN}-ath11k ${PN}-ath12k ${PN}-qca \ \ ${PN}-imx-sdma-license ${PN}-imx-sdma-imx6q ${PN}-imx-sdma-imx7d \ \
@@ -487,6 +487,11 @@ FILES:${PN}-ath11k = " \ ${nonarch_base_libdir}/firmware/ath11k \ " +FILES:${PN}-ath12k = " \ + ${nonarch_base_libdir}/firmware/ath12k \ +" +RDEPENDS:${PN} += "${PN}-ath12k" + FILES:${PN}-qca = " \ ${nonarch_base_libdir}/firmware/qca \ "
@@ -494,6 +499,7 @@ FILES:${PN}-qca = " \ RDEPENDS:${PN}-ar3k += "${PN}-ar3k-license ${PN}-atheros-license" RDEPENDS:${PN}-ath10k += "${PN}-ath10k-license" RDEPENDS:${PN}-ath11k += "${PN}-ath10k-license" +RDEPENDS:${PN}-ath12k += "${PN}-ath10k-license" RDEPENDS:${PN}-qca += "${PN}-ath10k-license" # For ralink
Signature · 1 line
2.34.1