Patch review
cover Patch review
Please review this set of changes for kirkstone and have comments back by end of day Monday, February 5
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6513
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6513
The following changes since commit a744a897f0ea7d34c31c024c13031221f9a85f24:
build-appliance-image: Update to kirkstone head revision (2024-01-25 04:06:50 -1000)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut
Alexander Kanavin (1):
python3-jinja2: upgrade 3.1.1 -> 3.1.2
Lee Chee Yang (1):
xwayland: Fix CVE-2023-6377 CVE-2023-6478
Ludovic Jozeau (1):
image-live.bbclass: LIVE_ROOTFS_TYPE support compression
Wang Mingyu (1):
python3-jinja2: upgrade 3.1.2 -> 3.1.3
meta/classes/image-live.bbclass | 2 +-
...inja2_3.1.1.bb => python3-jinja2_3.1.3.bb} | 2 +-
.../xwayland/xwayland/CVE-2023-6377.patch | 82 +++++++++++++++++++
.../xwayland/xwayland/CVE-2023-6478.patch | 66 +++++++++++++++
.../xwayland/xwayland_22.1.8.bb | 2 +
5 files changed, 152 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/python/{python3-jinja2_3.1.1.bb => python3-jinja2_3.1.3.bb} (92%)
create mode 100644 meta/recipes-graphics/xwayland/xwayland/CVE-2023-6377.patch
create mode 100644 meta/recipes-graphics/xwayland/xwayland/CVE-2023-6478.patchSignature · 1 line
2.34.1
PATCH 1/4 xwayland: Fix CVE-2023-6377 CVE-2023-6478
From: Lee Chee Yang <[email protected]>
--- .../xwayland/xwayland/CVE-2023-6377.patch | 82 +++++++++++++++++++ .../xwayland/xwayland/CVE-2023-6478.patch | 66 +++++++++++++++ .../xwayland/xwayland_22.1.8.bb | 2 + 3 files changed, 150 insertions(+) create mode 100644 meta/recipes-graphics/xwayland/xwayland/CVE-2023-6377.patch create mode 100644 meta/recipes-graphics/xwayland/xwayland/CVE-2023-6478.patch
meta/recipes-graphics/xwayland/xwayland/CVE-2023-6377.patch new file +82 -0
@@ -0,0 +1,82 @@ +CVE: CVE-2023-6377 +Upstream-Status: Backport [ https://gitlab.freedesktop.org/xorg/xserver/-/commit/19e9f199950aaa4b9b7696936d1b067475da999c ] +Signed-off-by: Lee Chee Yang <[email protected]> + + +From 19e9f199950aaa4b9b7696936d1b067475da999c Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <[email protected]> +Date: Tue, 28 Nov 2023 15:19:04 +1000 +Subject: [PATCH] Xi: allocate enough XkbActions for our buttons + +button->xkb_acts is supposed to be an array sufficiently large for all +our buttons, not just a single XkbActions struct. Allocating +insufficient memory here means when we memcpy() later in +XkbSetDeviceInfo we write into memory that wasn't ours to begin with, +leading to the usual security ooopsiedaisies. + +CVE-2023-6377, ZDI-CAN-22412, ZDI-CAN-22413 + +This vulnerability was discovered by: +Jan-Niklas Sohn working with Trend Micro Zero Day Initiative + +(cherry picked from commit 0c1a93d319558fe3ab2d94f51d174b4f93810afd) +--- + Xi/exevents.c | 12 ++++++------ + dix/devices.c | 10 ++++++++++ + 2 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/Xi/exevents.c b/Xi/exevents.c +index dcd4efb3bc..54ea11a938 100644 +--- a/Xi/exevents.c ++++ b/Xi/exevents.c +@@ -611,13 +611,13 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) + } + + if (from->button->xkb_acts) { +- if (!to->button->xkb_acts) { +- to->button->xkb_acts = calloc(1, sizeof(XkbAction)); +- if (!to->button->xkb_acts) +- FatalError("[Xi] not enough memory for xkb_acts.\n"); +- } ++ size_t maxbuttons = max(to->button->numButtons, from->button->numButtons); ++ to->button->xkb_acts = xnfreallocarray(to->button->xkb_acts, ++ maxbuttons, ++ sizeof(XkbAction)); ++ memset(to->button->xkb_acts, 0, maxbuttons * sizeof(XkbAction)); + memcpy(to->button->xkb_acts, from->button->xkb_acts, +- sizeof(XkbAction)); ++ from->button->numButtons * sizeof(XkbAction)); + } + else { + free(to->button->xkb_acts); +diff --git a/dix/devices.c b/dix/devices.c +index 7150734a58..20fef16923 100644 +--- a/dix/devices.c ++++ b/dix/devices.c +@@ -2530,6 +2530,8 @@ RecalculateMasterButtons(DeviceIntPtr slave) + + if (master->button && master->button->numButtons != maxbuttons) { + int i; ++ int last_num_buttons = master->button->numButtons; ++ + DeviceChangedEvent event = { + .header = ET_Internal, + .type = ET_DeviceChanged, +@@ -2540,6 +2542,14 @@ RecalculateMasterButtons(DeviceIntPtr slave) + }; + + master->button->numButtons = maxbuttons; ++ if (last_num_buttons < maxbuttons) { ++ master->button->xkb_acts = xnfreallocarray(master->button->xkb_acts, ++ maxbuttons, ++ sizeof(XkbAction)); ++ memset(&master->button->xkb_acts[last_num_buttons], ++ 0, ++ (maxbuttons - last_num_buttons) * sizeof(XkbAction)); ++ } + + memcpy(&event.buttons.names, master->button->labels, maxbuttons * + sizeof(Atom)); +-- +GitLab +
meta/recipes-graphics/xwayland/xwayland/CVE-2023-6478.patch new file +66 -0
66 lines not on this page · raw message
meta/recipes-graphics/xwayland/xwayland_22.1.8.bb +2 -0
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880" SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz \ file://CVE-2023-5367.patch \ + file://CVE-2023-6377.patch \ + file://CVE-2023-6478.patch \ " SRC_URI[sha256sum] = "d11eeee73290b88ea8da42a7d9350dedfaba856ce4ae44e58c045ad9ecaa2f73"
Signature · 1 line
2.34.1
PATCH 2/4 python3-jinja2: upgrade 3.1.1 -> 3.1.2
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
(cherry picked from OE-Core rev: 1e58fa1fff649a4ab07290d2b0e5a8d69d51ef16)
---
.../python/{python3-jinja2_3.1.1.bb => python3-jinja2_3.1.2.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-jinja2_3.1.1.bb => python3-jinja2_3.1.2.bb} (92%)meta/recipes-devtools/python/python3-jinja2_3.1.2.bb renamed from meta/recipes-devtools/python/python3-jinja2_3.1.1.bb +1 -1
@@ -4,7 +4,7 @@ HOMEPAGE = "https://pypi.org/project/Jinja2/" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462" -SRC_URI[sha256sum] = "640bed4bb501cbd17194b3cace1dc2126f5b619cf068a726b98192a0fde74ae9" +SRC_URI[sha256sum] = "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852" PYPI_PACKAGE = "Jinja2"
Signature · 1 line
2.34.1
PATCH 3/4 python3-jinja2: upgrade 3.1.2 -> 3.1.3
In reply to Steve SakomanFrom: Wang Mingyu <[email protected]>
Changelog:
==========
-Fix compiler error when checking if required blocks in parent templates are empty. -xmlattr filter does not allow keys with spaces.
-Make error messages stemming from invalid nesting of {% trans %} blocks more helpful
(cherry picked from OE-Core rev: 8a0524464583d69df7746253f5020c2c125a8e1f)
---
.../python/{python3-jinja2_3.1.2.bb => python3-jinja2_3.1.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-jinja2_3.1.2.bb => python3-jinja2_3.1.3.bb} (92%)meta/recipes-devtools/python/python3-jinja2_3.1.3.bb renamed from meta/recipes-devtools/python/python3-jinja2_3.1.2.bb +1 -1
@@ -4,7 +4,7 @@ HOMEPAGE = "https://pypi.org/project/Jinja2/" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462" -SRC_URI[sha256sum] = "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852" +SRC_URI[sha256sum] = "ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90" PYPI_PACKAGE = "Jinja2"
Signature · 1 line
2.34.1
PATCH 4/4 image-live.bbclass: LIVE_ROOTFS_TYPE support compression
In reply to Steve SakomanFrom: Ludovic Jozeau <[email protected]>
The task for fstypes with compression is the same as the task for the uncompressed fstypes, e.g. when adding tar.xz to IMAGE_FSTYPES, it will be included into the do_image_tar task and not creating a separate do_image_tar.xz task.
This commit fixes LIVE_ROOTFS_TYPE with compressed fstypes by depending on the actual task instead of the non-existent do_image_<fstype>.<compression> task.
Fixes [YOCTO #15331]
--- meta/classes/image-live.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image-live.bbclass +1 -1
@@ -30,7 +30,7 @@ do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \ virtual/kernel:do_deploy \ ${MLPREFIX}syslinux:do_populate_sysroot \ syslinux-native:do_populate_sysroot \ - ${@'%s:do_image_%s' % (d.getVar('PN'), d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')) if d.getVar('ROOTFS') else ''} \ + ${@'%s:do_image_%s' % (d.getVar('PN'), d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_').split('.')[0]) if d.getVar('ROOTFS') else ''} \ "
Signature · 1 line
2.34.1