mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
Compare commits
36 Commits
yocto-3.1.
...
yocto-3.1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bab87089ad | ||
|
|
d91c3c1242 | ||
|
|
a7ed388d44 | ||
|
|
b93817cc62 | ||
|
|
33e9349a4a | ||
|
|
036558afb0 | ||
|
|
7ae33b3e6f | ||
|
|
733d919af4 | ||
|
|
f42e2c212f | ||
|
|
19054d7f1b | ||
|
|
6b21362c83 | ||
|
|
aa9597253b | ||
|
|
c8d13f159e | ||
|
|
311a1d5935 | ||
|
|
7a5aa92590 | ||
|
|
09a8d85815 | ||
|
|
34d7cb536a | ||
|
|
f51b7f407d | ||
|
|
cd4656d9b2 | ||
|
|
602a3ebec7 | ||
|
|
7edbc14f1a | ||
|
|
b2cec0246c | ||
|
|
2aeb276dd5 | ||
|
|
37a03beb6d | ||
|
|
f8902083fd | ||
|
|
6828c2c8db | ||
|
|
ed5cd048ae | ||
|
|
1824a583fa | ||
|
|
967c2d4145 | ||
|
|
a540df3791 | ||
|
|
eda8a27490 | ||
|
|
397d3430bf | ||
|
|
f5051dae9f | ||
|
|
97ffdc1519 | ||
|
|
f668b3ab56 | ||
|
|
79dcce4413 |
@@ -1,13 +1,13 @@
|
||||
DISTRO : "3.1.25"
|
||||
DISTRO : "3.1.26"
|
||||
DISTRO_NAME_NO_CAP : "dunfell"
|
||||
DISTRO_NAME : "Dunfell"
|
||||
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
|
||||
YOCTO_DOC_VERSION : "3.1.25"
|
||||
YOCTO_DOC_VERSION : "3.1.26"
|
||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.4"
|
||||
DISTRO_REL_TAG : "yocto-3.1.25"
|
||||
DOCCONF_VERSION : "3.1.25"
|
||||
DISTRO_REL_TAG : "yocto-3.1.26"
|
||||
DOCCONF_VERSION : "3.1.26"
|
||||
BITBAKE_SERIES : "1.46"
|
||||
POKYVERSION : "23.0.25"
|
||||
POKYVERSION : "23.0.26"
|
||||
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
|
||||
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
|
||||
YOCTO_AB_URL : "https://autobuilder.yoctoproject.org"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "3.1.25"
|
||||
DISTRO_VERSION = "3.1.26"
|
||||
DISTRO_CODENAME = "dunfell"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
|
||||
|
||||
@@ -363,7 +363,8 @@ python copy_buildsystem () {
|
||||
f.write('BUILDCFG_HEADER = ""\n\n')
|
||||
|
||||
# Write METADATA_REVISION
|
||||
f.write('METADATA_REVISION = "%s"\n\n' % d.getVar('METADATA_REVISION'))
|
||||
# Needs distro override so it can override the value set in the bbclass code (later than local.conf)
|
||||
f.write('METADATA_REVISION:%s = "%s"\n\n' % (d.getVar('DISTRO'), d.getVar('METADATA_REVISION')))
|
||||
|
||||
f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n')
|
||||
f.write('WITHIN_EXT_SDK = "1"\n\n')
|
||||
|
||||
@@ -24,3 +24,5 @@ S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
|
||||
|
||||
UPSTREAM_CHECK_URI ?= "https://pypi.org/project/${PYPI_PACKAGE}/"
|
||||
UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
|
||||
|
||||
CVE_PRODUCT ?= "python:${PYPI_PACKAGE}"
|
||||
|
||||
@@ -188,7 +188,7 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
|
||||
def setUpLocal(self):
|
||||
super().setUpLocal()
|
||||
needed_vars = ['TOPDIR', 'TARGET_PREFIX', 'BB_NUMBER_THREADS']
|
||||
needed_vars = ['TOPDIR', 'TARGET_PREFIX', 'BB_NUMBER_THREADS', 'BB_HASHSERVE']
|
||||
bb_vars = get_bb_vars(needed_vars)
|
||||
for v in needed_vars:
|
||||
setattr(self, v.lower(), bb_vars[v])
|
||||
@@ -259,7 +259,7 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
# mirror, forcing a complete build from scratch
|
||||
config += textwrap.dedent('''\
|
||||
SSTATE_DIR = "${TMPDIR}/sstate"
|
||||
SSTATE_MIRRORS = ""
|
||||
SSTATE_MIRRORS = "file://.*/.*-native.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH file://.*/.*-cross.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
|
||||
''')
|
||||
|
||||
self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT'))
|
||||
|
||||
@@ -177,6 +177,8 @@ class TestImage(OESelftestTestCase):
|
||||
distro = oe.lsb.distro_identifier()
|
||||
if distro and distro.startswith('almalinux'):
|
||||
self.skipTest('virgl isn\'t working with Alma Linux')
|
||||
if distro and distro.startswith('rocky'):
|
||||
self.skipTest('virgl isn\'t working with Rocky Linux')
|
||||
if distro and distro == 'debian-8':
|
||||
self.skipTest('virgl isn\'t working with Debian 8')
|
||||
if distro and distro == 'centos-7':
|
||||
@@ -189,10 +191,14 @@ class TestImage(OESelftestTestCase):
|
||||
self.skipTest('virgl isn\'t working with Fedora 35')
|
||||
if distro and distro == 'fedora-36':
|
||||
self.skipTest('virgl isn\'t working with Fedora 36')
|
||||
if distro and distro == 'fedora-37':
|
||||
self.skipTest('virgl isn\'t working with Fedora 37')
|
||||
if distro and distro == 'opensuseleap-15.0':
|
||||
self.skipTest('virgl isn\'t working with Opensuse 15.0')
|
||||
if distro and distro == 'ubuntu-22.04':
|
||||
self.skipTest('virgl isn\'t working with Ubuntu 22.04')
|
||||
if distro and distro == 'ubuntu-22.10':
|
||||
self.skipTest('virgl isn\'t working with Ubuntu 22.10')
|
||||
|
||||
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
|
||||
sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native')
|
||||
|
||||
@@ -27,9 +27,9 @@ def metadata_from_bb():
|
||||
data_dict = get_bb_vars()
|
||||
|
||||
# Distro information
|
||||
info_dict['distro'] = {'id': data_dict['DISTRO'],
|
||||
'version_id': data_dict['DISTRO_VERSION'],
|
||||
'pretty_name': '%s %s' % (data_dict['DISTRO'], data_dict['DISTRO_VERSION'])}
|
||||
info_dict['distro'] = {'id': data_dict.get('DISTRO', 'NODISTRO'),
|
||||
'version_id': data_dict.get('DISTRO_VERSION', 'NO_DISTRO_VERSION'),
|
||||
'pretty_name': '%s %s' % (data_dict.get('DISTRO', 'NODISTRO'), data_dict.get('DISTRO_VERSION', 'NO_DISTRO_VERSION'))}
|
||||
|
||||
# Host distro information
|
||||
os_release = get_os_release()
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From 99e2c16ea1cced34a5dc450d76287a1c3e762138 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <wagi@monom.org>
|
||||
Date: Tue, 11 Apr 2023 08:12:56 +0200
|
||||
Subject: gdhcp: Verify and sanitize packet length first
|
||||
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/patch/?id=99e2c16ea1cced34a5dc450d76287a1c3e762138]
|
||||
CVE: CVE-2023-28488
|
||||
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||
|
||||
gdhcp/client.c | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
||||
index 7efa7e45..82017692 100644
|
||||
--- a/gdhcp/client.c
|
||||
+++ b/gdhcp/client.c
|
||||
@@ -1319,9 +1319,9 @@ static bool sanity_check(struct ip_udp_dhcp_packet *packet, int bytes)
|
||||
static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
|
||||
struct sockaddr_in *dst_addr)
|
||||
{
|
||||
- int bytes;
|
||||
struct ip_udp_dhcp_packet packet;
|
||||
uint16_t check;
|
||||
+ int bytes, tot_len;
|
||||
|
||||
memset(&packet, 0, sizeof(packet));
|
||||
|
||||
@@ -1329,15 +1329,17 @@ static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
|
||||
if (bytes < 0)
|
||||
return -1;
|
||||
|
||||
- if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
|
||||
- return -1;
|
||||
-
|
||||
- if (bytes < ntohs(packet.ip.tot_len))
|
||||
+ tot_len = ntohs(packet.ip.tot_len);
|
||||
+ if (bytes > tot_len) {
|
||||
+ /* ignore any extra garbage bytes */
|
||||
+ bytes = tot_len;
|
||||
+ } else if (bytes < tot_len) {
|
||||
/* packet is bigger than sizeof(packet), we did partial read */
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
- /* ignore any extra garbage bytes */
|
||||
- bytes = ntohs(packet.ip.tot_len);
|
||||
+ if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
|
||||
+ return -1;
|
||||
|
||||
if (!sanity_check(&packet, bytes))
|
||||
return -1;
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -14,6 +14,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
|
||||
file://CVE-2022-23098.patch \
|
||||
file://CVE-2022-32292.patch \
|
||||
file://CVE-2022-32293.patch \
|
||||
file://CVE-2023-28488.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Conflicts=sshd.service
|
||||
Wants=sshdgenkeys.service
|
||||
|
||||
[Socket]
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
[Unit]
|
||||
Description=OpenSSH Per-Connection Daemon
|
||||
Wants=sshdgenkeys.service
|
||||
After=sshdgenkeys.service
|
||||
|
||||
[Service]
|
||||
Environment="SSHD_OPTS="
|
||||
EnvironmentFile=-/etc/default/ssh
|
||||
ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS
|
||||
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
StandardError=syslog
|
||||
KillMode=process
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "ee461b42358db458f39e558b8667fbcffb6d8044"
|
||||
SRCREV ?= "d91c3c124231b6094cd797de5d11110f80153ebb"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dunfell \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
79
meta/recipes-core/libxml/libxml2/CVE-2023-28484.patch
Normal file
79
meta/recipes-core/libxml/libxml2/CVE-2023-28484.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
From e4f85f1bd2eb34d9b49da9154a4cc3a1bc284f68 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Fri, 7 Apr 2023 11:46:35 +0200
|
||||
Subject: [PATCH] [CVE-2023-28484] Fix null deref in xmlSchemaFixupComplexType
|
||||
|
||||
Fix a null pointer dereference when parsing (invalid) XML schemas.
|
||||
|
||||
Thanks to Robby Simpson for the report!
|
||||
|
||||
Fixes #491.
|
||||
|
||||
CVE: CVE-2023-28484
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/e4f85f1bd2eb34d9b49da9154a4cc3a1bc284f68]
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
result/schemas/issue491_0_0.err | 1 +
|
||||
test/schemas/issue491_0.xml | 1 +
|
||||
test/schemas/issue491_0.xsd | 18 ++++++++++++++++++
|
||||
xmlschemas.c | 2 +-
|
||||
4 files changed, 21 insertions(+), 1 deletion(-)
|
||||
create mode 100644 result/schemas/issue491_0_0.err
|
||||
create mode 100644 test/schemas/issue491_0.xml
|
||||
create mode 100644 test/schemas/issue491_0.xsd
|
||||
|
||||
diff --git a/result/schemas/issue491_0_0.err b/result/schemas/issue491_0_0.err
|
||||
new file mode 100644
|
||||
index 00000000..9b2bb969
|
||||
--- /dev/null
|
||||
+++ b/result/schemas/issue491_0_0.err
|
||||
@@ -0,0 +1 @@
|
||||
+./test/schemas/issue491_0.xsd:8: element complexType: Schemas parser error : complex type 'ChildType': The content type of both, the type and its base type, must either 'mixed' or 'element-only'.
|
||||
diff --git a/test/schemas/issue491_0.xml b/test/schemas/issue491_0.xml
|
||||
new file mode 100644
|
||||
index 00000000..e2b2fc2e
|
||||
--- /dev/null
|
||||
+++ b/test/schemas/issue491_0.xml
|
||||
@@ -0,0 +1 @@
|
||||
+<Child xmlns="http://www.test.com">5</Child>
|
||||
diff --git a/test/schemas/issue491_0.xsd b/test/schemas/issue491_0.xsd
|
||||
new file mode 100644
|
||||
index 00000000..81702649
|
||||
--- /dev/null
|
||||
+++ b/test/schemas/issue491_0.xsd
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version='1.0' encoding='UTF-8'?>
|
||||
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.test.com" targetNamespace="http://www.test.com" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
+ <xs:complexType name="BaseType">
|
||||
+ <xs:simpleContent>
|
||||
+ <xs:extension base="xs:int" />
|
||||
+ </xs:simpleContent>
|
||||
+ </xs:complexType>
|
||||
+ <xs:complexType name="ChildType">
|
||||
+ <xs:complexContent>
|
||||
+ <xs:extension base="BaseType">
|
||||
+ <xs:sequence>
|
||||
+ <xs:element name="bad" type="xs:int" minOccurs="0" maxOccurs="1"/>
|
||||
+ </xs:sequence>
|
||||
+ </xs:extension>
|
||||
+ </xs:complexContent>
|
||||
+ </xs:complexType>
|
||||
+ <xs:element name="Child" type="ChildType" />
|
||||
+</xs:schema>
|
||||
diff --git a/xmlschemas.c b/xmlschemas.c
|
||||
index 6a353858..a4eaf591 100644
|
||||
--- a/xmlschemas.c
|
||||
+++ b/xmlschemas.c
|
||||
@@ -18632,7 +18632,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
|
||||
"allowed to appear inside other model groups",
|
||||
NULL, NULL);
|
||||
|
||||
- } else if (! dummySequence) {
|
||||
+ } else if ((!dummySequence) && (baseType->subtypes != NULL)) {
|
||||
xmlSchemaTreeItemPtr effectiveContent =
|
||||
(xmlSchemaTreeItemPtr) type->subtypes;
|
||||
/*
|
||||
--
|
||||
GitLab
|
||||
|
||||
42
meta/recipes-core/libxml/libxml2/CVE-2023-29469.patch
Normal file
42
meta/recipes-core/libxml/libxml2/CVE-2023-29469.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 547edbf1cbdccd46b2e8ff322a456eaa5931c5df Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Fri, 7 Apr 2023 11:49:27 +0200
|
||||
Subject: [PATCH] [CVE-2023-29469] Hashing of empty dict strings isn't
|
||||
deterministic
|
||||
|
||||
When hashing empty strings which aren't null-terminated,
|
||||
xmlDictComputeFastKey could produce inconsistent results. This could
|
||||
lead to various logic or memory errors, including double frees.
|
||||
|
||||
For consistency the seed is also taken into account, but this shouldn't
|
||||
have an impact on security.
|
||||
|
||||
Found by OSS-Fuzz.
|
||||
|
||||
Fixes #510.
|
||||
|
||||
CVE: CVE-2023-29469
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/547edbf1cbdccd46b2e8ff322a456eaa5931c5df]
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
dict.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dict.c b/dict.c
|
||||
index 86c3f6d7..d7fd1a06 100644
|
||||
--- a/dict.c
|
||||
+++ b/dict.c
|
||||
@@ -451,7 +451,8 @@ static unsigned long
|
||||
xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
|
||||
unsigned long value = seed;
|
||||
|
||||
- if (name == NULL) return(0);
|
||||
+ if ((name == NULL) || (namelen <= 0))
|
||||
+ return(value);
|
||||
value = *name;
|
||||
value <<= 5;
|
||||
if (namelen > 10) {
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -36,6 +36,8 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=te
|
||||
file://CVE-2016-3709.patch \
|
||||
file://CVE-2022-40303.patch \
|
||||
file://CVE-2022-40304.patch \
|
||||
file://CVE-2023-28484.patch \
|
||||
file://CVE-2023-29469.patch \
|
||||
"
|
||||
|
||||
SRC_URI[archive.sha256sum] = "593b7b751dd18c2d6abcd0c4bcb29efc203d0b4373a6df98e3a455ea74ae2813"
|
||||
|
||||
@@ -8,3 +8,4 @@ rm -f *.tmp
|
||||
rm -f *.ok
|
||||
rm -f *.failed
|
||||
rm -f *.log
|
||||
cp ../data/test_data.tmp ./
|
||||
|
||||
@@ -144,4 +144,7 @@ do_install_ptest() {
|
||||
|
||||
install -d ${D}${PTEST_PATH}/lib
|
||||
install -m 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/
|
||||
|
||||
install -d ${D}${PTEST_PATH}/data
|
||||
install -m 0644 ${B}/tests/test_data.tmp ${D}${PTEST_PATH}/data/
|
||||
}
|
||||
|
||||
94
meta/recipes-devtools/git/files/CVE-2023-25652.patch
Normal file
94
meta/recipes-devtools/git/files/CVE-2023-25652.patch
Normal file
@@ -0,0 +1,94 @@
|
||||
From 9db05711c98efc14f414d4c87135a34c13586e0b Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
Date: Thu, 9 Mar 2023 16:02:54 +0100
|
||||
Subject: [PATCH] apply --reject: overwrite existing `.rej` symlink if it
|
||||
exists
|
||||
|
||||
The `git apply --reject` is expected to write out `.rej` files in case
|
||||
one or more hunks fail to apply cleanly. Historically, the command
|
||||
overwrites any existing `.rej` files. The idea being that
|
||||
apply/reject/edit cycles are relatively common, and the generated `.rej`
|
||||
files are not considered precious.
|
||||
|
||||
But the command does not overwrite existing `.rej` symbolic links, and
|
||||
instead follows them. This is unsafe because the same patch could
|
||||
potentially create such a symbolic link and point at arbitrary paths
|
||||
outside the current worktree, and `git apply` would write the contents
|
||||
of the `.rej` file into that location.
|
||||
|
||||
Therefore, let's make sure that any existing `.rej` file or symbolic
|
||||
link is removed before writing it.
|
||||
|
||||
Reported-by: RyotaK <ryotak.mail@gmail.com>
|
||||
Helped-by: Taylor Blau <me@ttaylorr.com>
|
||||
Helped-by: Junio C Hamano <gitster@pobox.com>
|
||||
Helped-by: Linus Torvalds <torvalds@linuxfoundation.org>
|
||||
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/git/git/commit/9db05711c98efc14f414d4c87135a34c13586e0b]
|
||||
CVE: CVE-2023-25652
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
apply.c | 14 ++++++++++++--
|
||||
t/t4115-apply-symlink.sh | 15 +++++++++++++++
|
||||
2 files changed, 27 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/apply.c b/apply.c
|
||||
index 4f303bf..aa7111d 100644
|
||||
--- a/apply.c
|
||||
+++ b/apply.c
|
||||
@@ -4531,7 +4531,7 @@ static int write_out_one_reject(struct apply_state *state, struct patch *patch)
|
||||
FILE *rej;
|
||||
char namebuf[PATH_MAX];
|
||||
struct fragment *frag;
|
||||
- int cnt = 0;
|
||||
+ int fd, cnt = 0;
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
|
||||
for (cnt = 0, frag = patch->fragments; frag; frag = frag->next) {
|
||||
@@ -4571,7 +4571,17 @@ static int write_out_one_reject(struct apply_state *state, struct patch *patch)
|
||||
memcpy(namebuf, patch->new_name, cnt);
|
||||
memcpy(namebuf + cnt, ".rej", 5);
|
||||
|
||||
- rej = fopen(namebuf, "w");
|
||||
+ fd = open(namebuf, O_CREAT | O_EXCL | O_WRONLY, 0666);
|
||||
+ if (fd < 0) {
|
||||
+ if (errno != EEXIST)
|
||||
+ return error_errno(_("cannot open %s"), namebuf);
|
||||
+ if (unlink(namebuf))
|
||||
+ return error_errno(_("cannot unlink '%s'"), namebuf);
|
||||
+ fd = open(namebuf, O_CREAT | O_EXCL | O_WRONLY, 0666);
|
||||
+ if (fd < 0)
|
||||
+ return error_errno(_("cannot open %s"), namebuf);
|
||||
+ }
|
||||
+ rej = fdopen(fd, "w");
|
||||
if (!rej)
|
||||
return error_errno(_("cannot open %s"), namebuf);
|
||||
|
||||
diff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh
|
||||
index 1acb7b2..2b034ff 100755
|
||||
--- a/t/t4115-apply-symlink.sh
|
||||
+++ b/t/t4115-apply-symlink.sh
|
||||
@@ -125,4 +125,19 @@ test_expect_success SYMLINKS 'symlink escape when deleting file' '
|
||||
test_path_is_file .git/delete-me
|
||||
'
|
||||
|
||||
+test_expect_success SYMLINKS '--reject removes .rej symlink if it exists' '
|
||||
+ test_when_finished "git reset --hard && git clean -dfx" &&
|
||||
+
|
||||
+ test_commit file &&
|
||||
+ echo modified >file.t &&
|
||||
+ git diff -- file.t >patch &&
|
||||
+ echo modified-again >file.t &&
|
||||
+
|
||||
+ ln -s foo file.t.rej &&
|
||||
+ test_must_fail git apply patch --reject 2>err &&
|
||||
+ test_i18ngrep "Rejected hunk" err &&
|
||||
+ test_path_is_missing foo &&
|
||||
+ test_path_is_file file.t.rej
|
||||
+'
|
||||
+
|
||||
test_done
|
||||
--
|
||||
2.25.1
|
||||
|
||||
159
meta/recipes-devtools/git/files/CVE-2023-29007.patch
Normal file
159
meta/recipes-devtools/git/files/CVE-2023-29007.patch
Normal file
@@ -0,0 +1,159 @@
|
||||
From 057c07a7b1fae22fdeef26c243f4cfbe3afc90ce Mon Sep 17 00:00:00 2001
|
||||
From: Taylor Blau <me@ttaylorr.com>
|
||||
Date: Fri, 14 Apr 2023 11:46:59 -0400
|
||||
Subject: [PATCH] Merge branch 'tb/config-copy-or-rename-in-file-injection'
|
||||
|
||||
Avoids issues with renaming or deleting sections with long lines, where
|
||||
configuration values may be interpreted as sections, leading to
|
||||
configuration injection. Addresses CVE-2023-29007.
|
||||
|
||||
* tb/config-copy-or-rename-in-file-injection:
|
||||
config.c: disallow overly-long lines in `copy_or_rename_section_in_file()`
|
||||
config.c: avoid integer truncation in `copy_or_rename_section_in_file()`
|
||||
config: avoid fixed-sized buffer when renaming/deleting a section
|
||||
t1300: demonstrate failure when renaming sections with long lines
|
||||
|
||||
Signed-off-by: Taylor Blau <me@ttaylorr.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/git/git/commit/528290f8c61222433a8cf02fb7cfffa8438432b4]
|
||||
CVE: CVE-2023-29007
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
config.c | 36 +++++++++++++++++++++++++-----------
|
||||
t/t1300-config.sh | 30 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 55 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/config.c b/config.c
|
||||
index e7052b3..676b687 100644
|
||||
--- a/config.c
|
||||
+++ b/config.c
|
||||
@@ -2987,9 +2987,10 @@ void git_config_set_multivar(const char *key, const char *value,
|
||||
multi_replace);
|
||||
}
|
||||
|
||||
-static int section_name_match (const char *buf, const char *name)
|
||||
+static size_t section_name_match (const char *buf, const char *name)
|
||||
{
|
||||
- int i = 0, j = 0, dot = 0;
|
||||
+ size_t i = 0, j = 0;
|
||||
+ int dot = 0;
|
||||
if (buf[i] != '[')
|
||||
return 0;
|
||||
for (i = 1; buf[i] && buf[i] != ']'; i++) {
|
||||
@@ -3042,6 +3043,8 @@ static int section_name_is_ok(const char *name)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+#define GIT_CONFIG_MAX_LINE_LEN (512 * 1024)
|
||||
+
|
||||
/* if new_name == NULL, the section is removed instead */
|
||||
static int git_config_copy_or_rename_section_in_file(const char *config_filename,
|
||||
const char *old_name,
|
||||
@@ -3051,11 +3054,12 @@ static int git_config_copy_or_rename_section_in_file(const char *config_filename
|
||||
char *filename_buf = NULL;
|
||||
struct lock_file lock = LOCK_INIT;
|
||||
int out_fd;
|
||||
- char buf[1024];
|
||||
+ struct strbuf buf = STRBUF_INIT;
|
||||
FILE *config_file = NULL;
|
||||
struct stat st;
|
||||
struct strbuf copystr = STRBUF_INIT;
|
||||
struct config_store_data store;
|
||||
+ uint32_t line_nr = 0;
|
||||
|
||||
memset(&store, 0, sizeof(store));
|
||||
|
||||
@@ -3092,16 +3096,25 @@ static int git_config_copy_or_rename_section_in_file(const char *config_filename
|
||||
goto out;
|
||||
}
|
||||
|
||||
- while (fgets(buf, sizeof(buf), config_file)) {
|
||||
- int i;
|
||||
- int length;
|
||||
+ while (!strbuf_getwholeline(&buf, config_file, '\n')) {
|
||||
+ size_t i, length;
|
||||
int is_section = 0;
|
||||
- char *output = buf;
|
||||
- for (i = 0; buf[i] && isspace(buf[i]); i++)
|
||||
+ char *output = buf.buf;
|
||||
+
|
||||
+ line_nr++;
|
||||
+
|
||||
+ if (buf.len >= GIT_CONFIG_MAX_LINE_LEN) {
|
||||
+ ret = error(_("refusing to work with overly long line "
|
||||
+ "in '%s' on line %"PRIuMAX),
|
||||
+ config_filename, (uintmax_t)line_nr);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; buf.buf[i] && isspace(buf.buf[i]); i++)
|
||||
; /* do nothing */
|
||||
- if (buf[i] == '[') {
|
||||
+ if (buf.buf[i] == '[') {
|
||||
/* it's a section */
|
||||
- int offset;
|
||||
+ size_t offset;
|
||||
is_section = 1;
|
||||
|
||||
/*
|
||||
@@ -3118,7 +3131,7 @@ static int git_config_copy_or_rename_section_in_file(const char *config_filename
|
||||
strbuf_reset(©str);
|
||||
}
|
||||
|
||||
- offset = section_name_match(&buf[i], old_name);
|
||||
+ offset = section_name_match(&buf.buf[i], old_name);
|
||||
if (offset > 0) {
|
||||
ret++;
|
||||
if (new_name == NULL) {
|
||||
@@ -3193,6 +3206,7 @@ static int git_config_copy_or_rename_section_in_file(const char *config_filename
|
||||
out_no_rollback:
|
||||
free(filename_buf);
|
||||
config_store_data_clear(&store);
|
||||
+ strbuf_release(&buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
|
||||
index 983a0a1..9b67f6b 100755
|
||||
--- a/t/t1300-config.sh
|
||||
+++ b/t/t1300-config.sh
|
||||
@@ -616,6 +616,36 @@ test_expect_success 'renaming to bogus section is rejected' '
|
||||
test_must_fail git config --rename-section branch.zwei "bogus name"
|
||||
'
|
||||
|
||||
+test_expect_success 'renaming a section with a long line' '
|
||||
+ {
|
||||
+ printf "[b]\\n" &&
|
||||
+ printf " c = d %1024s [a] e = f\\n" " " &&
|
||||
+ printf "[a] g = h\\n"
|
||||
+ } >y &&
|
||||
+ git config -f y --rename-section a xyz &&
|
||||
+ test_must_fail git config -f y b.e
|
||||
+'
|
||||
+
|
||||
+test_expect_success 'renaming an embedded section with a long line' '
|
||||
+ {
|
||||
+ printf "[b]\\n" &&
|
||||
+ printf " c = d %1024s [a] [foo] e = f\\n" " " &&
|
||||
+ printf "[a] g = h\\n"
|
||||
+ } >y &&
|
||||
+ git config -f y --rename-section a xyz &&
|
||||
+ test_must_fail git config -f y foo.e
|
||||
+'
|
||||
+
|
||||
+test_expect_success 'renaming a section with an overly-long line' '
|
||||
+ {
|
||||
+ printf "[b]\\n" &&
|
||||
+ printf " c = d %525000s e" " " &&
|
||||
+ printf "[a] g = h\\n"
|
||||
+ } >y &&
|
||||
+ test_must_fail git config -f y --rename-section a xyz 2>err &&
|
||||
+ test_i18ngrep "refusing to work with overly long line in .y. on line 2" err
|
||||
+'
|
||||
+
|
||||
cat >> .git/config << EOF
|
||||
[branch "zwei"] a = 1 [branch "vier"]
|
||||
EOF
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -28,6 +28,8 @@ SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
|
||||
file://CVE-2023-22490-2.patch \
|
||||
file://CVE-2023-22490-3.patch \
|
||||
file://CVE-2023-23946.patch \
|
||||
file://CVE-2023-29007.patch \
|
||||
file://CVE-2023-25652.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git-${PV}"
|
||||
|
||||
|
||||
@@ -58,6 +58,11 @@ SRC_URI += "\
|
||||
file://CVE-2020-29510.patch \
|
||||
file://CVE-2023-24537.patch \
|
||||
file://CVE-2023-24534.patch \
|
||||
file://CVE-2023-24538-1.patch \
|
||||
file://CVE-2023-24538-2.patch \
|
||||
file://CVE-2023-24538-3.patch \
|
||||
file://CVE-2023-24539.patch \
|
||||
file://CVE-2023-24540.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
|
||||
|
||||
125
meta/recipes-devtools/go/go-1.14/CVE-2023-24538-1.patch
Normal file
125
meta/recipes-devtools/go/go-1.14/CVE-2023-24538-1.patch
Normal file
@@ -0,0 +1,125 @@
|
||||
From 8acd01094d9ee17f6e763a61e49a8a808b3a9ddb Mon Sep 17 00:00:00 2001
|
||||
From: Brad Fitzpatrick <bradfitz@golang.org>
|
||||
Date: Mon, 2 Aug 2021 14:55:51 -0700
|
||||
Subject: [PATCH 1/3] net/netip: add new IP address package
|
||||
|
||||
Co-authored-by: Alex Willmer <alex@moreati.org.uk> (GitHub @moreati)
|
||||
Co-authored-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
|
||||
Co-authored-by: David Anderson <dave@natulte.net> (Tailscale CLA)
|
||||
Co-authored-by: David Crawshaw <crawshaw@tailscale.com> (Tailscale CLA)
|
||||
Co-authored-by: Dmytro Shynkevych <dmytro@tailscale.com> (Tailscale CLA)
|
||||
Co-authored-by: Elias Naur <mail@eliasnaur.com>
|
||||
Co-authored-by: Joe Tsai <joetsai@digital-static.net> (Tailscale CLA)
|
||||
Co-authored-by: Jonathan Yu <jawnsy@cpan.org> (GitHub @jawnsy)
|
||||
Co-authored-by: Josh Bleecher Snyder <josharian@gmail.com> (Tailscale CLA)
|
||||
Co-authored-by: Maisem Ali <maisem@tailscale.com> (Tailscale CLA)
|
||||
Co-authored-by: Manuel Mendez (Go AUTHORS mmendez534@...)
|
||||
Co-authored-by: Matt Layher <mdlayher@gmail.com>
|
||||
Co-authored-by: Noah Treuhaft <noah.treuhaft@gmail.com> (GitHub @nwt)
|
||||
Co-authored-by: Stefan Majer <stefan.majer@gmail.com>
|
||||
Co-authored-by: Terin Stock <terinjokes@gmail.com> (Cloudflare CLA)
|
||||
Co-authored-by: Tobias Klauser <tklauser@distanz.ch>
|
||||
|
||||
Fixes #46518
|
||||
|
||||
Change-Id: I0041f9e1115d61fa6e95fcf32b01d9faee708712
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/339309
|
||||
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
|
||||
TryBot-Result: Go Bot <gobot@golang.org>
|
||||
Reviewed-by: Russ Cox <rsc@golang.org>
|
||||
Trust: Brad Fitzpatrick <bradfitz@golang.org>
|
||||
|
||||
Dependency Patch #1
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/a59e33224e42d60a97fa720a45e1b74eb6aaa3d0]
|
||||
CVE: CVE-2023-24538
|
||||
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
|
||||
---
|
||||
src/internal/godebug/godebug.go | 34 ++++++++++++++++++++++++++++++++++
|
||||
src/internal/godebug/godebug_test.go | 34 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 68 insertions(+)
|
||||
create mode 100644 src/internal/godebug/godebug.go
|
||||
create mode 100644 src/internal/godebug/godebug_test.go
|
||||
|
||||
diff --git a/src/internal/godebug/godebug.go b/src/internal/godebug/godebug.go
|
||||
new file mode 100644
|
||||
index 0000000..ac434e5
|
||||
--- /dev/null
|
||||
+++ b/src/internal/godebug/godebug.go
|
||||
@@ -0,0 +1,34 @@
|
||||
+// Copyright 2021 The Go Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style
|
||||
+// license that can be found in the LICENSE file.
|
||||
+
|
||||
+// Package godebug parses the GODEBUG environment variable.
|
||||
+package godebug
|
||||
+
|
||||
+import "os"
|
||||
+
|
||||
+// Get returns the value for the provided GODEBUG key.
|
||||
+func Get(key string) string {
|
||||
+ return get(os.Getenv("GODEBUG"), key)
|
||||
+}
|
||||
+
|
||||
+// get returns the value part of key=value in s (a GODEBUG value).
|
||||
+func get(s, key string) string {
|
||||
+ for i := 0; i < len(s)-len(key)-1; i++ {
|
||||
+ if i > 0 && s[i-1] != ',' {
|
||||
+ continue
|
||||
+ }
|
||||
+ afterKey := s[i+len(key):]
|
||||
+ if afterKey[0] != '=' || s[i:i+len(key)] != key {
|
||||
+ continue
|
||||
+ }
|
||||
+ val := afterKey[1:]
|
||||
+ for i, b := range val {
|
||||
+ if b == ',' {
|
||||
+ return val[:i]
|
||||
+ }
|
||||
+ }
|
||||
+ return val
|
||||
+ }
|
||||
+ return ""
|
||||
+}
|
||||
diff --git a/src/internal/godebug/godebug_test.go b/src/internal/godebug/godebug_test.go
|
||||
new file mode 100644
|
||||
index 0000000..41b9117
|
||||
--- /dev/null
|
||||
+++ b/src/internal/godebug/godebug_test.go
|
||||
@@ -0,0 +1,34 @@
|
||||
+// Copyright 2021 The Go Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style
|
||||
+// license that can be found in the LICENSE file.
|
||||
+
|
||||
+package godebug
|
||||
+
|
||||
+import "testing"
|
||||
+
|
||||
+func TestGet(t *testing.T) {
|
||||
+ tests := []struct {
|
||||
+ godebug string
|
||||
+ key string
|
||||
+ want string
|
||||
+ }{
|
||||
+ {"", "", ""},
|
||||
+ {"", "foo", ""},
|
||||
+ {"foo=bar", "foo", "bar"},
|
||||
+ {"foo=bar,after=x", "foo", "bar"},
|
||||
+ {"before=x,foo=bar,after=x", "foo", "bar"},
|
||||
+ {"before=x,foo=bar", "foo", "bar"},
|
||||
+ {",,,foo=bar,,,", "foo", "bar"},
|
||||
+ {"foodecoy=wrong,foo=bar", "foo", "bar"},
|
||||
+ {"foo=", "foo", ""},
|
||||
+ {"foo", "foo", ""},
|
||||
+ {",foo", "foo", ""},
|
||||
+ {"foo=bar,baz", "loooooooong", ""},
|
||||
+ }
|
||||
+ for _, tt := range tests {
|
||||
+ got := get(tt.godebug, tt.key)
|
||||
+ if got != tt.want {
|
||||
+ t.Errorf("get(%q, %q) = %q; want %q", tt.godebug, tt.key, got, tt.want)
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.7.4
|
||||
196
meta/recipes-devtools/go/go-1.14/CVE-2023-24538-2.patch
Normal file
196
meta/recipes-devtools/go/go-1.14/CVE-2023-24538-2.patch
Normal file
@@ -0,0 +1,196 @@
|
||||
From 6fc21505614f36178df0dad7034b6b8e3f7588d5 Mon Sep 17 00:00:00 2001
|
||||
From: empijei <robclap8@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 19:27:55 +0100
|
||||
Subject: [PATCH 2/3] html/template,text/template: switch to Unicode escapes
|
||||
for JSON compatibility
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The existing implementation is not compatible with JSON
|
||||
escape as it uses hex escaping.
|
||||
Unicode escape, instead, is valid for both JSON and JS.
|
||||
This fix avoids creating a separate escaping context for
|
||||
scripts of type "application/ld+json" and it is more
|
||||
future-proof in case more JSON+JS contexts get added
|
||||
to the platform (e.g. import maps).
|
||||
|
||||
Fixes #33671
|
||||
Fixes #37634
|
||||
|
||||
Change-Id: Id6f6524b4abc52e81d9d744d46bbe5bf2e081543
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/226097
|
||||
Reviewed-by: Carl Johnson <me@carlmjohnson.net>
|
||||
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
|
||||
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
|
||||
TryBot-Result: Gobot Gobot <gobot@golang.org>
|
||||
|
||||
Dependency Patch #2
|
||||
|
||||
Upstream-Status: Backport from https://github.com/golang/go/commit/d4d298040d072ddacea0e0d6b55fb148fff18070
|
||||
CVE: CVE-2023-24538
|
||||
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
|
||||
---
|
||||
src/html/template/js.go | 70 +++++++++++++++++++++++++++-------------------
|
||||
src/text/template/funcs.go | 8 +++---
|
||||
2 files changed, 46 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/src/html/template/js.go b/src/html/template/js.go
|
||||
index 0e91458..ea9c183 100644
|
||||
--- a/src/html/template/js.go
|
||||
+++ b/src/html/template/js.go
|
||||
@@ -163,7 +163,6 @@ func jsValEscaper(args ...interface{}) string {
|
||||
}
|
||||
// TODO: detect cycles before calling Marshal which loops infinitely on
|
||||
// cyclic data. This may be an unacceptable DoS risk.
|
||||
-
|
||||
b, err := json.Marshal(a)
|
||||
if err != nil {
|
||||
// Put a space before comment so that if it is flush against
|
||||
@@ -178,8 +177,8 @@ func jsValEscaper(args ...interface{}) string {
|
||||
// TODO: maybe post-process output to prevent it from containing
|
||||
// "<!--", "-->", "<![CDATA[", "]]>", or "</script"
|
||||
// in case custom marshalers produce output containing those.
|
||||
-
|
||||
- // TODO: Maybe abbreviate \u00ab to \xab to produce more compact output.
|
||||
+ // Note: Do not use \x escaping to save bytes because it is not JSON compatible and this escaper
|
||||
+ // supports ld+json content-type.
|
||||
if len(b) == 0 {
|
||||
// In, `x=y/{{.}}*z` a json.Marshaler that produces "" should
|
||||
// not cause the output `x=y/*z`.
|
||||
@@ -260,6 +259,8 @@ func replace(s string, replacementTable []string) string {
|
||||
r, w = utf8.DecodeRuneInString(s[i:])
|
||||
var repl string
|
||||
switch {
|
||||
+ case int(r) < len(lowUnicodeReplacementTable):
|
||||
+ repl = lowUnicodeReplacementTable[r]
|
||||
case int(r) < len(replacementTable) && replacementTable[r] != "":
|
||||
repl = replacementTable[r]
|
||||
case r == '\u2028':
|
||||
@@ -283,67 +284,80 @@ func replace(s string, replacementTable []string) string {
|
||||
return b.String()
|
||||
}
|
||||
|
||||
+var lowUnicodeReplacementTable = []string{
|
||||
+ 0: `\u0000`, 1: `\u0001`, 2: `\u0002`, 3: `\u0003`, 4: `\u0004`, 5: `\u0005`, 6: `\u0006`,
|
||||
+ '\a': `\u0007`,
|
||||
+ '\b': `\u0008`,
|
||||
+ '\t': `\t`,
|
||||
+ '\n': `\n`,
|
||||
+ '\v': `\u000b`, // "\v" == "v" on IE 6.
|
||||
+ '\f': `\f`,
|
||||
+ '\r': `\r`,
|
||||
+ 0xe: `\u000e`, 0xf: `\u000f`, 0x10: `\u0010`, 0x11: `\u0011`, 0x12: `\u0012`, 0x13: `\u0013`,
|
||||
+ 0x14: `\u0014`, 0x15: `\u0015`, 0x16: `\u0016`, 0x17: `\u0017`, 0x18: `\u0018`, 0x19: `\u0019`,
|
||||
+ 0x1a: `\u001a`, 0x1b: `\u001b`, 0x1c: `\u001c`, 0x1d: `\u001d`, 0x1e: `\u001e`, 0x1f: `\u001f`,
|
||||
+}
|
||||
+
|
||||
var jsStrReplacementTable = []string{
|
||||
- 0: `\0`,
|
||||
+ 0: `\u0000`,
|
||||
'\t': `\t`,
|
||||
'\n': `\n`,
|
||||
- '\v': `\x0b`, // "\v" == "v" on IE 6.
|
||||
+ '\v': `\u000b`, // "\v" == "v" on IE 6.
|
||||
'\f': `\f`,
|
||||
'\r': `\r`,
|
||||
// Encode HTML specials as hex so the output can be embedded
|
||||
// in HTML attributes without further encoding.
|
||||
- '"': `\x22`,
|
||||
- '&': `\x26`,
|
||||
- '\'': `\x27`,
|
||||
- '+': `\x2b`,
|
||||
+ '"': `\u0022`,
|
||||
+ '&': `\u0026`,
|
||||
+ '\'': `\u0027`,
|
||||
+ '+': `\u002b`,
|
||||
'/': `\/`,
|
||||
- '<': `\x3c`,
|
||||
- '>': `\x3e`,
|
||||
+ '<': `\u003c`,
|
||||
+ '>': `\u003e`,
|
||||
'\\': `\\`,
|
||||
}
|
||||
|
||||
// jsStrNormReplacementTable is like jsStrReplacementTable but does not
|
||||
// overencode existing escapes since this table has no entry for `\`.
|
||||
var jsStrNormReplacementTable = []string{
|
||||
- 0: `\0`,
|
||||
+ 0: `\u0000`,
|
||||
'\t': `\t`,
|
||||
'\n': `\n`,
|
||||
- '\v': `\x0b`, // "\v" == "v" on IE 6.
|
||||
+ '\v': `\u000b`, // "\v" == "v" on IE 6.
|
||||
'\f': `\f`,
|
||||
'\r': `\r`,
|
||||
// Encode HTML specials as hex so the output can be embedded
|
||||
// in HTML attributes without further encoding.
|
||||
- '"': `\x22`,
|
||||
- '&': `\x26`,
|
||||
- '\'': `\x27`,
|
||||
- '+': `\x2b`,
|
||||
+ '"': `\u0022`,
|
||||
+ '&': `\u0026`,
|
||||
+ '\'': `\u0027`,
|
||||
+ '+': `\u002b`,
|
||||
'/': `\/`,
|
||||
- '<': `\x3c`,
|
||||
- '>': `\x3e`,
|
||||
+ '<': `\u003c`,
|
||||
+ '>': `\u003e`,
|
||||
}
|
||||
-
|
||||
var jsRegexpReplacementTable = []string{
|
||||
- 0: `\0`,
|
||||
+ 0: `\u0000`,
|
||||
'\t': `\t`,
|
||||
'\n': `\n`,
|
||||
- '\v': `\x0b`, // "\v" == "v" on IE 6.
|
||||
+ '\v': `\u000b`, // "\v" == "v" on IE 6.
|
||||
'\f': `\f`,
|
||||
'\r': `\r`,
|
||||
// Encode HTML specials as hex so the output can be embedded
|
||||
// in HTML attributes without further encoding.
|
||||
- '"': `\x22`,
|
||||
+ '"': `\u0022`,
|
||||
'$': `\$`,
|
||||
- '&': `\x26`,
|
||||
- '\'': `\x27`,
|
||||
+ '&': `\u0026`,
|
||||
+ '\'': `\u0027`,
|
||||
'(': `\(`,
|
||||
')': `\)`,
|
||||
'*': `\*`,
|
||||
- '+': `\x2b`,
|
||||
+ '+': `\u002b`,
|
||||
'-': `\-`,
|
||||
'.': `\.`,
|
||||
'/': `\/`,
|
||||
- '<': `\x3c`,
|
||||
- '>': `\x3e`,
|
||||
+ '<': `\u003c`,
|
||||
+ '>': `\u003e`,
|
||||
'?': `\?`,
|
||||
'[': `\[`,
|
||||
'\\': `\\`,
|
||||
diff --git a/src/text/template/funcs.go b/src/text/template/funcs.go
|
||||
index 46125bc..f3de9fb 100644
|
||||
--- a/src/text/template/funcs.go
|
||||
+++ b/src/text/template/funcs.go
|
||||
@@ -640,10 +640,10 @@ var (
|
||||
jsBackslash = []byte(`\\`)
|
||||
jsApos = []byte(`\'`)
|
||||
jsQuot = []byte(`\"`)
|
||||
- jsLt = []byte(`\x3C`)
|
||||
- jsGt = []byte(`\x3E`)
|
||||
- jsAmp = []byte(`\x26`)
|
||||
- jsEq = []byte(`\x3D`)
|
||||
+ jsLt = []byte(`\u003C`)
|
||||
+ jsGt = []byte(`\u003E`)
|
||||
+ jsAmp = []byte(`\u0026`)
|
||||
+ jsEq = []byte(`\u003D`)
|
||||
)
|
||||
|
||||
// JSEscape writes to w the escaped JavaScript equivalent of the plain text data b.
|
||||
--
|
||||
2.7.4
|
||||
208
meta/recipes-devtools/go/go-1.14/CVE-2023-24538-3.patch
Normal file
208
meta/recipes-devtools/go/go-1.14/CVE-2023-24538-3.patch
Normal file
@@ -0,0 +1,208 @@
|
||||
From 16f4882984569f179d73967c9eee679bb9b098c5 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Mon, 20 Mar 2023 11:01:13 -0700
|
||||
Subject: [PATCH 3/3] html/template: disallow actions in JS template literals
|
||||
|
||||
ECMAScript 6 introduced template literals[0][1] which are delimited with
|
||||
backticks. These need to be escaped in a similar fashion to the
|
||||
delimiters for other string literals. Additionally template literals can
|
||||
contain special syntax for string interpolation.
|
||||
|
||||
There is no clear way to allow safe insertion of actions within JS
|
||||
template literals, as handling (JS) string interpolation inside of these
|
||||
literals is rather complex. As such we've chosen to simply disallow
|
||||
template actions within these template literals.
|
||||
|
||||
A new error code is added for this parsing failure case, errJsTmplLit,
|
||||
but it is unexported as it is not backwards compatible with other minor
|
||||
release versions to introduce an API change in a minor release. We will
|
||||
export this code in the next major release.
|
||||
|
||||
The previous behavior (with the cavet that backticks are now escaped
|
||||
properly) can be re-enabled with GODEBUG=jstmpllitinterp=1.
|
||||
|
||||
This change subsumes CL471455.
|
||||
|
||||
Thanks to Sohom Datta, Manipal Institute of Technology, for reporting
|
||||
this issue.
|
||||
|
||||
Fixes CVE-2023-24538
|
||||
For #59234
|
||||
Fixes #59271
|
||||
|
||||
[0] https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-template-literals
|
||||
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
|
||||
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802457
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Run-TryBot: Damien Neil <dneil@google.com>
|
||||
Reviewed-by: Julie Qiu <julieqiu@google.com>
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802612
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
Change-Id: Ic7f10595615f2b2740d9c85ad7ef40dc0e78c04c
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/481987
|
||||
Auto-Submit: Michael Knyszek <mknyszek@google.com>
|
||||
TryBot-Result: Gopher Robot <gobot@golang.org>
|
||||
Run-TryBot: Michael Knyszek <mknyszek@google.com>
|
||||
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
|
||||
|
||||
Upstream-Status: Backport from https://github.com/golang/go/commit/b1e3ecfa06b67014429a197ec5e134ce4303ad9b
|
||||
CVE: CVE-2023-24538
|
||||
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
|
||||
---
|
||||
src/html/template/context.go | 2 ++
|
||||
src/html/template/error.go | 13 +++++++++++++
|
||||
src/html/template/escape.go | 11 +++++++++++
|
||||
src/html/template/js.go | 2 ++
|
||||
src/html/template/jsctx_string.go | 9 +++++++++
|
||||
src/html/template/transition.go | 7 ++++++-
|
||||
6 files changed, 43 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/html/template/context.go b/src/html/template/context.go
|
||||
index f7d4849..0b65313 100644
|
||||
--- a/src/html/template/context.go
|
||||
+++ b/src/html/template/context.go
|
||||
@@ -116,6 +116,8 @@ const (
|
||||
stateJSDqStr
|
||||
// stateJSSqStr occurs inside a JavaScript single quoted string.
|
||||
stateJSSqStr
|
||||
+ // stateJSBqStr occurs inside a JavaScript back quoted string.
|
||||
+ stateJSBqStr
|
||||
// stateJSRegexp occurs inside a JavaScript regexp literal.
|
||||
stateJSRegexp
|
||||
// stateJSBlockCmt occurs inside a JavaScript /* block comment */.
|
||||
diff --git a/src/html/template/error.go b/src/html/template/error.go
|
||||
index 0e52706..fd26b64 100644
|
||||
--- a/src/html/template/error.go
|
||||
+++ b/src/html/template/error.go
|
||||
@@ -211,6 +211,19 @@ const (
|
||||
// pipeline occurs in an unquoted attribute value context, "html" is
|
||||
// disallowed. Avoid using "html" and "urlquery" entirely in new templates.
|
||||
ErrPredefinedEscaper
|
||||
+
|
||||
+ // errJSTmplLit: "... appears in a JS template literal"
|
||||
+ // Example:
|
||||
+ // <script>var tmpl = `{{.Interp}`</script>
|
||||
+ // Discussion:
|
||||
+ // Package html/template does not support actions inside of JS template
|
||||
+ // literals.
|
||||
+ //
|
||||
+ // TODO(rolandshoemaker): we cannot add this as an exported error in a minor
|
||||
+ // release, since it is backwards incompatible with the other minor
|
||||
+ // releases. As such we need to leave it unexported, and then we'll add it
|
||||
+ // in the next major release.
|
||||
+ errJSTmplLit
|
||||
)
|
||||
|
||||
func (e *Error) Error() string {
|
||||
diff --git a/src/html/template/escape.go b/src/html/template/escape.go
|
||||
index f12dafa..29ca5b3 100644
|
||||
--- a/src/html/template/escape.go
|
||||
+++ b/src/html/template/escape.go
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"html"
|
||||
+ "internal/godebug"
|
||||
"io"
|
||||
"text/template"
|
||||
"text/template/parse"
|
||||
@@ -203,6 +204,16 @@ func (e *escaper) escapeAction(c context, n *parse.ActionNode) context {
|
||||
c.jsCtx = jsCtxDivOp
|
||||
case stateJSDqStr, stateJSSqStr:
|
||||
s = append(s, "_html_template_jsstrescaper")
|
||||
+ case stateJSBqStr:
|
||||
+ debugAllowActionJSTmpl := godebug.Get("jstmpllitinterp")
|
||||
+ if debugAllowActionJSTmpl == "1" {
|
||||
+ s = append(s, "_html_template_jsstrescaper")
|
||||
+ } else {
|
||||
+ return context{
|
||||
+ state: stateError,
|
||||
+ err: errorf(errJSTmplLit, n, n.Line, "%s appears in a JS template literal", n),
|
||||
+ }
|
||||
+ }
|
||||
case stateJSRegexp:
|
||||
s = append(s, "_html_template_jsregexpescaper")
|
||||
case stateCSS:
|
||||
diff --git a/src/html/template/js.go b/src/html/template/js.go
|
||||
index ea9c183..b888eaf 100644
|
||||
--- a/src/html/template/js.go
|
||||
+++ b/src/html/template/js.go
|
||||
@@ -308,6 +308,7 @@ var jsStrReplacementTable = []string{
|
||||
// Encode HTML specials as hex so the output can be embedded
|
||||
// in HTML attributes without further encoding.
|
||||
'"': `\u0022`,
|
||||
+ '`': `\u0060`,
|
||||
'&': `\u0026`,
|
||||
'\'': `\u0027`,
|
||||
'+': `\u002b`,
|
||||
@@ -331,6 +332,7 @@ var jsStrNormReplacementTable = []string{
|
||||
'"': `\u0022`,
|
||||
'&': `\u0026`,
|
||||
'\'': `\u0027`,
|
||||
+ '`': `\u0060`,
|
||||
'+': `\u002b`,
|
||||
'/': `\/`,
|
||||
'<': `\u003c`,
|
||||
diff --git a/src/html/template/jsctx_string.go b/src/html/template/jsctx_string.go
|
||||
index dd1d87e..2394893 100644
|
||||
--- a/src/html/template/jsctx_string.go
|
||||
+++ b/src/html/template/jsctx_string.go
|
||||
@@ -4,6 +4,15 @@ package template
|
||||
|
||||
import "strconv"
|
||||
|
||||
+func _() {
|
||||
+ // An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
+ // Re-run the stringer command to generate them again.
|
||||
+ var x [1]struct{}
|
||||
+ _ = x[jsCtxRegexp-0]
|
||||
+ _ = x[jsCtxDivOp-1]
|
||||
+ _ = x[jsCtxUnknown-2]
|
||||
+}
|
||||
+
|
||||
const _jsCtx_name = "jsCtxRegexpjsCtxDivOpjsCtxUnknown"
|
||||
|
||||
var _jsCtx_index = [...]uint8{0, 11, 21, 33}
|
||||
diff --git a/src/html/template/transition.go b/src/html/template/transition.go
|
||||
index 06df679..92eb351 100644
|
||||
--- a/src/html/template/transition.go
|
||||
+++ b/src/html/template/transition.go
|
||||
@@ -27,6 +27,7 @@ var transitionFunc = [...]func(context, []byte) (context, int){
|
||||
stateJS: tJS,
|
||||
stateJSDqStr: tJSDelimited,
|
||||
stateJSSqStr: tJSDelimited,
|
||||
+ stateJSBqStr: tJSDelimited,
|
||||
stateJSRegexp: tJSDelimited,
|
||||
stateJSBlockCmt: tBlockCmt,
|
||||
stateJSLineCmt: tLineCmt,
|
||||
@@ -262,7 +263,7 @@ func tURL(c context, s []byte) (context, int) {
|
||||
|
||||
// tJS is the context transition function for the JS state.
|
||||
func tJS(c context, s []byte) (context, int) {
|
||||
- i := bytes.IndexAny(s, `"'/`)
|
||||
+ i := bytes.IndexAny(s, "\"`'/")
|
||||
if i == -1 {
|
||||
// Entire input is non string, comment, regexp tokens.
|
||||
c.jsCtx = nextJSCtx(s, c.jsCtx)
|
||||
@@ -274,6 +275,8 @@ func tJS(c context, s []byte) (context, int) {
|
||||
c.state, c.jsCtx = stateJSDqStr, jsCtxRegexp
|
||||
case '\'':
|
||||
c.state, c.jsCtx = stateJSSqStr, jsCtxRegexp
|
||||
+ case '`':
|
||||
+ c.state, c.jsCtx = stateJSBqStr, jsCtxRegexp
|
||||
case '/':
|
||||
switch {
|
||||
case i+1 < len(s) && s[i+1] == '/':
|
||||
@@ -303,6 +306,8 @@ func tJSDelimited(c context, s []byte) (context, int) {
|
||||
switch c.state {
|
||||
case stateJSSqStr:
|
||||
specials = `\'`
|
||||
+ case stateJSBqStr:
|
||||
+ specials = "`\\"
|
||||
case stateJSRegexp:
|
||||
specials = `\/[]`
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
60
meta/recipes-devtools/go/go-1.14/CVE-2023-24539.patch
Normal file
60
meta/recipes-devtools/go/go-1.14/CVE-2023-24539.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
From 8673ca81e5340b87709db2d9749c92a3bf925df1 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Thu, 13 Apr 2023 15:40:44 -0700
|
||||
Subject: [PATCH] html/template: disallow angle brackets in CSS values
|
||||
|
||||
Angle brackets should not appear in CSS contexts, as they may affect
|
||||
token boundaries (such as closing a <style> tag, resulting in
|
||||
injection). Instead emit filterFailsafe, matching the behavior for other
|
||||
dangerous characters.
|
||||
|
||||
Thanks to Juho Nurminen of Mattermost for reporting this issue.
|
||||
|
||||
Fixes #59720
|
||||
Fixes CVE-2023-24539
|
||||
|
||||
Change-Id: Iccc659c9a18415992b0c05c178792228e3a7bae4
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1826636
|
||||
Reviewed-by: Julie Qiu <julieqiu@google.com>
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/491615
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Run-TryBot: Carlos Amedee <carlos@golang.org>
|
||||
TryBot-Result: Gopher Robot <gobot@golang.org>
|
||||
|
||||
Upstream-Status: Backport from [https://github.com/golang/go/commit/8673ca81e5340b87709db2d9749c92a3bf925df1]
|
||||
CVE: CVE-2023-24539
|
||||
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||
---
|
||||
src/html/template/css.go | 2 +-
|
||||
src/html/template/css_test.go | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/html/template/css.go b/src/html/template/css.go
|
||||
index 890a0c6b227fe..f650d8b3e843a 100644
|
||||
--- a/src/html/template/css.go
|
||||
+++ b/src/html/template/css.go
|
||||
@@ -238,7 +238,7 @@ func cssValueFilter(args ...any) string {
|
||||
// inside a string that might embed JavaScript source.
|
||||
for i, c := range b {
|
||||
switch c {
|
||||
- case 0, '"', '\'', '(', ')', '/', ';', '@', '[', '\\', ']', '`', '{', '}':
|
||||
+ case 0, '"', '\'', '(', ')', '/', ';', '@', '[', '\\', ']', '`', '{', '}', '<', '>':
|
||||
return filterFailsafe
|
||||
case '-':
|
||||
// Disallow <!-- or -->.
|
||||
diff --git a/src/html/template/css_test.go b/src/html/template/css_test.go
|
||||
index a735638b0314f..2b76256a766e9 100644
|
||||
--- a/src/html/template/css_test.go
|
||||
+++ b/src/html/template/css_test.go
|
||||
@@ -231,6 +231,8 @@ func TestCSSValueFilter(t *testing.T) {
|
||||
{`-exp\000052 ession(alert(1337))`, "ZgotmplZ"},
|
||||
{`-expre\0000073sion`, "-expre\x073sion"},
|
||||
{`@import url evil.css`, "ZgotmplZ"},
|
||||
+ {"<", "ZgotmplZ"},
|
||||
+ {">", "ZgotmplZ"},
|
||||
}
|
||||
for _, test := range tests {
|
||||
got := cssValueFilter(test.css)
|
||||
90
meta/recipes-devtools/go/go-1.14/CVE-2023-24540.patch
Normal file
90
meta/recipes-devtools/go/go-1.14/CVE-2023-24540.patch
Normal file
@@ -0,0 +1,90 @@
|
||||
From ce7bd33345416e6d8cac901792060591cafc2797 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Tue, 11 Apr 2023 16:27:43 +0100
|
||||
Subject: [PATCH] [release-branch.go1.19] html/template: handle all JS
|
||||
whitespace characters
|
||||
|
||||
Rather than just a small set. Character class as defined by \s [0].
|
||||
|
||||
Thanks to Juho Nurminen of Mattermost for reporting this.
|
||||
|
||||
For #59721
|
||||
Fixes #59813
|
||||
Fixes CVE-2023-24540
|
||||
|
||||
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes
|
||||
|
||||
Change-Id: I56d4fa1ef08125b417106ee7dbfb5b0923b901ba
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1821459
|
||||
Reviewed-by: Julie Qiu <julieqiu@google.com>
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1851497
|
||||
Run-TryBot: Damien Neil <dneil@google.com>
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/491355
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Reviewed-by: Carlos Amedee <carlos@golang.org>
|
||||
TryBot-Bypass: Carlos Amedee <carlos@golang.org>
|
||||
Run-TryBot: Carlos Amedee <carlos@golang.org>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/ce7bd33345416e6d8cac901792060591cafc2797]
|
||||
CVE: CVE-2023-24540
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/html/template/js.go | 8 +++++++-
|
||||
src/html/template/js_test.go | 11 +++++++----
|
||||
2 files changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/html/template/js.go b/src/html/template/js.go
|
||||
index fe7054efe5cd8..4e05c1455723f 100644
|
||||
--- a/src/html/template/js.go
|
||||
+++ b/src/html/template/js.go
|
||||
@@ -13,6 +13,11 @@ import (
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
+// jsWhitespace contains all of the JS whitespace characters, as defined
|
||||
+// by the \s character class.
|
||||
+// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes.
|
||||
+const jsWhitespace = "\f\n\r\t\v\u0020\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff"
|
||||
+
|
||||
// nextJSCtx returns the context that determines whether a slash after the
|
||||
// given run of tokens starts a regular expression instead of a division
|
||||
// operator: / or /=.
|
||||
@@ -26,7 +31,8 @@ import (
|
||||
// JavaScript 2.0 lexical grammar and requires one token of lookbehind:
|
||||
// https://www.mozilla.org/js/language/js20-2000-07/rationale/syntax.html
|
||||
func nextJSCtx(s []byte, preceding jsCtx) jsCtx {
|
||||
- s = bytes.TrimRight(s, "\t\n\f\r \u2028\u2029")
|
||||
+ // Trim all JS whitespace characters
|
||||
+ s = bytes.TrimRight(s, jsWhitespace)
|
||||
if len(s) == 0 {
|
||||
return preceding
|
||||
}
|
||||
diff --git a/src/html/template/js_test.go b/src/html/template/js_test.go
|
||||
index e07c695f7a77d..e52180cc113b5 100644
|
||||
--- a/src/html/template/js_test.go
|
||||
+++ b/src/html/template/js_test.go
|
||||
@@ -81,14 +81,17 @@ func TestNextJsCtx(t *testing.T) {
|
||||
{jsCtxDivOp, "0"},
|
||||
// Dots that are part of a number are div preceders.
|
||||
{jsCtxDivOp, "0."},
|
||||
+ // Some JS interpreters treat NBSP as a normal space, so
|
||||
+ // we must too in order to properly escape things.
|
||||
+ {jsCtxRegexp, "=\u00A0"},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
- if nextJSCtx([]byte(test.s), jsCtxRegexp) != test.jsCtx {
|
||||
- t.Errorf("want %s got %q", test.jsCtx, test.s)
|
||||
+ if ctx := nextJSCtx([]byte(test.s), jsCtxRegexp); ctx != test.jsCtx {
|
||||
+ t.Errorf("%q: want %s got %s", test.s, test.jsCtx, ctx)
|
||||
}
|
||||
- if nextJSCtx([]byte(test.s), jsCtxDivOp) != test.jsCtx {
|
||||
- t.Errorf("want %s got %q", test.jsCtx, test.s)
|
||||
+ if ctx := nextJSCtx([]byte(test.s), jsCtxDivOp); ctx != test.jsCtx {
|
||||
+ t.Errorf("%q: want %s got %s", test.s, test.jsCtx, ctx)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=Run pending postinsts
|
||||
DefaultDependencies=no
|
||||
After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
|
||||
After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount ldconfig.service
|
||||
Before=sysinit.target
|
||||
|
||||
[Service]
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 77ff5f1be394eb2c786df561ff37dde7f982ec76 Mon Sep 17 00:00:00 2001
|
||||
From: Stefano Babic <sbabic@denx.de>
|
||||
Date: Fri, 28 Jul 2017 13:20:52 +0200
|
||||
Subject: [PATCH] Wrong CRC with ASCII CRC for large files
|
||||
|
||||
Due to signedness, the checksum is not computed when filesize is bigger
|
||||
a 2GB.
|
||||
|
||||
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-cpio/2017-07/msg00004.html]
|
||||
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
||||
---
|
||||
src/copyout.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/copyout.c b/src/copyout.c
|
||||
index 1f0987a..727aeca 100644
|
||||
--- a/src/copyout.c
|
||||
+++ b/src/copyout.c
|
||||
@@ -34,13 +34,13 @@
|
||||
compute and return a checksum for them. */
|
||||
|
||||
static uint32_t
|
||||
-read_for_checksum (int in_file_des, int file_size, char *file_name)
|
||||
+read_for_checksum (int in_file_des, unsigned int file_size, char *file_name)
|
||||
{
|
||||
uint32_t crc;
|
||||
char buf[BUFSIZ];
|
||||
- int bytes_left;
|
||||
- int bytes_read;
|
||||
- int i;
|
||||
+ unsigned int bytes_left;
|
||||
+ unsigned int bytes_read;
|
||||
+ unsigned int i;
|
||||
|
||||
crc = 0;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -10,6 +10,7 @@ SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
|
||||
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
|
||||
file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \
|
||||
file://CVE-2021-38185.patch \
|
||||
file://0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From 37ed5022cecd584de868933b5b60da2e995b3179 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Sharp <ken.sharp@artifex.com>
|
||||
Date: Fri, 24 Mar 2023 13:19:57 +0000
|
||||
Subject: [PATCH] Graphics library - prevent buffer overrun in (T)BCP encoding
|
||||
|
||||
Bug #706494 "Buffer Overflow in s_xBCPE_process"
|
||||
|
||||
As described in detail in the bug report, if the write buffer is filled
|
||||
to one byte less than full, and we then try to write an escaped
|
||||
character, we overrun the buffer because we don't check before
|
||||
writing two bytes to it.
|
||||
|
||||
This just checks if we have two bytes before starting to write an
|
||||
escaped character and exits if we don't (replacing the consumed byte
|
||||
of the input).
|
||||
|
||||
Up for further discussion; why do we even permit a BCP encoding filter
|
||||
anyway ? I think we should remove this, at least when SAFER is true.
|
||||
|
||||
Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;h=37ed5022cecd584de868933b5b60da2e995b3179]
|
||||
CVE: CVE-2023-28879
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
base/sbcp.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/base/sbcp.c b/base/sbcp.c
|
||||
index 6b0383c..90784b5 100644
|
||||
--- a/base/sbcp.c
|
||||
+++ b/base/sbcp.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
|
||||
+/* Copyright (C) 2001-2023 Artifex Software, Inc.
|
||||
All Rights Reserved.
|
||||
|
||||
This software is provided AS-IS with no warranty, either express or
|
||||
@@ -50,6 +50,14 @@ s_xBCPE_process(stream_state * st, stream_cursor_read * pr,
|
||||
byte ch = *++p;
|
||||
|
||||
if (ch <= 31 && escaped[ch]) {
|
||||
+ /* Make sure we have space to store two characters in the write buffer,
|
||||
+ * if we don't then exit without consuming the input character, we'll process
|
||||
+ * that on the next time round.
|
||||
+ */
|
||||
+ if (pw->limit - q < 2) {
|
||||
+ p--;
|
||||
+ break;
|
||||
+ }
|
||||
if (p == rlimit) {
|
||||
p--;
|
||||
break;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -39,6 +39,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
|
||||
file://CVE-2021-3781_1.patch \
|
||||
file://CVE-2021-3781_2.patch \
|
||||
file://CVE-2021-3781_3.patch \
|
||||
file://CVE-2023-28879.patch \
|
||||
"
|
||||
|
||||
SRC_URI = "${SRC_URI_BASE} \
|
||||
|
||||
40
meta/recipes-graphics/freetype/freetype/CVE-2023-2004.patch
Normal file
40
meta/recipes-graphics/freetype/freetype/CVE-2023-2004.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From e6fda039ad638866b7a6a5d046f03278ba1b7611 Mon Sep 17 00:00:00 2001
|
||||
From: Werner Lemberg <wl@gnu.org>
|
||||
Date: Mon, 14 Nov 2022 19:18:19 +0100
|
||||
Subject: [PATCH] * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Integer
|
||||
overflow.
|
||||
|
||||
Reported as
|
||||
|
||||
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50462
|
||||
|
||||
Upstream-Status: Backport [https://github.com/freetype/freetype/commit/e6fda039ad638866b7a6a5d046f03278ba1b7611]
|
||||
CVE: CVE-2023-2004
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
src/truetype/ttgxvar.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
|
||||
index 78d87dc..258d701 100644
|
||||
--- a/src/truetype/ttgxvar.c
|
||||
+++ b/src/truetype/ttgxvar.c
|
||||
@@ -43,6 +43,7 @@
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
+#include <freetype/internal/ftcalc.h>
|
||||
#include FT_INTERNAL_SFNT_H
|
||||
#include FT_TRUETYPE_TAGS_H
|
||||
#include FT_TRUETYPE_IDS_H
|
||||
@@ -1065,7 +1066,7 @@
|
||||
delta == 1 ? "" : "s",
|
||||
vertical ? "VVAR" : "HVAR" ));
|
||||
|
||||
- *avalue += delta;
|
||||
+ *avalue = ADD_INT( *avalue, delta );
|
||||
|
||||
Exit:
|
||||
return error;
|
||||
--
|
||||
2.17.1
|
||||
@@ -18,6 +18,7 @@ SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \
|
||||
file://CVE-2022-27404.patch \
|
||||
file://CVE-2022-27405.patch \
|
||||
file://CVE-2022-27406.patch \
|
||||
file://CVE-2023-2004.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "bd42e75127f8431923679480efb5ba8f"
|
||||
SRC_URI[sha256sum] = "16dbfa488a21fe827dc27eaf708f42f7aa3bb997d745d31a19781628c36ba26f"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 0ba6d8c37071131a49790243cdac55392ecf71ec Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed, 25 Jan 2023 11:41:40 +1000
|
||||
Subject: [PATCH] Xi: fix potential use-after-free in DeepCopyPointerClasses
|
||||
|
||||
CVE-2023-0494, ZDI-CAN-19596
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/0ba6d8c37071131a49790243cdac55392ecf71ec]
|
||||
CVE: CVE-2023-0494
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
Xi/exevents.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Xi/exevents.c b/Xi/exevents.c
|
||||
index 217baa9561..dcd4efb3bc 100644
|
||||
--- a/Xi/exevents.c
|
||||
+++ b/Xi/exevents.c
|
||||
@@ -619,8 +619,10 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
|
||||
memcpy(to->button->xkb_acts, from->button->xkb_acts,
|
||||
sizeof(XkbAction));
|
||||
}
|
||||
- else
|
||||
+ else {
|
||||
free(to->button->xkb_acts);
|
||||
+ to->button->xkb_acts = NULL;
|
||||
+ }
|
||||
|
||||
memcpy(to->button->labels, from->button->labels,
|
||||
from->button->numButtons * sizeof(Atom));
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 26ef545b3502f61ca722a7a3373507e88ef64110 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Mon, 13 Mar 2023 11:08:47 +0100
|
||||
Subject: [PATCH] composite: Fix use-after-free of the COW
|
||||
|
||||
ZDI-CAN-19866/CVE-2023-1393
|
||||
|
||||
If a client explicitly destroys the compositor overlay window (aka COW),
|
||||
we would leave a dangling pointer to that window in the CompScreen
|
||||
structure, which will trigger a use-after-free later.
|
||||
|
||||
Make sure to clear the CompScreen pointer to the COW when the latter gets
|
||||
destroyed explicitly by the client.
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/26ef545b3502f61ca722a7a3373507e88ef64110]
|
||||
CVE: CVE-2023-1393
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
composite/compwindow.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/composite/compwindow.c b/composite/compwindow.c
|
||||
index 4e2494b86b..b30da589e9 100644
|
||||
--- a/composite/compwindow.c
|
||||
+++ b/composite/compwindow.c
|
||||
@@ -620,6 +620,11 @@ compDestroyWindow(WindowPtr pWin)
|
||||
ret = (*pScreen->DestroyWindow) (pWin);
|
||||
cs->DestroyWindow = pScreen->DestroyWindow;
|
||||
pScreen->DestroyWindow = compDestroyWindow;
|
||||
+
|
||||
+ /* Did we just destroy the overlay window? */
|
||||
+ if (pWin == cs->pOverlayWin)
|
||||
+ cs->pOverlayWin = NULL;
|
||||
+
|
||||
/* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -14,6 +14,8 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
|
||||
file://CVE-2022-46342.patch \
|
||||
file://CVE-2022-46343.patch \
|
||||
file://CVE-2022-46344.patch \
|
||||
file://CVE-2023-0494.patch \
|
||||
file://CVE-2023-1393.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "453fc86aac8c629b3a5b77e8dcca30bf"
|
||||
SRC_URI[sha256sum] = "54b199c9280ff8bf0f73a54a759645bd0eeeda7255d1c99310d5b7595f3ac066"
|
||||
|
||||
@@ -108,7 +108,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
|
||||
file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
|
||||
file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
|
||||
file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
|
||||
file://LICENCE.qat_firmware;md5=72de83dfd9b87be7685ed099a39fbea4 \
|
||||
file://LICENSE.qcom;md5=164e3362a538eb11d3ac51e8e134294b \
|
||||
file://LICENSE.qcom_yamato;md5=d0de0eeccaf1843a850bf7a6777eec5c \
|
||||
file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \
|
||||
@@ -134,7 +134,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
"
|
||||
# WHENCE checksum is defined separately to ease overriding it if
|
||||
# class-devupstream is selected.
|
||||
WHENCE_CHKSUM = "aadb3cccbde1e53fc244a409e9bd5a22"
|
||||
WHENCE_CHKSUM = "0782deea054d4b1b7f10c92c3a245da4"
|
||||
|
||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
||||
# so that the license files will be copied from fetched source
|
||||
@@ -212,7 +212,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] = "6e3d9e8d52cffc4ec0dbe8533a8445328e0524a20f159a5b61c2706f983ce38a"
|
||||
SRC_URI[sha256sum] = "c3f9ad2bb5311cce2490f37a8052f836703d6936aabd840246b6576f1f71f607"
|
||||
|
||||
inherit allarch
|
||||
|
||||
1840
meta/recipes-kernel/linux/cve-exclusion.inc
Normal file
1840
meta/recipes-kernel/linux/cve-exclusion.inc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "f064f6017b7ce09ade0f365e1b7d776dc9e2e168"
|
||||
SRCREV_meta ?= "c7e2e528893abbebd14447510d38ded1ef98dcd2"
|
||||
SRCREV_machine ?= "c705bb899d37bbd61a87a2f850e4d6f04613a908"
|
||||
SRCREV_meta ?= "c7d5b73674d53f51772862b951d8cc56683ef04f"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.4.237"
|
||||
LINUX_VERSION ?= "5.4.243"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.4.237"
|
||||
LINUX_VERSION ?= "5.4.243"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
|
||||
KMETA = "kernel-meta"
|
||||
KCONF_BSP_AUDIT_LEVEL = "2"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "00c3a33c0f772ff1fa8902e8fe8856131c27a9b5"
|
||||
SRCREV_machine ?= "0693cbc007cf6a7b335edb5f78542d77b048d5dd"
|
||||
SRCREV_meta ?= "c7e2e528893abbebd14447510d38ded1ef98dcd2"
|
||||
SRCREV_machine_qemuarm ?= "140d4ff6bab1e5959377d4974ade490c837ef9cc"
|
||||
SRCREV_machine ?= "66990885cd865944a093b47ee7164ef2838f75a3"
|
||||
SRCREV_meta ?= "c7d5b73674d53f51772862b951d8cc56683ef04f"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -56,3 +56,6 @@ do_install_append(){
|
||||
|
||||
# enable kernel-sample for oeqa/runtime/cases's ksample.py test
|
||||
KERNEL_FEATURES_append_qemuall=" features/kernel-sample/kernel-sample.scc"
|
||||
|
||||
# CVE exclusion
|
||||
include recipes-kernel/linux/cve-exclusion.inc
|
||||
|
||||
@@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemux86-64 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "981be716d817e38d2d67269aab3caaa095bd2bdd"
|
||||
SRCREV_machine_qemuarm64 ?= "32083245f7eb993b85a33a8d30bd9f41128b6147"
|
||||
SRCREV_machine_qemumips ?= "4d002b5ac3b434b21ae58ac15cd73be3ae5ef5a8"
|
||||
SRCREV_machine_qemuppc ?= "82b4b51143a6beeb49efa548494bdb5c01f336b2"
|
||||
SRCREV_machine_qemuriscv64 ?= "936721bc390034d774b28393bf61808de8899718"
|
||||
SRCREV_machine_qemux86 ?= "936721bc390034d774b28393bf61808de8899718"
|
||||
SRCREV_machine_qemux86-64 ?= "936721bc390034d774b28393bf61808de8899718"
|
||||
SRCREV_machine_qemumips64 ?= "d662d749c441de5a09bfd8870cd10e41b1e27b6b"
|
||||
SRCREV_machine ?= "936721bc390034d774b28393bf61808de8899718"
|
||||
SRCREV_meta ?= "c7e2e528893abbebd14447510d38ded1ef98dcd2"
|
||||
SRCREV_machine_qemuarm ?= "3c105623bdba36118195e9c188d728edcc00345a"
|
||||
SRCREV_machine_qemuarm64 ?= "993c666984249097d093ee71eb3dffa0844fef6c"
|
||||
SRCREV_machine_qemumips ?= "2469bc35f1c2ef5ab2e85b7b705b32e33c6350c7"
|
||||
SRCREV_machine_qemuppc ?= "98229034b888ad319d7d030d279381a671c41dc0"
|
||||
SRCREV_machine_qemuriscv64 ?= "ba7e46214a9d60247170245cc09e2e1faf6622a1"
|
||||
SRCREV_machine_qemux86 ?= "ba7e46214a9d60247170245cc09e2e1faf6622a1"
|
||||
SRCREV_machine_qemux86-64 ?= "ba7e46214a9d60247170245cc09e2e1faf6622a1"
|
||||
SRCREV_machine_qemumips64 ?= "fb1936fa93be6bfd1b18cd8568cfc5b279904fa5"
|
||||
SRCREV_machine ?= "ba7e46214a9d60247170245cc09e2e1faf6622a1"
|
||||
SRCREV_meta ?= "c7d5b73674d53f51772862b951d8cc56683ef04f"
|
||||
|
||||
# remap qemuarm to qemuarma15 for the 5.4 kernel
|
||||
# KMACHINE_qemuarm ?= "qemuarma15"
|
||||
@@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
LINUX_VERSION ?= "5.4.237"
|
||||
LINUX_VERSION ?= "5.4.243"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -13,7 +13,7 @@ PR = "r9"
|
||||
|
||||
PACKAGECONFIG ??= "scripting tui libunwind"
|
||||
PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
|
||||
PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3"
|
||||
PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native"
|
||||
# gui support was added with kernel 3.6.35
|
||||
# since 3.10 libnewt was replaced by slang
|
||||
# to cover a wide range of kernel we add both dependencies
|
||||
|
||||
136
meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2022-48434.patch
Normal file
136
meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2022-48434.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
From d4b7b3c03ee2baf0166ce49dff17ec9beff684db Mon Sep 17 00:00:00 2001
|
||||
From: Anton Khirnov <anton@khirnov.net>
|
||||
Date: Fri, 2 Sep 2022 22:21:27 +0200
|
||||
Subject: [PATCH] lavc/pthread_frame: avoid leaving stale hwaccel state in
|
||||
worker threads
|
||||
|
||||
This state is not refcounted, so make sure it always has a well-defined
|
||||
owner.
|
||||
|
||||
Remove the block added in 091341f2ab5bd35ca1a2aae90503adc74f8d3523, as
|
||||
this commit also solves that issue in a more general way.
|
||||
|
||||
(cherry picked from commit cc867f2c09d2b69cee8a0eccd62aff002cbbfe11)
|
||||
Signed-off-by: Anton Khirnov <anton@khirnov.net>
|
||||
(cherry picked from commit 35aa7e70e7ec350319e7634a30d8d8aa1e6ecdda)
|
||||
Signed-off-by: Anton Khirnov <anton@khirnov.net>
|
||||
(cherry picked from commit 3bc28e9d1ab33627cea3c632dd6b0c33e22e93ba)
|
||||
Signed-off-by: Anton Khirnov <anton@khirnov.net>
|
||||
|
||||
CVE: CVE-2022-48434
|
||||
Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d4b7b3c03ee2baf0166ce49dff17ec9beff684db]
|
||||
Signed-off-by: Ranjitsinh Rathod ranjitsinh.rathod@kpit.com
|
||||
Comment: Hunk#6 refreshed to backport changes and other to remove patch-fuzz warnings
|
||||
---
|
||||
libavcodec/pthread_frame.c | 46 +++++++++++++++++++++++++++++---------
|
||||
1 file changed, 35 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
|
||||
index 36ac0ac..bbc5ba6 100644
|
||||
--- a/libavcodec/pthread_frame.c
|
||||
+++ b/libavcodec/pthread_frame.c
|
||||
@@ -135,6 +135,12 @@ typedef struct FrameThreadContext {
|
||||
* Set for the first N packets, where N is the number of threads.
|
||||
* While it is set, ff_thread_en/decode_frame won't return any results.
|
||||
*/
|
||||
+
|
||||
+ /* hwaccel state is temporarily stored here in order to transfer its ownership
|
||||
+ * to the next decoding thread without the need for extra synchronization */
|
||||
+ const AVHWAccel *stash_hwaccel;
|
||||
+ void *stash_hwaccel_context;
|
||||
+ void *stash_hwaccel_priv;
|
||||
} FrameThreadContext;
|
||||
|
||||
#define THREAD_SAFE_CALLBACKS(avctx) \
|
||||
@@ -211,9 +217,17 @@ static attribute_align_arg void *frame_worker_thread(void *arg)
|
||||
ff_thread_finish_setup(avctx);
|
||||
|
||||
if (p->hwaccel_serializing) {
|
||||
+ /* wipe hwaccel state to avoid stale pointers lying around;
|
||||
+ * the state was transferred to FrameThreadContext in
|
||||
+ * ff_thread_finish_setup(), so nothing is leaked */
|
||||
+ avctx->hwaccel = NULL;
|
||||
+ avctx->hwaccel_context = NULL;
|
||||
+ avctx->internal->hwaccel_priv_data = NULL;
|
||||
+
|
||||
p->hwaccel_serializing = 0;
|
||||
pthread_mutex_unlock(&p->parent->hwaccel_mutex);
|
||||
}
|
||||
+ av_assert0(!avctx->hwaccel);
|
||||
|
||||
if (p->async_serializing) {
|
||||
p->async_serializing = 0;
|
||||
@@ -275,14 +289,10 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src,
|
||||
dst->color_range = src->color_range;
|
||||
dst->chroma_sample_location = src->chroma_sample_location;
|
||||
|
||||
- dst->hwaccel = src->hwaccel;
|
||||
- dst->hwaccel_context = src->hwaccel_context;
|
||||
-
|
||||
dst->channels = src->channels;
|
||||
dst->sample_rate = src->sample_rate;
|
||||
dst->sample_fmt = src->sample_fmt;
|
||||
dst->channel_layout = src->channel_layout;
|
||||
- dst->internal->hwaccel_priv_data = src->internal->hwaccel_priv_data;
|
||||
|
||||
if (!!dst->hw_frames_ctx != !!src->hw_frames_ctx ||
|
||||
(dst->hw_frames_ctx && dst->hw_frames_ctx->data != src->hw_frames_ctx->data)) {
|
||||
@@ -415,6 +425,12 @@ static int submit_packet(PerThreadContext *p, AVCodecContext *user_avctx,
|
||||
pthread_mutex_unlock(&p->mutex);
|
||||
return err;
|
||||
}
|
||||
+
|
||||
+ /* transfer hwaccel state stashed from previous thread, if any */
|
||||
+ av_assert0(!p->avctx->hwaccel);
|
||||
+ FFSWAP(const AVHWAccel*, p->avctx->hwaccel, fctx->stash_hwaccel);
|
||||
+ FFSWAP(void*, p->avctx->hwaccel_context, fctx->stash_hwaccel_context);
|
||||
+ FFSWAP(void*, p->avctx->internal->hwaccel_priv_data, fctx->stash_hwaccel_priv);
|
||||
}
|
||||
|
||||
av_packet_unref(&p->avpkt);
|
||||
@@ -616,6 +632,14 @@ void ff_thread_finish_setup(AVCodecContext *avctx) {
|
||||
async_lock(p->parent);
|
||||
}
|
||||
|
||||
+ /* save hwaccel state for passing to the next thread;
|
||||
+ * this is done here so that this worker thread can wipe its own hwaccel
|
||||
+ * state after decoding, without requiring synchronization */
|
||||
+ av_assert0(!p->parent->stash_hwaccel);
|
||||
+ p->parent->stash_hwaccel = avctx->hwaccel;
|
||||
+ p->parent->stash_hwaccel_context = avctx->hwaccel_context;
|
||||
+ p->parent->stash_hwaccel_priv = avctx->internal->hwaccel_priv_data;
|
||||
+
|
||||
pthread_mutex_lock(&p->progress_mutex);
|
||||
if(atomic_load(&p->state) == STATE_SETUP_FINISHED){
|
||||
av_log(avctx, AV_LOG_WARNING, "Multiple ff_thread_finish_setup() calls\n");
|
||||
@@ -657,13 +681,6 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
|
||||
|
||||
park_frame_worker_threads(fctx, thread_count);
|
||||
|
||||
- if (fctx->prev_thread && fctx->prev_thread != fctx->threads)
|
||||
- if (update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0) < 0) {
|
||||
- av_log(avctx, AV_LOG_ERROR, "Final thread update failed\n");
|
||||
- fctx->prev_thread->avctx->internal->is_copy = fctx->threads->avctx->internal->is_copy;
|
||||
- fctx->threads->avctx->internal->is_copy = 1;
|
||||
- }
|
||||
-
|
||||
for (i = 0; i < thread_count; i++) {
|
||||
PerThreadContext *p = &fctx->threads[i];
|
||||
|
||||
@@ -713,6 +730,13 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
|
||||
pthread_mutex_destroy(&fctx->async_mutex);
|
||||
pthread_cond_destroy(&fctx->async_cond);
|
||||
|
||||
+ /* if we have stashed hwaccel state, move it to the user-facing context,
|
||||
+ * so it will be freed in avcodec_close() */
|
||||
+ av_assert0(!avctx->hwaccel);
|
||||
+ FFSWAP(const AVHWAccel*, avctx->hwaccel, fctx->stash_hwaccel);
|
||||
+ FFSWAP(void*, avctx->hwaccel_context, fctx->stash_hwaccel_context);
|
||||
+ FFSWAP(void*, avctx->internal->hwaccel_priv_data, fctx->stash_hwaccel_priv);
|
||||
+
|
||||
av_freep(&avctx->internal->thread_ctx);
|
||||
|
||||
if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -32,6 +32,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
|
||||
file://CVE-2022-1475.patch \
|
||||
file://CVE-2022-3109.patch \
|
||||
file://CVE-2022-3341.patch \
|
||||
file://CVE-2022-48434.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "348956fc2faa57a2f79bbb84ded9fbc3"
|
||||
SRC_URI[sha256sum] = "cb754255ab0ee2ea5f66f8850e1bd6ad5cac1cd855d0a2f4990fb8c668b0d29c"
|
||||
|
||||
55
meta/recipes-multimedia/webp/files/CVE-2023-1999.patch
Normal file
55
meta/recipes-multimedia/webp/files/CVE-2023-1999.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From a486d800b60d0af4cc0836bf7ed8f21e12974129 Mon Sep 17 00:00:00 2001
|
||||
From: James Zern <jzern@google.com>
|
||||
Date: Wed, 22 Feb 2023 22:15:47 -0800
|
||||
Subject: [PATCH] EncodeAlphaInternal: clear result->bw on error
|
||||
|
||||
This avoids a double free should the function fail prior to
|
||||
VP8BitWriterInit() and a previous trial result's buffer carried over.
|
||||
Previously in ApplyFiltersAndEncode() trial.bw (with a previous
|
||||
iteration's buffer) would be freed, followed by best.bw pointing to the
|
||||
same buffer.
|
||||
|
||||
Since:
|
||||
187d379d add a fallback to ALPHA_NO_COMPRESSION
|
||||
|
||||
In addition, check the return value of VP8BitWriterInit() in this
|
||||
function.
|
||||
|
||||
Bug: webp:603
|
||||
Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910
|
||||
|
||||
CVE: CVE-2023-1999
|
||||
Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/a486d800b60d0af4cc0836bf7ed8f21e12974129]
|
||||
Signed-off-by: Nikhil R <nikhil.r@kpit.com>
|
||||
---
|
||||
src/enc/alpha_enc.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c
|
||||
index f7c02690e3..7d205586fe 100644
|
||||
--- a/src/enc/alpha_enc.c
|
||||
+++ b/src/enc/alpha_enc.c
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "src/enc/vp8i_enc.h"
|
||||
#include "src/dsp/dsp.h"
|
||||
@@ -148,6 +149,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height,
|
||||
}
|
||||
} else {
|
||||
VP8LBitWriterWipeOut(&tmp_bw);
|
||||
+ memset(&result->bw, 0, sizeof(result->bw));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -162,7 +164,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height,
|
||||
header = method | (filter << 2);
|
||||
if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4;
|
||||
|
||||
- VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size);
|
||||
+ if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0;
|
||||
ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN);
|
||||
ok = ok && VP8BitWriterAppend(&result->bw, output, output_size);
|
||||
@@ -19,6 +19,10 @@ SRC_URI[sha256sum] = "98a052268cc4d5ece27f76572a7f50293f439c17a98e67c4ea0c7ed6f5
|
||||
|
||||
UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
|
||||
|
||||
SRC_URI += " \
|
||||
file://CVE-2023-1999.patch \
|
||||
"
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
--disable-wic \
|
||||
--enable-libwebpmux \
|
||||
|
||||
51
meta/recipes-support/curl/curl/CVE-2023-27534-pre1.patch
Normal file
51
meta/recipes-support/curl/curl/CVE-2023-27534-pre1.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
From 6c51adeb71da076c5c40a45e339e06bb4394a86b Mon Sep 17 00:00:00 2001
|
||||
From: Eric Vigeant <evigeant@gmail.com>
|
||||
Date: Wed, 2 Nov 2022 11:47:09 -0400
|
||||
Subject: [PATCH] cur_path: do not add '/' if homedir ends with one
|
||||
|
||||
When using SFTP and a path relative to the user home, do not add a
|
||||
trailing '/' to the user home dir if it already ends with one.
|
||||
|
||||
Closes #9844
|
||||
|
||||
CVE: CVE-2023-27534
|
||||
Note:
|
||||
- The upstream patch for CVE-2023-27534 does three things:
|
||||
1) creates new path with dynbuf(dynamic buffer)
|
||||
2) solves the tilde error which causes CVE-2023-27534
|
||||
3) modifies the below added functionality to not add a trailing "/" to the user home dir if it already ends with one with dynbuf.
|
||||
- dynbuf functionalities are added in curl in later versions and are not essential to fix the vulnerability but does add extra feature in later versions.
|
||||
- This patch completes the 3rd task of the patch which was implemented without using dynbuf
|
||||
Upstream-Status: Backport from [https://github.com/curl/curl/commit/6c51adeb71da076c5c40a45e339e06bb4394a86b]
|
||||
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
lib/curl_path.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/curl_path.c b/lib/curl_path.c
|
||||
index f429634..40b92ee 100644
|
||||
--- a/lib/curl_path.c
|
||||
+++ b/lib/curl_path.c
|
||||
@@ -70,10 +70,14 @@ CURLcode Curl_getworkingpath(struct connectdata *conn,
|
||||
/* It is referenced to the home directory, so strip the
|
||||
leading '/' */
|
||||
memcpy(real_path, homedir, homelen);
|
||||
- real_path[homelen] = '/';
|
||||
- real_path[homelen + 1] = '\0';
|
||||
+ /* Only add a trailing '/' if homedir does not end with one */
|
||||
+ if(homelen == 0 || real_path[homelen - 1] != '/') {
|
||||
+ real_path[homelen] = '/';
|
||||
+ homelen++;
|
||||
+ real_path[homelen] = '\0';
|
||||
+ }
|
||||
if(working_path_len > 3) {
|
||||
- memcpy(real_path + homelen + 1, working_path + 3,
|
||||
+ memcpy(real_path + homelen, working_path + 3,
|
||||
1 + working_path_len -3);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.24.4
|
||||
|
||||
@@ -3,121 +3,31 @@ From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Thu, 9 Mar 2023 16:22:11 +0100
|
||||
Subject: [PATCH] curl_path: create the new path with dynbuf
|
||||
|
||||
Closes #10729
|
||||
|
||||
CVE: CVE-2023-27534
|
||||
Upstream-Status: Backport [https://github.com/curl/curl/commit/4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6]
|
||||
Note: This patch is needed to backport CVE-2023-27534
|
||||
Upstream-Status: Backport from [https://github.com/curl/curl/commit/4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6]
|
||||
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
lib/curl_path.c | 71 ++++++++++++++++++++++++-------------------------
|
||||
1 file changed, 35 insertions(+), 36 deletions(-)
|
||||
lib/curl_path.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/curl_path.c b/lib/curl_path.c
|
||||
index f429634..e17db4b 100644
|
||||
index 40b92ee..598c5dd 100644
|
||||
--- a/lib/curl_path.c
|
||||
+++ b/lib/curl_path.c
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "escape.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
+#define MAX_SSHPATH_LEN 100000 /* arbitrary */
|
||||
+
|
||||
/* figure out the path to work with in this particular request */
|
||||
CURLcode Curl_getworkingpath(struct connectdata *conn,
|
||||
char *homedir, /* when SFTP is used */
|
||||
@@ -37,60 +39,57 @@ CURLcode Curl_getworkingpath(struct connectdata *conn,
|
||||
real path to work with */
|
||||
{
|
||||
struct Curl_easy *data = conn->data;
|
||||
- char *real_path = NULL;
|
||||
char *working_path;
|
||||
size_t working_path_len;
|
||||
+ struct dynbuf npath;
|
||||
CURLcode result =
|
||||
Curl_urldecode(data, data->state.up.path, 0, &working_path,
|
||||
&working_path_len, FALSE);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
+ /* new path to switch to in case we need to */
|
||||
+ Curl_dyn_init(&npath, MAX_SSHPATH_LEN);
|
||||
+
|
||||
/* Check for /~/, indicating relative to the user's home directory */
|
||||
- if(conn->handler->protocol & CURLPROTO_SCP) {
|
||||
- real_path = malloc(working_path_len + 1);
|
||||
- if(real_path == NULL) {
|
||||
+ if((data->conn->handler->protocol & CURLPROTO_SCP) &&
|
||||
+ (working_path_len > 3) && (!memcmp(working_path, "/~/", 3))) {
|
||||
+ /* It is referenced to the home directory, so strip the leading '/~/' */
|
||||
+ if(Curl_dyn_addn(&npath, &working_path[3], working_path_len - 3)) {
|
||||
free(working_path);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
- if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3)))
|
||||
- /* It is referenced to the home directory, so strip the leading '/~/' */
|
||||
- memcpy(real_path, working_path + 3, working_path_len - 2);
|
||||
- else
|
||||
- memcpy(real_path, working_path, 1 + working_path_len);
|
||||
@@ -60,7 +60,7 @@ CURLcode Curl_getworkingpath(struct connectdata *conn,
|
||||
memcpy(real_path, working_path, 1 + working_path_len);
|
||||
}
|
||||
- else if(conn->handler->protocol & CURLPROTO_SFTP) {
|
||||
else if(conn->handler->protocol & CURLPROTO_SFTP) {
|
||||
- if((working_path_len > 1) && (working_path[1] == '~')) {
|
||||
- size_t homelen = strlen(homedir);
|
||||
- real_path = malloc(homelen + working_path_len + 1);
|
||||
- if(real_path == NULL) {
|
||||
- free(working_path);
|
||||
- return CURLE_OUT_OF_MEMORY;
|
||||
- }
|
||||
- /* It is referenced to the home directory, so strip the
|
||||
- leading '/' */
|
||||
- memcpy(real_path, homedir, homelen);
|
||||
- real_path[homelen] = '/';
|
||||
- real_path[homelen + 1] = '\0';
|
||||
- if(working_path_len > 3) {
|
||||
- memcpy(real_path + homelen + 1, working_path + 3,
|
||||
- 1 + working_path_len -3);
|
||||
- }
|
||||
+ else if((data->conn->handler->protocol & CURLPROTO_SFTP) &&
|
||||
+ (working_path_len > 2) && !memcmp(working_path, "/~/", 3)) {
|
||||
+ size_t len;
|
||||
+ const char *p;
|
||||
+ int copyfrom = 3;
|
||||
+ if(Curl_dyn_add(&npath, homedir)) {
|
||||
+ free(working_path);
|
||||
+ return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
- else {
|
||||
- real_path = malloc(working_path_len + 1);
|
||||
- if(real_path == NULL) {
|
||||
- free(working_path);
|
||||
- return CURLE_OUT_OF_MEMORY;
|
||||
- }
|
||||
- memcpy(real_path, working_path, 1 + working_path_len);
|
||||
+ /* Copy a separating '/' if homedir does not end with one */
|
||||
+ len = Curl_dyn_len(&npath);
|
||||
+ p = Curl_dyn_ptr(&npath);
|
||||
+ if(len && (p[len-1] != '/'))
|
||||
+ copyfrom = 2;
|
||||
+
|
||||
+ if(Curl_dyn_addn(&npath,
|
||||
+ &working_path[copyfrom], working_path_len - copyfrom)) {
|
||||
+ free(working_path);
|
||||
+ return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
- free(working_path);
|
||||
+ if(Curl_dyn_len(&npath)) {
|
||||
+ free(working_path);
|
||||
|
||||
- /* store the pointer for the caller to receive */
|
||||
- *path = real_path;
|
||||
+ /* store the pointer for the caller to receive */
|
||||
+ *path = Curl_dyn_ptr(&npath);
|
||||
+ }
|
||||
+ else
|
||||
+ *path = working_path;
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
+ if((working_path_len > 2) && !memcmp(working_path, "/~/", 3)) {
|
||||
size_t homelen = strlen(homedir);
|
||||
real_path = malloc(homelen + working_path_len + 1);
|
||||
if(real_path == NULL) {
|
||||
--
|
||||
2.25.1
|
||||
2.24.4
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
|
||||
file://CVE-2022-35260.patch \
|
||||
file://CVE-2022-43552.patch \
|
||||
file://CVE-2023-23916.patch \
|
||||
file://CVE-2023-27534-pre1.patch \
|
||||
file://CVE-2023-27534.patch \
|
||||
file://CVE-2023-27538.patch \
|
||||
file://CVE-2023-27533.patch \
|
||||
|
||||
@@ -29,6 +29,12 @@ HOMEPAGE = "https://libbsd.freedesktop.org/wiki/"
|
||||
# License: public-domain-Colin-Plumb
|
||||
LICENSE = "BSD-3-Clause & BSD-4-Clause & ISC & PD"
|
||||
LICENSE_${PN} = "BSD-3-Clause & ISC & PD"
|
||||
LICENSE:${PN}-dbg = "BSD-3-Clause & ISC & PD"
|
||||
LICENSE:${PN}-dev = "BSD-3-Clause & ISC & PD"
|
||||
LICENSE:${PN}-doc = "BSD-3-Clause & BSD-4-Clause & ISC & PD"
|
||||
LICENSE:${PN}-locale = "BSD-3-Clause & ISC & PD"
|
||||
LICENSE:${PN}-src = "BSD-3-Clause & ISC & PD"
|
||||
LICENSE:${PN}-staticdev = "BSD-3-Clause & ISC & PD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=2120be0173469a06ed185b688e0e1ae0"
|
||||
SECTION = "libs"
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://no-path-adjust.patch \
|
||||
"
|
||||
|
||||
PV .= ".1429"
|
||||
SRCREV = "1a08a3e2a584889f19b84a27672134649b73da58"
|
||||
PV .= ".1527"
|
||||
SRCREV = "c28e7a2b2f23dbd246a1ad7ad7aaa6f7ab2e5887"
|
||||
|
||||
# Remove when 8.3 is out
|
||||
UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
|
||||
@@ -277,6 +277,13 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||
logger.debug("Added %d extra blocks to %s to get to %d total blocks",
|
||||
extra_blocks, part.mountpoint, blocks)
|
||||
|
||||
# required for compatibility with certain devices expecting file system
|
||||
# block count to be equal to partition block count
|
||||
if blocks < part.fixed_size:
|
||||
blocks = part.fixed_size
|
||||
logger.debug("Overriding %s to %d total blocks for compatibility",
|
||||
part.mountpoint, blocks)
|
||||
|
||||
# dosfs image, created by mkdosfs
|
||||
bootimg = "%s/boot.img" % cr_workdir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user