Skip to contentSkip to conversation

Patch review

PATCH New Steve Sakoman 1 participant 8 messages Nov 6, 2024

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please review this set of changes for styhead and have comments back by end of day Friday, November 8

Passed a-full on autobuilder:

https://valkyrie.yoctoproject.org/#/builders/29/builds/390

The following changes since commit d5ba3f78f340d4627cf33eca14969d61b00f5766:

oeqa/selftest: Update the BB_HASHSERVE_UPSTREAM (2024-10-31 13:23:59 +0000)

are available in the Git repository at:

https://git.openembedded.org/openembedded-core-contrib stable/styhead-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/styhead-nut

Khem Raj (1):
ffmpeg: Disable asm optimizations on x86

Ola x Nilsson (1):
glibc: Fix missing randomness in __gen_tempname

Rohini Sangam (1):
vim: Upgrade 9.1.0698 -> 9.1.0764

Ross Burton (2):
ffmpeg: nasm is x86 only, so only DEPEND if x86
ffmpeg: no need for textrel INSANE_SKIP

Wang Mingyu (1):
orc: upgrade 0.4.39 -> 0.4.40

aszh07 (1):
ffmpeg: Add "libswresample libavcodec" to CVE_PRODUCT

 ...ndomness-in-__gen_tempname-bug-32214.patch | 29 +++++++++++++++++++
 meta/recipes-core/glibc/glibc_2.40.bb         |  1 +
 .../orc/{orc_0.4.39.bb => orc_0.4.40.bb}      |  2 +-
 .../recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 15 ++++------
 meta/recipes-support/vim/vim.inc              |  4 +--
 5 files changed, 38 insertions(+), 13 deletions(-)
 create mode 100644 meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch
 rename meta/recipes-devtools/orc/{orc_0.4.39.bb => orc_0.4.40.bb} (92%)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/7 vim: Upgrade 9.1.0698 -> 9.1.0764

From: 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

(cherry picked from commit 2f0e5e63399e544063c79b0b1f9555c820b0604c)
---
 meta/recipes-support/vim/vim.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/vim/vim.inc +2 -2
index f87f4dcbfa..cf36f4087b 100644
@@ -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
#2 lore raw

PATCH 2/7 orc: upgrade 0.4.39 -> 0.4.40

In reply to Steve Sakoman

From: 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()

(cherry picked from commit ed7e4eb12491968c5f962b7e89d557c2c6d86a33)
---
 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
similarity index 92%
rename from meta/recipes-devtools/orc/orc_0.4.39.bb
rename to meta/recipes-devtools/orc/orc_0.4.40.bb
index 320abf536a..e437831cd7 100644
@@ -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
#3 lore raw

PATCH 3/7 ffmpeg: nasm is x86 only, so only DEPEND if x86

In reply to Steve Sakoman

From: Ross Burton <[email protected]>

No need to depend on nasm if we're not going to use it.

(cherry picked from commit b99ea7f130c3f945af9a09a6ecf85b6ff8f4b710)
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb +2 -1
index 9e60b5cd23..b16bd51dbd 100644
@@ -46,7 +46,8 @@ ARM_INSTRUCTION_SET:armv6 = "arm"
 # libpostproc was previously packaged from a separate recipe
 PROVIDES = "libav libpostproc"
 
-DEPENDS = "nasm-native"
+DEPENDS:append:x86 = " nasm-native"
+DEPENDS:append:x86-64 = " nasm-native"
 
 inherit autotools pkgconfig
 
Signature · 1 line
2.34.1
#4 lore raw

PATCH 4/7 ffmpeg: no need for textrel INSANE_SKIP

In reply to Steve Sakoman

From: Ross Burton <[email protected]>

It appears in testing that modern ffmpeg no longer needs to disable PIC, so there's no need to ignore textrel warnings.

(cherry picked from commit 98d577fef75d54a59eeacaabb4a45e44b2f6832e)
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 10 ----------
 1 file changed, 10 deletions(-)
meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb +0 -10
index b16bd51dbd..af66104ebf 100644
@@ -181,13 +181,3 @@ FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}"
 FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
 FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
 FILES:${PN}-examples = "${datadir}/${PN}/examples"
-
-# ffmpeg disables PIC on some platforms (e.g. x86-32)
-INSANE_SKIP:${MLPREFIX}libavcodec = "textrel"
-INSANE_SKIP:${MLPREFIX}libavdevice = "textrel"
-INSANE_SKIP:${MLPREFIX}libavfilter = "textrel"
-INSANE_SKIP:${MLPREFIX}libavformat = "textrel"
-INSANE_SKIP:${MLPREFIX}libavutil = "textrel"
-INSANE_SKIP:${MLPREFIX}libswscale = "textrel"
-INSANE_SKIP:${MLPREFIX}libswresample = "textrel"
-INSANE_SKIP:${MLPREFIX}libpostproc = "textrel"
Signature · 1 line
2.34.1
#5 lore raw

PATCH 5/7 ffmpeg: Disable asm optimizations on x86

In reply to Steve Sakoman

From: Khem Raj <[email protected]>

disable asm code if PIC is required, as the provided asm decidedly is not PIC for x86.

Cc Ross Burton <[email protected]>
(cherry picked from commit 941fc40ca971f87e61c19e5a0703caa304ec7547)
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb +2 -0
index af66104ebf..3c66851b8d 100644
@@ -129,6 +129,8 @@ EXTRA_OECONF = " \
 "
 
 EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
+# --enable-pic is used and x86 assembly is not PIC on x86
+EXTRA_OECONF:append:x86 = " --disable-asm"
 
 EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
 EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
Signature · 1 line
2.34.1
#6 lore raw

PATCH 6/7 ffmpeg: Add "libswresample libavcodec" to CVE_PRODUCT

In reply to Steve Sakoman

From: aszh07 <[email protected]>

Currently, CVE_PRODUCT only detects vulnerabilities where the product is "ffmpeg".

However, there are also vulnerabilities where the product is "libswresample", and "libavcodec" as shown below.
https://app.opencve.io/vendors/?vendor=ffmpeg

Therefore, add "libswresample libavcodec" to CVE_PRODUCT to detect vulnerabilities where the product is "libswresample libavcodec" as well.

(cherry picked from commit 9684eba5c543de229108008e29afd1dd021a9799)
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb +2 -0
index 3c66851b8d..bb6b71735c 100644
@@ -183,3 +183,5 @@ FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}"
 FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
 FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
 FILES:${PN}-examples = "${datadir}/${PN}/examples"
+
+CVE_PRODUCT = "ffmpeg libswresample libavcodec"
Signature · 1 line
2.34.1
#7 lore raw

PATCH 7/7 glibc: Fix missing randomness in __gen_tempname

In reply to Steve Sakoman

From: Ola x Nilsson <[email protected]>

Backport the fix for glibc bug 32214.

The missing randomness in early boot may cause some systemd services to fail when they occasionally try to create tempdirs like /run/systemd/namespace-aaaaaa at the same time.
The error messages can contain things like
"Failed to set up mount namespacing".

---
 ...ndomness-in-__gen_tempname-bug-32214.patch | 29 +++++++++++++++++++
 meta/recipes-core/glibc/glibc_2.40.bb         |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch
meta/recipes-core/glibc/glibc/0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch new file +29 -0
new file mode 100644
index 0000000000..c9f3e32f58
@@ -0,0 +1,29 @@
+From 9d30d58c32fe9d5f8ec6cda79fb11159e6789bcf Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <[email protected]>
+Date: Wed, 25 Sep 2024 11:49:30 +0200
+Subject: [PATCH] Fix missing randomness in __gen_tempname (bug 32214)
+
+Make sure to update the random value also if getrandom fails.
+
+Fixes: 686d542025 ("posix: Sync tempname with gnulib")
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=5f62cf88c4530c11904482775b7582bd7f6d80d2]
+
+Signed-off-by: Ola x Nilsson <[email protected]>
+---
+ sysdeps/posix/tempname.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
+index c00fe0c181..fc30958a0c 100644
+--- a/sysdeps/posix/tempname.c
++++ b/sysdeps/posix/tempname.c
+@@ -117,6 +117,8 @@ random_bits (random_value *r, random_value s)
+      succeed.  */
+ #if !_LIBC
+   *r = mix_random_values (v, clock ());
++#else
++  *r = v;
+ #endif
+   return false;
+ }
meta/recipes-core/glibc/glibc_2.40.bb +1 -0
index 71b89ac9ff..3e855b19d8 100644
@@ -53,6 +53,7 @@ SRC_URI =  "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \
            file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \
            file://0023-tests-Skip-2-qemu-tests-that-can-hang-in-oe-selftest.patch \
+           file://0024-Fix-missing-randomness-in-__gen_tempname-bug-32214.patch \
 "
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.34.1