Patch review
cover Patch review
Please review this set of patches for dunfell and have comments back by end of day Thursday.
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/3805
The following changes since commit 135adeb82c9303c26193bb6f6bd3bc696793aa62:
archiver: don't use machine variables in shared recipes (2022-06-15 06:40:10 -1000)
are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contrib stable/dunfell-nut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut
Chee Yang Lee (1):
dpkg: update to 1.19.8
Dmitry Baryshkov (2):
linux-firmware: add support for building snapshots
linux-firmware: upgrade 20220509 -> 20220610
Hitendra Prajapati (2):
python-pip: CVE-2021-3572 Incorrect handling of unicode separators in
git references
golang: CVE-2021-44717 syscall: don't close fd 0 on ForkExec error
Nick Potenski (1):
systemd: systemd-systemctl: Support instance conf files during enable
.../systemd/systemd-systemctl/systemctl | 14 +++-
.../dpkg/{dpkg_1.19.7.bb => dpkg_1.19.8.bb} | 4 +-
meta/recipes-devtools/go/go-1.14.inc | 1 +
.../go/go-1.14/CVE-2021-44717.patch | 83 ++++++++++++++++++
.../python/python3-pip/CVE-2021-3572.patch | 48 +++++++++++
.../python/python3-pip_20.0.2.bb | 1 +
...01-Makefile-replace-mkdir-by-install.patch | 84 -------------------
...20220509.bb => linux-firmware_20220610.bb} | 11 ++-
8 files changed, 154 insertions(+), 92 deletions(-)
rename meta/recipes-devtools/dpkg/{dpkg_1.19.7.bb => dpkg_1.19.8.bb} (86%)
create mode 100644 meta/recipes-devtools/go/go-1.14/CVE-2021-44717.patch
create mode 100644 meta/recipes-devtools/python/python3-pip/CVE-2021-3572.patch
delete mode 100644 meta/recipes-kernel/linux-firmware/files/0001-Makefile-replace-mkdir-by-install.patch
rename meta/recipes-kernel/linux-firmware/{linux-firmware_20220509.bb => linux-firmware_20220610.bb} (99%)Signature · 1 line
2.25.1
PATCH 1/6 python-pip: CVE-2021-3572 Incorrect handling of unicode separators in git references
From: Hitendra Prajapati <[email protected]>
Source: https://github.com/pypa/pip
MR: 113864
Type: Security Fix
Disposition: Backport from https://github.com/pypa/pip/commit/e46bdda9711392fec0c45c1175bae6db847cb30b
ChangeID: 717948e217d6219d1f03afb4d984342d7dea4636
Description:
CVE-2021-3572 python-pip: Incorrect handling of unicode separators in git references.
--- .../python/python3-pip/CVE-2021-3572.patch | 48 +++++++++++++++++++ .../python/python3-pip_20.0.2.bb | 1 + 2 files changed, 49 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-pip/CVE-2021-3572.patch
meta/recipes-devtools/python/python3-pip/CVE-2021-3572.patch new file +48 -0
@@ -0,0 +1,48 @@ +From c4fd13410b9a219f77fc30775d4a0ac9f69725bd Mon Sep 17 00:00:00 2001 +From: Hitendra Prajapati <[email protected]> +Date: Thu, 16 Jun 2022 09:52:43 +0530 +Subject: [PATCH] CVE-2021-3572 + +Upstream-Status: Backport [https://github.com/pypa/pip/commit/e46bdda9711392fec0c45c1175bae6db847cb30b] +CVE: CVE-2021-3572 +Signed-off-by: Hitendra Prajapati <[email protected]> +--- + news/9827.bugfix.rst | 3 +++ + src/pip/_internal/vcs/git.py | 10 ++++++++-- + 2 files changed, 11 insertions(+), 2 deletions(-) + create mode 100644 news/9827.bugfix.rst + +diff --git a/news/9827.bugfix.rst b/news/9827.bugfix.rst +new file mode 100644 +index 0000000..e0d27c3 +--- /dev/null ++++ b/news/9827.bugfix.rst +@@ -0,0 +1,3 @@ ++**SECURITY**: Stop splitting on unicode separators in git references, ++which could be maliciously used to install a different revision on the ++repository. +diff --git a/src/pip/_internal/vcs/git.py b/src/pip/_internal/vcs/git.py +index 7483303..1b895f6 100644 +--- a/src/pip/_internal/vcs/git.py ++++ b/src/pip/_internal/vcs/git.py +@@ -137,9 +137,15 @@ class Git(VersionControl): + output = cls.run_command(['show-ref', rev], cwd=dest, + show_stdout=False, on_returncode='ignore') + refs = {} +- for line in output.strip().splitlines(): ++ # NOTE: We do not use splitlines here since that would split on other ++ # unicode separators, which can be maliciously used to install a ++ # different revision. ++ for line in output.strip().split("\n"): ++ line = line.rstrip("\r") ++ if not line: ++ continue + try: +- sha, ref = line.split() ++ ref_sha, ref_name = line.split(" ", maxsplit=2) + except ValueError: + # Include the offending line to simplify troubleshooting if + # this error ever occurs. +-- +2.25.1 +
meta/recipes-devtools/python/python3-pip_20.0.2.bb +1 -0
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ba06d529c955048e5ddd7c45459eb2e" DEPENDS += "python3 python3-setuptools-native" +SRC_URI = "file://CVE-2021-3572.patch " SRC_URI[md5sum] = "7d42ba49b809604f0df3d55df1c3fd86" SRC_URI[sha256sum] = "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f"
Signature · 1 line
2.25.1
PATCH 2/6 golang: CVE-2021-44717 syscall: don't close fd 0 on ForkExec error
In reply to Steve SakomanFrom: Hitendra Prajapati <[email protected]>
Source: https://github.com/golang/go
MR: 114884
Type: Security Fix
Disposition: Backport from https://github.com/golang/go/commit/44a3fb49
ChangeID: 7b28553d4e23828b20c3357b1cca79ee3ca18058
Description:
CVE-2021-44717 golang: syscall: don't close fd 0 on ForkExec error.
--- meta/recipes-devtools/go/go-1.14.inc | 1 + .../go/go-1.14/CVE-2021-44717.patch | 83 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 meta/recipes-devtools/go/go-1.14/CVE-2021-44717.patch
meta/recipes-devtools/go/go-1.14.inc +1 -0
@@ -22,6 +22,7 @@ SRC_URI += "\ file://CVE-2021-38297.patch \ file://CVE-2022-23806.patch \ file://CVE-2022-23772.patch \ + file://CVE-2021-44717.patch \ " SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
meta/recipes-devtools/go/go-1.14/CVE-2021-44717.patch new file +83 -0
83 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 3/6 dpkg: update to 1.19.8
In reply to Steve SakomanFrom: Chee Yang Lee <[email protected]>
update include fixes for CVE-2022-1664.
---
meta/recipes-devtools/dpkg/{dpkg_1.19.7.bb => dpkg_1.19.8.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/dpkg/{dpkg_1.19.7.bb => dpkg_1.19.8.bb} (86%)meta/recipes-devtools/dpkg/dpkg_1.19.8.bb renamed from meta/recipes-devtools/dpkg/dpkg_1.19.7.bb +2 -2
@@ -18,5 +18,5 @@ SRC_URI_append_class-native = " \ file://tweak-options-require-tar-1.27.patch \ " -SRC_URI[md5sum] = "60f57c5494e6dfa177504d47bfa0e383" -SRC_URI[sha256sum] = "4c27fededf620c0aa522fff1a48577ba08144445341257502e7730f2b1a296e8" +SRC_URI[md5sum] = "9d170c8baa1aa36b09698c909f304508" +SRC_URI[sha256sum] = "2632c00b0cf0ea19ed7bd6700e6ec5faca93f0045af629d356dc03ad74ae6f10"
Signature · 1 line
2.25.1
PATCH 4/6 systemd: systemd-systemctl: Support instance conf files during enable
In reply to Steve SakomanFrom: Nick Potenski <[email protected]>
Add ability to parse instance-specific conf files when enabling an instance of a templated unit during postinstall.
--- .../systemd/systemd-systemctl/systemctl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
meta/recipes-core/systemd/systemd-systemctl/systemctl +11 -3
@@ -11,6 +11,7 @@ import re import sys from collections import namedtuple +from itertools import chain from pathlib import Path version = 1.0
@@ -25,12 +26,16 @@ locations = list() class SystemdFile(): """Class representing a single systemd configuration file""" - def __init__(self, root, path): + def __init__(self, root, path, instance_unit_name): self.sections = dict() self._parse(root, path) dirname = os.path.basename(path.name) + ".d" for location in locations: - for path2 in sorted((root / location / "system" / dirname).glob("*.conf")): + files = (root / location / "system" / dirname).glob("*.conf") + if instance_unit_name: + inst_dirname = instance_unit_name + ".d" + files = chain(files, (root / location / "system" / inst_dirname).glob("*.conf")) + for path2 in sorted(files): self._parse(root, path2) def _parse(self, root, path):
@@ -193,8 +198,11 @@ class SystemdUnit(): # if we're enabling an instance, first extract the actual instance # then figure out what the template unit is template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit) + instance_unit_name = None if template: instance = template.group('instance') + if instance != "": + instance_unit_name = self.unit unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1) else: instance = None
@@ -206,7 +214,7 @@ class SystemdUnit(): # ignore aliases return - config = SystemdFile(self.root, path) + config = SystemdFile(self.root, path, instance_unit_name) if instance == "": try: default_instance = config.get('Install', 'DefaultInstance')[0]
Signature · 1 line
2.25.1
PATCH 5/6 linux-firmware: add support for building snapshots
In reply to Steve SakomanFrom: Dmitry Baryshkov <[email protected]>
In some cases it is useful to be able to test the snapshot of linux-firmware (e.g. to test if the updated firmware works on the particular hardware). Allow building the linux-firmware snapshots.
To switch to the most recent branch, add the following lines to the local.conf file:
PREFERRED_VERSION_linux-firmware = "1:20220509+git%" SRCREV:class-devupstream = "${AUTOREV}" WHENCE_CHKSUM:class-devupstream:pn-linux-firmware = "4288aad55d189fa225d492526b8406d5"
--- .../linux-firmware/linux-firmware_20220509.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-kernel/linux-firmware/linux-firmware_20220509.bb +7 -1
@@ -69,6 +69,7 @@ LICENSE = "\ & WHENCE \ " +WHENCE_CHKSUM = "d3eb82686904888f8bbbe8d865371404" LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \ file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
@@ -132,7 +133,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \ file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \ - file://WHENCE;md5=d3eb82686904888f8bbbe8d865371404 \ + file://WHENCE;md5=${WHENCE_CHKSUM} \ " # These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -208,6 +209,11 @@ SRC_URI = "\ file://0001-Makefile-replace-mkdir-by-install.patch \ " +BBCLASSEXTEND = "devupstream:target" +SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git;protocol=https;branch=main" +# Pin this to the 20220509 release, override this in local.conf +SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae" + SRC_URI[sha256sum] = "376e0b3d7b4f8aaa2abf7f5ab74803dcf14b06b94e3d841b1467cd9a2848255e" inherit allarch
Signature · 1 line
2.25.1
PATCH 6/6 linux-firmware: upgrade 20220509 -> 20220610
In reply to Steve SakomanFrom: Dmitry Baryshkov <[email protected]>
Drop 0001-Makefile-replace-mkdir-by-install.patch merged upstream.
License-Update: additional files
---
...01-Makefile-replace-mkdir-by-install.patch | 84 -------------------
...20220509.bb => linux-firmware_20220610.bb} | 5 +-
2 files changed, 2 insertions(+), 87 deletions(-)
delete mode 100644 meta/recipes-kernel/linux-firmware/files/0001-Makefile-replace-mkdir-by-install.patch
rename meta/recipes-kernel/linux-firmware/{linux-firmware_20220509.bb => linux-firmware_20220610.bb} (99%)meta/recipes-kernel/linux-firmware/files/0001-Makefile-replace-mkdir-by-install.patch deleted +0 -84
@@ -1,84 +0,0 @@ -From 71514e74f35f2b51ca24062573d6d913525b30db Mon Sep 17 00:00:00 2001 -From: Konrad Weihmann <[email protected]> -Date: Mon, 9 May 2022 12:57:57 +0200 -Subject: [PATCH] Makefile: replace mkdir by install - -mkdir -p creates paths that are bound to user's settings and therefore -can lead to different file mode bits of the base paths accross different -machines. -Use install instead, as this tool is not prone to such behavior. - -Signed-off-by: Konrad Weihmann <[email protected]> -Upstream-Status: Submitted [https://lore.kernel.org/linux-firmware/PR2PR09MB310088EA719E6D7CA5C268F1A8C69@PR2PR09MB3100.eurprd09.prod.outlook.com/] ---- - Makefile | 2 +- - carl9170fw/toolchain/Makefile | 4 ++-- - copy-firmware.sh | 6 +++--- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/Makefile b/Makefile -index e1c362f..83a0ec6 100644 ---- a/Makefile -+++ b/Makefile -@@ -9,5 +9,5 @@ check: - @./check_whence.py - - install: -- mkdir -p $(DESTDIR)$(FIRMWAREDIR) -+ install -d $(DESTDIR)$(FIRMWAREDIR) - ./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR) -diff --git a/carl9170fw/toolchain/Makefile b/carl9170fw/toolchain/Makefile -index 2b25ffe..aaea8e8 100644 ---- a/carl9170fw/toolchain/Makefile -+++ b/carl9170fw/toolchain/Makefile -@@ -46,14 +46,14 @@ src/gcc-$(GCC_VER): src/$(GCC_TAR) src/newlib-$(NEWLIB_VER) - ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/libgloss $@ - - binutils: src/binutils-$(BINUTILS_VER) -- mkdir -p build/binutils -+ install -d build/binutils - cd build/binutils; \ - $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst; \ - $(MAKE) -j3; \ - $(MAKE) install - - gcc: src/gcc-$(GCC_VER) binutils -- mkdir -p build/gcc -+ install -d build/gcc - cd build/gcc; \ - $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst -enable-languages=c --without-pkgversion --with-newlib; \ - $(MAKE) -j3; \ -diff --git a/copy-firmware.sh b/copy-firmware.sh -index 9b46b63..bbacb92 100755 ---- a/copy-firmware.sh -+++ b/copy-firmware.sh -@@ -34,7 +34,7 @@ done - grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do - test -f "$f" || continue - $verbose "copying file $f" -- mkdir -p $destdir/$(dirname "$f") -+ install -d $destdir/$(dirname "$f") - cp -d "$f" $destdir/"$f" - done - -@@ -42,7 +42,7 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d - if test -L "$f"; then - test -f "$destdir/$f" && continue - $verbose "copying link $f" -- mkdir -p $destdir/$(dirname "$f") -+ install -d $destdir/$(dirname "$f") - cp -d "$f" $destdir/"$f" - - if test "x$d" != "x"; then -@@ -63,7 +63,7 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d - fi - else - $verbose "creating link $f -> $d" -- mkdir -p $destdir/$(dirname "$f") -+ install -d $destdir/$(dirname "$f") - ln -sf "$d" "$destdir/$f" - fi - done --- -2.25.1 -
meta/recipes-kernel/linux-firmware/linux-firmware_20220610.bb renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20220509.bb +2 -3
@@ -69,7 +69,7 @@ LICENSE = "\ & WHENCE \ " -WHENCE_CHKSUM = "d3eb82686904888f8bbbe8d865371404" +WHENCE_CHKSUM = "385947b278a6646ae4c3d39ba8c9b1bb" LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \ file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
@@ -206,7 +206,6 @@ PE = "1" SRC_URI = "\ ${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz \ - file://0001-Makefile-replace-mkdir-by-install.patch \ " BBCLASSEXTEND = "devupstream:target"
@@ -214,7 +213,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw # Pin this to the 20220509 release, override this in local.conf SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae" -SRC_URI[sha256sum] = "376e0b3d7b4f8aaa2abf7f5ab74803dcf14b06b94e3d841b1467cd9a2848255e" +SRC_URI[sha256sum] = "faf3aedf89530e61f4fa1e8c7303dead9127cc24416945647797d079feb12837" inherit allarch
Signature · 1 line
2.25.1