mirror of
https://git.yoctoproject.org/poky
synced 2026-02-22 01:19:41 +01:00
Compare commits
43 Commits
yocto-3.1.
...
yocto-3.1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa00730418 | ||
|
|
2b7d97af74 | ||
|
|
0711fd83cd | ||
|
|
b7420c15b3 | ||
|
|
f6f7f22992 | ||
|
|
a6aa9198ae | ||
|
|
ef1a755b3c | ||
|
|
c3c1224664 | ||
|
|
01cafb753b | ||
|
|
c0b9a560b7 | ||
|
|
308cefb86b | ||
|
|
9d340b5ed2 | ||
|
|
d86149ba65 | ||
|
|
93fa878377 | ||
|
|
213cf8004c | ||
|
|
b39245d723 | ||
|
|
21370990c6 | ||
|
|
4ddc26f4e4 | ||
|
|
50c5d5a788 | ||
|
|
6000f42a26 | ||
|
|
d143bac2a1 | ||
|
|
600261eafa | ||
|
|
5502d7326c | ||
|
|
32c25a0202 | ||
|
|
3903d753f9 | ||
|
|
eb8e26214e | ||
|
|
43a224f247 | ||
|
|
8ce85b6c6c | ||
|
|
bff6562223 | ||
|
|
3a7007cb35 | ||
|
|
b6df248293 | ||
|
|
e736037243 | ||
|
|
8e9e9263e3 | ||
|
|
2ea050d3fb | ||
|
|
29ae351d1d | ||
|
|
a83b2d8200 | ||
|
|
7bf5de9a3f | ||
|
|
1a9dac1b51 | ||
|
|
87ecc7cef6 | ||
|
|
e1f932366f | ||
|
|
17ecf62a19 | ||
|
|
f593a11bf5 | ||
|
|
90a6f6a110 |
@@ -1750,7 +1750,7 @@ class GitShallowTest(FetcherTest):
|
||||
self.add_empty_file('bsub', cwd=smdir)
|
||||
|
||||
self.git('submodule init', cwd=self.srcdir)
|
||||
self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
|
||||
self.git('-c protocol.file.allow=always submodule add file://%s' % smdir, cwd=self.srcdir)
|
||||
self.git('submodule update', cwd=self.srcdir)
|
||||
self.git('commit -m submodule -a', cwd=self.srcdir)
|
||||
|
||||
@@ -1782,7 +1782,7 @@ class GitShallowTest(FetcherTest):
|
||||
self.add_empty_file('bsub', cwd=smdir)
|
||||
|
||||
self.git('submodule init', cwd=self.srcdir)
|
||||
self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
|
||||
self.git('-c protocol.file.allow=always submodule add file://%s' % smdir, cwd=self.srcdir)
|
||||
self.git('submodule update', cwd=self.srcdir)
|
||||
self.git('commit -m submodule -a', cwd=self.srcdir)
|
||||
|
||||
|
||||
@@ -461,9 +461,16 @@ def lockfile(name, shared=False, retry=True, block=False):
|
||||
consider the possibility of sending a signal to the process to break
|
||||
out - at which point you want block=True rather than retry=True.
|
||||
"""
|
||||
basename = os.path.basename(name)
|
||||
if len(basename) > 255:
|
||||
root, ext = os.path.splitext(basename)
|
||||
basename = root[:255 - len(ext)] + ext
|
||||
|
||||
dirname = os.path.dirname(name)
|
||||
mkdirhier(dirname)
|
||||
|
||||
name = os.path.join(dirname, basename)
|
||||
|
||||
if not os.access(dirname, os.W_OK):
|
||||
logger.error("Unable to acquire lock '%s', directory is not writable",
|
||||
name)
|
||||
@@ -497,7 +504,7 @@ def lockfile(name, shared=False, retry=True, block=False):
|
||||
return lf
|
||||
lf.close()
|
||||
except OSError as e:
|
||||
if e.errno == errno.EACCES:
|
||||
if e.errno == errno.EACCES or e.errno == errno.ENAMETOOLONG:
|
||||
logger.error("Unable to acquire lock '%s', %s",
|
||||
e.strerror, name)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -2628,7 +2628,7 @@ Recipe Syntax
|
||||
Understanding recipe file syntax is important for writing recipes. The
|
||||
following list overviews the basic items that make up a BitBake recipe
|
||||
file. For more complete BitBake syntax descriptions, see the
|
||||
":doc:`bitbake-user-manual/bitbake-user-manual-metadata`"
|
||||
":doc:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata`"
|
||||
chapter of the BitBake User Manual.
|
||||
|
||||
- *Variable Assignments and Manipulations:* Variable assignments allow
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
DISTRO : "3.1.20"
|
||||
DISTRO : "3.1.21"
|
||||
DISTRO_NAME_NO_CAP : "dunfell"
|
||||
DISTRO_NAME : "Dunfell"
|
||||
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
|
||||
YOCTO_DOC_VERSION : "3.1.20"
|
||||
YOCTO_DOC_VERSION : "3.1.21"
|
||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.4"
|
||||
DISTRO_REL_TAG : "yocto-3.1.20"
|
||||
DOCCONF_VERSION : "3.1.20"
|
||||
DISTRO_REL_TAG : "yocto-3.1.21"
|
||||
DOCCONF_VERSION : "3.1.21"
|
||||
BITBAKE_SERIES : "1.46"
|
||||
POKYVERSION : "23.0.20"
|
||||
POKYVERSION : "23.0.21"
|
||||
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.20"
|
||||
DISTRO_VERSION = "3.1.21"
|
||||
DISTRO_CODENAME = "dunfell"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
|
||||
|
||||
@@ -60,7 +60,7 @@ python () {
|
||||
if externalsrcbuild:
|
||||
d.setVar('B', externalsrcbuild)
|
||||
else:
|
||||
d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
|
||||
d.setVar('B', '${WORKDIR}/${BPN}-${PV}')
|
||||
|
||||
local_srcuri = []
|
||||
fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
|
||||
@@ -207,8 +207,8 @@ def srctree_hash_files(d, srcdir=None):
|
||||
try:
|
||||
git_dir = os.path.join(s_dir,
|
||||
subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
|
||||
top_git_dir = os.path.join(s_dir, subprocess.check_output(['git', '-C', d.getVar("TOPDIR"), 'rev-parse', '--git-dir'],
|
||||
stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
|
||||
top_git_dir = os.path.join(d.getVar("TOPDIR"),
|
||||
subprocess.check_output(['git', '-C', d.getVar("TOPDIR"), 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
|
||||
if git_dir == top_git_dir:
|
||||
git_dir = None
|
||||
except subprocess.CalledProcessError:
|
||||
@@ -225,15 +225,16 @@ def srctree_hash_files(d, srcdir=None):
|
||||
env['GIT_INDEX_FILE'] = tmp_index.name
|
||||
subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env)
|
||||
git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
|
||||
submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
|
||||
for line in submodule_helper.splitlines():
|
||||
module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
|
||||
if os.path.isdir(module_dir):
|
||||
proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
proc.communicate()
|
||||
proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||
stdout, _ = proc.communicate()
|
||||
git_sha1 += stdout.decode("utf-8")
|
||||
if os.path.exists(".gitmodules"):
|
||||
submodule_helper = subprocess.check_output(["git", "config", "--file", ".gitmodules", "--get-regexp", "path"], cwd=s_dir, env=env).decode("utf-8")
|
||||
for line in submodule_helper.splitlines():
|
||||
module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
|
||||
if os.path.isdir(module_dir):
|
||||
proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
proc.communicate()
|
||||
proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||
stdout, _ = proc.communicate()
|
||||
git_sha1 += stdout.decode("utf-8")
|
||||
sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest()
|
||||
with open(oe_hash_file, 'w') as fobj:
|
||||
fobj.write(sha1)
|
||||
|
||||
@@ -59,6 +59,9 @@ FIT_SIGN_ALG ?= "rsa2048"
|
||||
# fitImage Padding Algo
|
||||
FIT_PAD_ALG ?= "pkcs-1.5"
|
||||
|
||||
# Arguments passed to mkimage for signing
|
||||
UBOOT_MKIMAGE_SIGN_ARGS ?= ""
|
||||
|
||||
#
|
||||
# Emit the fitImage ITS header
|
||||
#
|
||||
@@ -479,7 +482,8 @@ fitimage_assemble() {
|
||||
${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
|
||||
-F -k "${UBOOT_SIGN_KEYDIR}" \
|
||||
$add_key_to_u_boot \
|
||||
-r arch/${ARCH}/boot/${2}
|
||||
-r arch/${ARCH}/boot/${2} \
|
||||
${UBOOT_MKIMAGE_SIGN_ARGS}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -561,6 +561,14 @@ def check_tar_version(sanity_data):
|
||||
version = result.split()[3]
|
||||
if LooseVersion(version) < LooseVersion("1.28"):
|
||||
return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the project's buildtools-tarball from our last release or use scripts/install-buildtools).\n"
|
||||
|
||||
try:
|
||||
result = subprocess.check_output(["tar", "--help"], stderr=subprocess.STDOUT).decode('utf-8')
|
||||
if "--xattrs" not in result:
|
||||
return "Your tar doesn't support --xattrs, please use GNU tar.\n"
|
||||
except subprocess.CalledProcessError as e:
|
||||
return "Unable to execute tar --help, exit code %d\n%s\n" % (e.returncode, e.output)
|
||||
|
||||
return None
|
||||
|
||||
# We use git parameters and functionality only found in 1.7.8 or later
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
# to the distro running on the build machine.
|
||||
#
|
||||
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.35"
|
||||
UNINATIVE_VERSION = "3.6"
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.36"
|
||||
UNINATIVE_VERSION = "3.7"
|
||||
|
||||
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "d64831cf2792c8e470c2e42230660e1a8e5de56a579cdd59978791f663c2f3ed"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "2f0ee9b66b1bb2c85e2b592fb3c9c7f5d77399fa638d74961330cdb8de34ca3b"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "9bfc4c970495b3716b2f9e52c4df9f968c02463a9a95000f6657fbc3fde1f098"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "6a29bcae4b5b716d2d520e18800b33943b65f8a835eac1ff8793fc5ee65b4be6"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "3f6d52e64996570c716108d49f8108baccf499a283bbefae438c7266b7a93305"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "b110bf2e10fe420f5ca2f3ec55f048ee5f0a54c7e34856a3594e51eb2aea0570"
|
||||
|
||||
@@ -1323,7 +1323,7 @@ class DevtoolExtractTests(DevtoolBase):
|
||||
# Now really test deploy-target
|
||||
result = runCmd('devtool deploy-target -c %s root@%s' % (testrecipe, qemu.ip))
|
||||
# Run a test command to see if it was installed properly
|
||||
sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||
sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-rsa'
|
||||
result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand))
|
||||
# Check if it deployed all of the files with the right ownership/perms
|
||||
# First look on the host - need to do this under pseudo to get the correct ownership/perms
|
||||
|
||||
@@ -175,8 +175,8 @@ class TestImage(OESelftestTestCase):
|
||||
if "DISPLAY" not in os.environ:
|
||||
self.skipTest("virgl gtk test must be run inside a X session")
|
||||
distro = oe.lsb.distro_identifier()
|
||||
if distro and distro == 'almalinux-8.6':
|
||||
self.skipTest('virgl isn\'t working with Alma 8')
|
||||
if distro and distro.startswith('almalinux'):
|
||||
self.skipTest('virgl isn\'t working with Alma Linux')
|
||||
if distro and distro == 'debian-8':
|
||||
self.skipTest('virgl isn\'t working with Debian 8')
|
||||
if distro and distro == 'centos-7':
|
||||
@@ -191,6 +191,8 @@ class TestImage(OESelftestTestCase):
|
||||
self.skipTest('virgl isn\'t working with Fedora 36')
|
||||
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')
|
||||
|
||||
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
|
||||
sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native')
|
||||
|
||||
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
|
||||
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
|
||||
file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
|
||||
DEPENDS = "dbus glib-2.0"
|
||||
RDEPENDS:${PN} += "dbus"
|
||||
PROVIDES += "bluez-hcidump"
|
||||
RPROVIDES_${PN} += "bluez-hcidump"
|
||||
|
||||
@@ -57,6 +58,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
|
||||
file://CVE-2021-3658.patch \
|
||||
file://CVE-2022-0204.patch \
|
||||
file://CVE-2022-39176.patch \
|
||||
file://CVE-2022-3637.patch \
|
||||
"
|
||||
S = "${WORKDIR}/bluez-${PV}"
|
||||
|
||||
|
||||
39
meta/recipes-connectivity/bluez5/bluez5/CVE-2022-3637.patch
Normal file
39
meta/recipes-connectivity/bluez5/bluez5/CVE-2022-3637.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From b808b2852a0b48c6f9dbb038f932613cea3126c2 Mon Sep 17 00:00:00 2001
|
||||
From: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Date: Thu, 27 Oct 2022 09:51:27 +0530
|
||||
Subject: [PATCH] CVE-2022-3637
|
||||
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/monitor/jlink.c?id=1d6cfb8e625a944010956714c1802bc1e1fc6c4f]
|
||||
CVE: CVE-2022-3637
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
|
||||
monitor: Fix crash when using RTT backend
|
||||
|
||||
This fix regression introduced by "monitor: Fix memory leaks".
|
||||
J-Link shared library is in use if jlink_init() returns 0 and thus
|
||||
handle shall not be closed.
|
||||
---
|
||||
monitor/jlink.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/monitor/jlink.c b/monitor/jlink.c
|
||||
index afa9d93..5bd4aed 100644
|
||||
--- a/monitor/jlink.c
|
||||
+++ b/monitor/jlink.c
|
||||
@@ -120,9 +120,12 @@ int jlink_init(void)
|
||||
!jlink.tif_select || !jlink.setspeed ||
|
||||
!jlink.connect || !jlink.getsn ||
|
||||
!jlink.emu_getproductname ||
|
||||
- !jlink.rtterminal_control || !jlink.rtterminal_read)
|
||||
+ !jlink.rtterminal_control || !jlink.rtterminal_read) {
|
||||
+ dlclose(so);
|
||||
return -EIO;
|
||||
+ }
|
||||
|
||||
+ /* don't dlclose(so) here cause symbols from it are in use now */
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
120
meta/recipes-connectivity/dhcp/dhcp/CVE-2022-2928.patch
Normal file
120
meta/recipes-connectivity/dhcp/dhcp/CVE-2022-2928.patch
Normal file
@@ -0,0 +1,120 @@
|
||||
From 8a5d739eea10ee6e193f053b1662142d5657cbc6 Mon Sep 17 00:00:00 2001
|
||||
From: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Date: Thu, 6 Oct 2022 09:39:18 +0530
|
||||
Subject: [PATCH] CVE-2022-2928
|
||||
|
||||
Upstream-Status: Backport [https://downloads.isc.org/isc/dhcp/4.4.3-P1/patches/]
|
||||
CVE: CVE-2022-2928
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
common/options.c | 7 +++++
|
||||
common/tests/option_unittest.c | 54 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 61 insertions(+)
|
||||
|
||||
diff --git a/common/options.c b/common/options.c
|
||||
index a7ed84c..4e53bb4 100644
|
||||
--- a/common/options.c
|
||||
+++ b/common/options.c
|
||||
@@ -4452,6 +4452,8 @@ add_option(struct option_state *options,
|
||||
if (!option_cache_allocate(&oc, MDL)) {
|
||||
log_error("No memory for option cache adding %s (option %d).",
|
||||
option->name, option_num);
|
||||
+ /* Get rid of reference created during hash lookup. */
|
||||
+ option_dereference(&option, MDL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4463,6 +4465,8 @@ add_option(struct option_state *options,
|
||||
MDL)) {
|
||||
log_error("No memory for constant data adding %s (option %d).",
|
||||
option->name, option_num);
|
||||
+ /* Get rid of reference created during hash lookup. */
|
||||
+ option_dereference(&option, MDL);
|
||||
option_cache_dereference(&oc, MDL);
|
||||
return 0;
|
||||
}
|
||||
@@ -4471,6 +4475,9 @@ add_option(struct option_state *options,
|
||||
save_option(&dhcp_universe, options, oc);
|
||||
option_cache_dereference(&oc, MDL);
|
||||
|
||||
+ /* Get rid of reference created during hash lookup. */
|
||||
+ option_dereference(&option, MDL);
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
|
||||
diff --git a/common/tests/option_unittest.c b/common/tests/option_unittest.c
|
||||
index cd52cfb..690704d 100644
|
||||
--- a/common/tests/option_unittest.c
|
||||
+++ b/common/tests/option_unittest.c
|
||||
@@ -130,6 +130,59 @@ ATF_TC_BODY(pretty_print_option, tc)
|
||||
}
|
||||
|
||||
|
||||
+ATF_TC(add_option_ref_cnt);
|
||||
+
|
||||
+ATF_TC_HEAD(add_option_ref_cnt, tc)
|
||||
+{
|
||||
+ atf_tc_set_md_var(tc, "descr",
|
||||
+ "Verify add_option() does not leak option ref counts.");
|
||||
+}
|
||||
+
|
||||
+ATF_TC_BODY(add_option_ref_cnt, tc)
|
||||
+{
|
||||
+ struct option_state *options = NULL;
|
||||
+ struct option *option = NULL;
|
||||
+ unsigned int cid_code = DHO_DHCP_CLIENT_IDENTIFIER;
|
||||
+ char *cid_str = "1234";
|
||||
+ int refcnt_before = 0;
|
||||
+
|
||||
+ // Look up the option we're going to add.
|
||||
+ initialize_common_option_spaces();
|
||||
+ if (!option_code_hash_lookup(&option, dhcp_universe.code_hash,
|
||||
+ &cid_code, 0, MDL)) {
|
||||
+ atf_tc_fail("cannot find option definition?");
|
||||
+ }
|
||||
+
|
||||
+ // Get the option's reference count before we call add_options.
|
||||
+ refcnt_before = option->refcnt;
|
||||
+
|
||||
+ // Allocate a option_state to which to add an option.
|
||||
+ if (!option_state_allocate(&options, MDL)) {
|
||||
+ atf_tc_fail("cannot allocat options state");
|
||||
+ }
|
||||
+
|
||||
+ // Call add_option() to add the option to the option state.
|
||||
+ if (!add_option(options, cid_code, cid_str, strlen(cid_str))) {
|
||||
+ atf_tc_fail("add_option returned 0");
|
||||
+ }
|
||||
+
|
||||
+ // Verify that calling add_option() only adds 1 to the option ref count.
|
||||
+ if (option->refcnt != (refcnt_before + 1)) {
|
||||
+ atf_tc_fail("after add_option(), count is wrong, before %d, after: %d",
|
||||
+ refcnt_before, option->refcnt);
|
||||
+ }
|
||||
+
|
||||
+ // Derefrence the option_state, this should reduce the ref count to
|
||||
+ // it's starting value.
|
||||
+ option_state_dereference(&options, MDL);
|
||||
+
|
||||
+ // Verify that dereferencing option_state restores option ref count.
|
||||
+ if (option->refcnt != refcnt_before) {
|
||||
+ atf_tc_fail("after state deref, count is wrong, before %d, after: %d",
|
||||
+ refcnt_before, option->refcnt);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* This macro defines main() method that will call specified
|
||||
test cases. tp and simple_test_case names can be whatever you want
|
||||
as long as it is a valid variable identifier. */
|
||||
@@ -137,6 +190,7 @@ ATF_TP_ADD_TCS(tp)
|
||||
{
|
||||
ATF_TP_ADD_TC(tp, option_refcnt);
|
||||
ATF_TP_ADD_TC(tp, pretty_print_option);
|
||||
+ ATF_TP_ADD_TC(tp, add_option_ref_cnt);
|
||||
|
||||
return (atf_no_error());
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
40
meta/recipes-connectivity/dhcp/dhcp/CVE-2022-2929.patch
Normal file
40
meta/recipes-connectivity/dhcp/dhcp/CVE-2022-2929.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 5c959166ebee7605e2048de573f2475b4d731ff7 Mon Sep 17 00:00:00 2001
|
||||
From: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Date: Thu, 6 Oct 2022 09:42:59 +0530
|
||||
Subject: [PATCH] CVE-2022-2929
|
||||
|
||||
Upstream-Status: Backport [https://downloads.isc.org/isc/dhcp/4.4.3-P1/patches/]
|
||||
CVE: CVE-2022-2929
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
common/options.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/common/options.c b/common/options.c
|
||||
index 4e53bb4..28800fc 100644
|
||||
--- a/common/options.c
|
||||
+++ b/common/options.c
|
||||
@@ -454,16 +454,16 @@ int fqdn_universe_decode (struct option_state *options,
|
||||
while (s < &bp -> data[0] + length + 2) {
|
||||
len = *s;
|
||||
if (len > 63) {
|
||||
- log_info ("fancy bits in fqdn option");
|
||||
- return 0;
|
||||
+ log_info ("label length exceeds 63 in fqdn option");
|
||||
+ goto bad;
|
||||
}
|
||||
if (len == 0) {
|
||||
terminated = 1;
|
||||
break;
|
||||
}
|
||||
if (s + len > &bp -> data [0] + length + 3) {
|
||||
- log_info ("fqdn tag longer than buffer");
|
||||
- return 0;
|
||||
+ log_info ("fqdn label longer than buffer");
|
||||
+ goto bad;
|
||||
}
|
||||
|
||||
if (first_len == 0) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -11,6 +11,8 @@ SRC_URI += "file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.pat
|
||||
file://0013-fixup_use_libbind.patch \
|
||||
file://0001-workaround-busybox-limitation-in-linux-dhclient-script.patch \
|
||||
file://CVE-2021-25217.patch \
|
||||
file://CVE-2022-2928.patch \
|
||||
file://CVE-2022-2929.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "2afdaf8498dc1edaf3012efdd589b3e1"
|
||||
|
||||
@@ -24,7 +24,7 @@ SRC_URI_append_class-nativesdk = " \
|
||||
file://environment.d-openssl.sh \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca"
|
||||
SRC_URI[sha256sum] = "c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa"
|
||||
|
||||
inherit lib_package multilib_header multilib_script ptest
|
||||
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
|
||||
@@ -51,6 +51,7 @@ PACKAGECONFIG_class-nativesdk ??= "xattr"
|
||||
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
|
||||
PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
|
||||
PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,,"
|
||||
PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl"
|
||||
|
||||
# [ df mktemp nice printenv base64 gets a special treatment and is not included in this
|
||||
bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
|
||||
|
||||
@@ -10,8 +10,7 @@ SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
|
||||
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "dfe8a71f412e0b53be26ed4fbfdc91c4"
|
||||
SRC_URI[sha256sum] = "f77620140ecb4cdc67f37fb444f8a6bea70b5b6461f12f1cbe2cec60fa7de5fe"
|
||||
SRC_URI[sha256sum] = "bc42d196c1756ac520d61bf3ccd6f42013617def45dd1e591a6091abf51dca38"
|
||||
|
||||
EXTRA_OECONF = "--disable-xml-docs \
|
||||
--disable-doxygen-docs \
|
||||
|
||||
33
meta/recipes-core/expat/expat/CVE-2022-43680.patch
Normal file
33
meta/recipes-core/expat/expat/CVE-2022-43680.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 5290462a7ea1278a8d5c0d5b2860d4e244f997e4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Tue, 20 Sep 2022 02:44:34 +0200
|
||||
Subject: [PATCH] lib: Fix overeager DTD destruction in
|
||||
XML_ExternalEntityParserCreate
|
||||
|
||||
CVE: CVE-2022-43680
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/5290462a7ea1278a8d5c0d5b2860d4e244f997e4.patch]
|
||||
Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
|
||||
Comments: Hunk refreshed
|
||||
---
|
||||
lib/xmlparse.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index aacd6e7fc..57bf103cc 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -1035,6 +1035,14 @@ parserCreate(const XML_Char *encodingNam
|
||||
parserInit(parser, encodingName);
|
||||
|
||||
if (encodingName && ! parser->m_protocolEncodingName) {
|
||||
+ if (dtd) {
|
||||
+ // We need to stop the upcoming call to XML_ParserFree from happily
|
||||
+ // destroying parser->m_dtd because the DTD is shared with the parent
|
||||
+ // parser and the only guard that keeps XML_ParserFree from destroying
|
||||
+ // parser->m_dtd is parser->m_isParamEntity but it will be set to
|
||||
+ // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
|
||||
+ parser->m_dtd = NULL;
|
||||
+ }
|
||||
XML_ParserFree(parser);
|
||||
return NULL;
|
||||
}
|
||||
@@ -21,6 +21,7 @@ SRC_URI = "git://github.com/libexpat/libexpat.git;protocol=https;branch=master \
|
||||
file://CVE-2022-25315.patch \
|
||||
file://libtool-tag.patch \
|
||||
file://CVE-2022-40674.patch \
|
||||
file://CVE-2022-43680.patch \
|
||||
"
|
||||
|
||||
SRCREV = "a7bc26b69768f7fb24f0c7976fae24b157b85b13"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SRCBRANCH ?= "release/2.31/master"
|
||||
PV = "2.31+git${SRCPV}"
|
||||
SRCREV_glibc ?= "3ef8be9b89ef98300951741f381eb79126ac029f"
|
||||
SRCREV_glibc ?= "d4b75594574ab8a9c2c41209cd8c62aac76b5a04"
|
||||
SRCREV_localedef ?= "cd9f958c4c94a638fa7b2b4e21627364f1a1a655"
|
||||
|
||||
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
|
||||
|
||||
@@ -11,14 +11,10 @@ CVE: CVE-2021-33574 patch#1
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
NEWS | 4 ++++
|
||||
sysdeps/unix/sysv/linux/mq_notify.c | 15 ++++++++++-----
|
||||
2 files changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: git/NEWS
|
||||
===================================================================
|
||||
--- git.orig/NEWS
|
||||
+++ git/NEWS
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 8a20d3c4e3..be489243ac 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -7,6 +7,10 @@ using `glibc' in the "product" field.
|
||||
|
||||
Version 2.31.1
|
||||
@@ -28,12 +24,12 @@ Index: git/NEWS
|
||||
+ attribute with a non-default affinity mask.
|
||||
+
|
||||
The following bugs are resolved with this release:
|
||||
[14231] stdio-common tests memory requirements
|
||||
[19519] iconv(1) with -c option hangs on illegal multi-byte sequences
|
||||
(CVE-2016-10228)
|
||||
Index: git/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
===================================================================
|
||||
--- git.orig/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
+++ git/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
index f288bac477..dd47f0b777 100644
|
||||
--- a/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
+++ b/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
@@ -135,8 +135,11 @@ helper_thread (void *arg)
|
||||
(void) __pthread_barrier_wait (¬ify_barrier);
|
||||
}
|
||||
@@ -48,7 +44,7 @@ Index: git/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -257,8 +260,7 @@ mq_notify (mqd_t mqdes, const struct sig
|
||||
@@ -257,8 +260,7 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
|
||||
if (data.attr == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -58,7 +54,7 @@ Index: git/sysdeps/unix/sysv/linux/mq_notify.c
|
||||
}
|
||||
|
||||
/* Construct the new request. */
|
||||
@@ -272,7 +274,10 @@ mq_notify (mqd_t mqdes, const struct sig
|
||||
@@ -272,7 +274,10 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
|
||||
|
||||
/* If it failed, free the allocated memory. */
|
||||
if (__glibc_unlikely (retval != 0))
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "9ae91384970637cd8880c07071fb44b7f5574012"
|
||||
SRCREV ?= "2b7d97af746e4713036050e730d28b9b13a3c4a2"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dunfell \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -17,6 +17,9 @@ deltask do_populate_sysroot
|
||||
# Use a negative value to skip the update
|
||||
CVE_DB_UPDATE_INTERVAL ?= "86400"
|
||||
|
||||
# Timeout for blocking socket operations, such as the connection attempt.
|
||||
CVE_SOCKET_TIMEOUT ?= "60"
|
||||
|
||||
python () {
|
||||
if not bb.data.inherits_class("cve-check", d):
|
||||
raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
|
||||
@@ -39,6 +42,8 @@ python do_fetch() {
|
||||
db_file = d.getVar("CVE_CHECK_DB_FILE")
|
||||
db_dir = os.path.dirname(db_file)
|
||||
|
||||
cve_socket_timeout = int(d.getVar("CVE_SOCKET_TIMEOUT"))
|
||||
|
||||
if os.path.exists("{0}-journal".format(db_file)):
|
||||
# If a journal is present the last update might have been interrupted. In that case,
|
||||
# just wipe any leftovers and force the DB to be recreated.
|
||||
@@ -77,7 +82,7 @@ python do_fetch() {
|
||||
|
||||
# Retrieve meta last modified date
|
||||
try:
|
||||
response = urllib.request.urlopen(meta_url)
|
||||
response = urllib.request.urlopen(meta_url, timeout=cve_socket_timeout)
|
||||
except urllib.error.URLError as e:
|
||||
cve_f.write('Warning: CVE db update error, Unable to fetch CVE data.\n\n')
|
||||
bb.warn("Failed to fetch CVE data (%s)" % e.reason)
|
||||
@@ -104,7 +109,7 @@ python do_fetch() {
|
||||
|
||||
# Update db with current year json file
|
||||
try:
|
||||
response = urllib.request.urlopen(json_url)
|
||||
response = urllib.request.urlopen(json_url, timeout=cve_socket_timeout)
|
||||
if response:
|
||||
update_db(conn, gzip.decompress(response.read()).decode('utf-8'))
|
||||
conn.execute("insert or replace into META values (?, ?)", [year, last_modified]).close()
|
||||
|
||||
@@ -24,7 +24,7 @@ BRANCH ?= "binutils-2_34-branch"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
|
||||
|
||||
SRCREV ?= "d4b50999b3b287b5f984ade2f8734aa8c9359440"
|
||||
SRCREV ?= "c4e78c0868a22971680217a41fdb73516a26813d"
|
||||
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${BRANCH};protocol=git"
|
||||
SRC_URI = "\
|
||||
${BINUTILS_GIT_URI} \
|
||||
|
||||
@@ -199,6 +199,6 @@ Index: git/bfd/ChangeLog
|
||||
+ * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
|
||||
+ strdup(0).
|
||||
+
|
||||
2020-02-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
2021-05-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR binutils/25355
|
||||
PR 27755
|
||||
|
||||
@@ -7,31 +7,49 @@ Adds missing sanity checks for avr device info note, to avoid
|
||||
potential buffer overflows. Uses bfd_malloc_and_get_section for
|
||||
sanity checking section size.
|
||||
|
||||
PR 27290
|
||||
PR 27293
|
||||
PR 27295
|
||||
* od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
|
||||
Use bfd_malloc_and_get_section.
|
||||
(elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
|
||||
check namesz. Return NULL if descsz is too small. Ensure
|
||||
string table is terminated.
|
||||
(elf32_avr_get_device_info): Formatting. Add note_size param.
|
||||
Sanity check note.
|
||||
(elf32_avr_dump_mem_usage): Adjust to suit.
|
||||
PR 27290
|
||||
PR 27293
|
||||
PR 27295
|
||||
* od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
|
||||
Use bfd_malloc_and_get_section.
|
||||
(elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
|
||||
check namesz. Return NULL if descsz is too small. Ensure
|
||||
string table is terminated.
|
||||
(elf32_avr_get_device_info): Formatting. Add note_size param.
|
||||
Sanity check note.
|
||||
(elf32_avr_dump_mem_usage): Adjust to suit.
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2021-3549
|
||||
Signed-of-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
binutils/ChangeLog | 14 +++++++++
|
||||
binutils/od-elf32_avr.c | 66 ++++++++++++++++++++++++++---------------
|
||||
2 files changed, 56 insertions(+), 24 deletions(-)
|
||||
|
||||
Index: git/binutils/od-elf32_avr.c
|
||||
===================================================================
|
||||
--- git.orig/binutils/od-elf32_avr.c
|
||||
+++ git/binutils/od-elf32_avr.c
|
||||
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
|
||||
index 1e9a96c9bb6..02e5019204e 100644
|
||||
--- a/binutils/ChangeLog
|
||||
+++ b/binutils/ChangeLog
|
||||
@@ -1,3 +1,17 @@
|
||||
+2021-02-11 Alan Modra <amodra@gmail.com>
|
||||
+
|
||||
+ PR 27290
|
||||
+ PR 27293
|
||||
+ PR 27295
|
||||
+ * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
|
||||
+ Use bfd_malloc_and_get_section.
|
||||
+ (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
|
||||
+ check namesz. Return NULL if descsz is too small. Ensure
|
||||
+ string table is terminated.
|
||||
+ (elf32_avr_get_device_info): Formatting. Add note_size param.
|
||||
+ Sanity check note.
|
||||
+ (elf32_avr_dump_mem_usage): Adjust to suit.
|
||||
+
|
||||
2020-03-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* ar.c (main): Update bfd_plugin_set_program_name call.
|
||||
diff --git a/binutils/od-elf32_avr.c b/binutils/od-elf32_avr.c
|
||||
index 5ec99957fe9..1d32bce918e 100644
|
||||
--- a/binutils/od-elf32_avr.c
|
||||
+++ b/binutils/od-elf32_avr.c
|
||||
@@ -77,23 +77,29 @@ elf32_avr_filter (bfd *abfd)
|
||||
return bfd_get_flavour (abfd) == bfd_target_elf_flavour;
|
||||
}
|
||||
@@ -70,7 +88,7 @@ Index: git/binutils/od-elf32_avr.c
|
||||
{
|
||||
Elf_External_Note *xnp = (Elf_External_Note *) contents;
|
||||
Elf_Internal_Note in;
|
||||
@@ -107,42 +113,54 @@ static char* elf32_avr_get_note_desc (bf
|
||||
@@ -107,42 +113,54 @@ static char* elf32_avr_get_note_desc (bfd *abfd, char *contents,
|
||||
if (in.namesz > contents - in.namedata + size)
|
||||
return NULL;
|
||||
|
||||
@@ -163,25 +181,3 @@ Index: git/binutils/od-elf32_avr.c
|
||||
}
|
||||
|
||||
elf32_avr_get_memory_usage (abfd, &text_usage, &data_usage,
|
||||
Index: git/binutils/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/binutils/ChangeLog
|
||||
+++ git/binutils/ChangeLog
|
||||
@@ -1,3 +1,17 @@
|
||||
+2021-02-11 Alan Modra <amodra@gmail.com>
|
||||
+
|
||||
+ PR 27290
|
||||
+ PR 27293
|
||||
+ PR 27295
|
||||
+ * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
|
||||
+ Use bfd_malloc_and_get_section.
|
||||
+ (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
|
||||
+ check namesz. Return NULL if descsz is too small. Ensure
|
||||
+ string table is terminated.
|
||||
+ (elf32_avr_get_device_info): Formatting. Add note_size param.
|
||||
+ Sanity check note.
|
||||
+ (elf32_avr_dump_mem_usage): Adjust to suit.
|
||||
+
|
||||
2020-02-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
@@ -41,6 +41,8 @@ SRC_URI += "\
|
||||
file://0002-CVE-2022-32190.patch \
|
||||
file://0003-CVE-2022-32190.patch \
|
||||
file://0004-CVE-2022-32190.patch \
|
||||
file://CVE-2022-2880.patch \
|
||||
file://CVE-2022-2879.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
|
||||
|
||||
111
meta/recipes-devtools/go/go-1.14/CVE-2022-2879.patch
Normal file
111
meta/recipes-devtools/go/go-1.14/CVE-2022-2879.patch
Normal file
@@ -0,0 +1,111 @@
|
||||
From 9d339f1d0f53c4116a7cb4acfa895f31a07212ee Mon Sep 17 00:00:00 2001
|
||||
From: Damien Neil <dneil@google.com>
|
||||
Date: Fri, 2 Sep 2022 20:45:18 -0700
|
||||
Subject: [PATCH] archive/tar: limit size of headers
|
||||
|
||||
Set a 1MiB limit on special file blocks (PAX headers, GNU long names,
|
||||
GNU link names), to avoid reading arbitrarily large amounts of data
|
||||
into memory.
|
||||
|
||||
Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting
|
||||
this issue.
|
||||
|
||||
Fixes CVE-2022-2879
|
||||
Updates #54853
|
||||
Fixes #55926
|
||||
|
||||
Change-Id: I85136d6ff1e0af101a112190e027987ab4335680
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1565555
|
||||
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
(cherry picked from commit 6ee768cef6b82adf7a90dcf367a1699ef694f3b2)
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1591053
|
||||
Reviewed-by: Julie Qiu <julieqiu@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/438498
|
||||
TryBot-Result: Gopher Robot <gobot@golang.org>
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Reviewed-by: Carlos Amedee <carlos@golang.org>
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
|
||||
Run-TryBot: Carlos Amedee <carlos@golang.org>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/0a723816cd2]
|
||||
CVE: CVE-2022-2879
|
||||
Signed-off-by: Sunil Kumar <sukumar@mvista.com>
|
||||
---
|
||||
src/archive/tar/format.go | 4 ++++
|
||||
src/archive/tar/reader.go | 14 ++++++++++++--
|
||||
src/archive/tar/writer.go | 3 +++
|
||||
3 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/archive/tar/format.go b/src/archive/tar/format.go
|
||||
index cfe24a5..6642364 100644
|
||||
--- a/src/archive/tar/format.go
|
||||
+++ b/src/archive/tar/format.go
|
||||
@@ -143,6 +143,10 @@ const (
|
||||
blockSize = 512 // Size of each block in a tar stream
|
||||
nameSize = 100 // Max length of the name field in USTAR format
|
||||
prefixSize = 155 // Max length of the prefix field in USTAR format
|
||||
+
|
||||
+ // Max length of a special file (PAX header, GNU long name or link).
|
||||
+ // This matches the limit used by libarchive.
|
||||
+ maxSpecialFileSize = 1 << 20
|
||||
)
|
||||
|
||||
// blockPadding computes the number of bytes needed to pad offset up to the
|
||||
diff --git a/src/archive/tar/reader.go b/src/archive/tar/reader.go
|
||||
index 4f9135b..e996595 100644
|
||||
--- a/src/archive/tar/reader.go
|
||||
+++ b/src/archive/tar/reader.go
|
||||
@@ -104,7 +104,7 @@ func (tr *Reader) next() (*Header, error) {
|
||||
continue // This is a meta header affecting the next header
|
||||
case TypeGNULongName, TypeGNULongLink:
|
||||
format.mayOnlyBe(FormatGNU)
|
||||
- realname, err := ioutil.ReadAll(tr)
|
||||
+ realname, err := readSpecialFile(tr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -294,7 +294,7 @@ func mergePAX(hdr *Header, paxHdrs map[string]string) (err error) {
|
||||
// parsePAX parses PAX headers.
|
||||
// If an extended header (type 'x') is invalid, ErrHeader is returned
|
||||
func parsePAX(r io.Reader) (map[string]string, error) {
|
||||
- buf, err := ioutil.ReadAll(r)
|
||||
+ buf, err := readSpecialFile(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -827,6 +827,16 @@ func tryReadFull(r io.Reader, b []byte) (n int, err error) {
|
||||
return n, err
|
||||
}
|
||||
|
||||
+// readSpecialFile is like ioutil.ReadAll except it returns
|
||||
+// ErrFieldTooLong if more than maxSpecialFileSize is read.
|
||||
+func readSpecialFile(r io.Reader) ([]byte, error) {
|
||||
+ buf, err := ioutil.ReadAll(io.LimitReader(r, maxSpecialFileSize+1))
|
||||
+ if len(buf) > maxSpecialFileSize {
|
||||
+ return nil, ErrFieldTooLong
|
||||
+ }
|
||||
+ return buf, err
|
||||
+}
|
||||
+
|
||||
// discard skips n bytes in r, reporting an error if unable to do so.
|
||||
func discard(r io.Reader, n int64) error {
|
||||
// If possible, Seek to the last byte before the end of the data section.
|
||||
diff --git a/src/archive/tar/writer.go b/src/archive/tar/writer.go
|
||||
index e80498d..893eac0 100644
|
||||
--- a/src/archive/tar/writer.go
|
||||
+++ b/src/archive/tar/writer.go
|
||||
@@ -199,6 +199,9 @@ func (tw *Writer) writePAXHeader(hdr *Header, paxHdrs map[string]string) error {
|
||||
flag = TypeXHeader
|
||||
}
|
||||
data := buf.String()
|
||||
+ if len(data) > maxSpecialFileSize {
|
||||
+ return ErrFieldTooLong
|
||||
+ }
|
||||
if err := tw.writeRawFile(name, data, flag, FormatPAX); err != nil || isGlobal {
|
||||
return err // Global headers return here
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
164
meta/recipes-devtools/go/go-1.14/CVE-2022-2880.patch
Normal file
164
meta/recipes-devtools/go/go-1.14/CVE-2022-2880.patch
Normal file
@@ -0,0 +1,164 @@
|
||||
From 753e3f8da191c2ac400407d83c70f46900769417 Mon Sep 17 00:00:00 2001
|
||||
From: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Date: Thu, 27 Oct 2022 12:22:41 +0530
|
||||
Subject: [PATCH] CVE-2022-2880
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/9d2c73a9fd69e45876509bb3bdb2af99bf77da1e]
|
||||
CVE: CVE-2022-2880
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
|
||||
net/http/httputil: avoid query parameter
|
||||
|
||||
Query parameter smuggling occurs when a proxy's interpretation
|
||||
of query parameters differs from that of a downstream server.
|
||||
Change ReverseProxy to avoid forwarding ignored query parameters.
|
||||
|
||||
Remove unparsable query parameters from the outbound request
|
||||
|
||||
* if req.Form != nil after calling ReverseProxy.Director; and
|
||||
* before calling ReverseProxy.Rewrite.
|
||||
|
||||
This change preserves the existing behavior of forwarding the
|
||||
raw query untouched if a Director hook does not parse the query
|
||||
by calling Request.ParseForm (possibly indirectly).
|
||||
---
|
||||
src/net/http/httputil/reverseproxy.go | 36 +++++++++++
|
||||
src/net/http/httputil/reverseproxy_test.go | 74 ++++++++++++++++++++++
|
||||
2 files changed, 110 insertions(+)
|
||||
|
||||
diff --git a/src/net/http/httputil/reverseproxy.go b/src/net/http/httputil/reverseproxy.go
|
||||
index 2072a5f..c6fb873 100644
|
||||
--- a/src/net/http/httputil/reverseproxy.go
|
||||
+++ b/src/net/http/httputil/reverseproxy.go
|
||||
@@ -212,6 +212,9 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
|
||||
p.Director(outreq)
|
||||
+ if outreq.Form != nil {
|
||||
+ outreq.URL.RawQuery = cleanQueryParams(outreq.URL.RawQuery)
|
||||
+ }
|
||||
outreq.Close = false
|
||||
|
||||
reqUpType := upgradeType(outreq.Header)
|
||||
@@ -561,3 +564,36 @@ func (c switchProtocolCopier) copyToBackend(errc chan<- error) {
|
||||
_, err := io.Copy(c.backend, c.user)
|
||||
errc <- err
|
||||
}
|
||||
+
|
||||
+func cleanQueryParams(s string) string {
|
||||
+ reencode := func(s string) string {
|
||||
+ v, _ := url.ParseQuery(s)
|
||||
+ return v.Encode()
|
||||
+ }
|
||||
+ for i := 0; i < len(s); {
|
||||
+ switch s[i] {
|
||||
+ case ';':
|
||||
+ return reencode(s)
|
||||
+ case '%':
|
||||
+ if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
|
||||
+ return reencode(s)
|
||||
+ }
|
||||
+ i += 3
|
||||
+ default:
|
||||
+ i++
|
||||
+ }
|
||||
+ }
|
||||
+ return s
|
||||
+}
|
||||
+
|
||||
+func ishex(c byte) bool {
|
||||
+ switch {
|
||||
+ case '0' <= c && c <= '9':
|
||||
+ return true
|
||||
+ case 'a' <= c && c <= 'f':
|
||||
+ return true
|
||||
+ case 'A' <= c && c <= 'F':
|
||||
+ return true
|
||||
+ }
|
||||
+ return false
|
||||
+}
|
||||
diff --git a/src/net/http/httputil/reverseproxy_test.go b/src/net/http/httputil/reverseproxy_test.go
|
||||
index 9a7223a..bc87a3b 100644
|
||||
--- a/src/net/http/httputil/reverseproxy_test.go
|
||||
+++ b/src/net/http/httputil/reverseproxy_test.go
|
||||
@@ -1269,3 +1269,77 @@ func TestSingleJoinSlash(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+const (
|
||||
+ testWantsCleanQuery = true
|
||||
+ testWantsRawQuery = false
|
||||
+)
|
||||
+
|
||||
+func TestReverseProxyQueryParameterSmugglingDirectorDoesNotParseForm(t *testing.T) {
|
||||
+ testReverseProxyQueryParameterSmuggling(t, testWantsRawQuery, func(u *url.URL) *ReverseProxy {
|
||||
+ proxyHandler := NewSingleHostReverseProxy(u)
|
||||
+ oldDirector := proxyHandler.Director
|
||||
+ proxyHandler.Director = func(r *http.Request) {
|
||||
+ oldDirector(r)
|
||||
+ }
|
||||
+ return proxyHandler
|
||||
+ })
|
||||
+}
|
||||
+
|
||||
+func TestReverseProxyQueryParameterSmugglingDirectorParsesForm(t *testing.T) {
|
||||
+ testReverseProxyQueryParameterSmuggling(t, testWantsCleanQuery, func(u *url.URL) *ReverseProxy {
|
||||
+ proxyHandler := NewSingleHostReverseProxy(u)
|
||||
+ oldDirector := proxyHandler.Director
|
||||
+ proxyHandler.Director = func(r *http.Request) {
|
||||
+ // Parsing the form causes ReverseProxy to remove unparsable
|
||||
+ // query parameters before forwarding.
|
||||
+ r.FormValue("a")
|
||||
+ oldDirector(r)
|
||||
+ }
|
||||
+ return proxyHandler
|
||||
+ })
|
||||
+}
|
||||
+
|
||||
+func testReverseProxyQueryParameterSmuggling(t *testing.T, wantCleanQuery bool, newProxy func(*url.URL) *ReverseProxy) {
|
||||
+ const content = "response_content"
|
||||
+ backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
+ w.Write([]byte(r.URL.RawQuery))
|
||||
+ }))
|
||||
+ defer backend.Close()
|
||||
+ backendURL, err := url.Parse(backend.URL)
|
||||
+ if err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ proxyHandler := newProxy(backendURL)
|
||||
+ frontend := httptest.NewServer(proxyHandler)
|
||||
+ defer frontend.Close()
|
||||
+
|
||||
+ // Don't spam output with logs of queries containing semicolons.
|
||||
+ backend.Config.ErrorLog = log.New(io.Discard, "", 0)
|
||||
+ frontend.Config.ErrorLog = log.New(io.Discard, "", 0)
|
||||
+
|
||||
+ for _, test := range []struct {
|
||||
+ rawQuery string
|
||||
+ cleanQuery string
|
||||
+ }{{
|
||||
+ rawQuery: "a=1&a=2;b=3",
|
||||
+ cleanQuery: "a=1",
|
||||
+ }, {
|
||||
+ rawQuery: "a=1&a=%zz&b=3",
|
||||
+ cleanQuery: "a=1&b=3",
|
||||
+ }} {
|
||||
+ res, err := frontend.Client().Get(frontend.URL + "?" + test.rawQuery)
|
||||
+ if err != nil {
|
||||
+ t.Fatalf("Get: %v", err)
|
||||
+ }
|
||||
+ defer res.Body.Close()
|
||||
+ body, _ := io.ReadAll(res.Body)
|
||||
+ wantQuery := test.rawQuery
|
||||
+ if wantCleanQuery {
|
||||
+ wantQuery = test.cleanQuery
|
||||
+ }
|
||||
+ if got, want := string(body), wantQuery; got != want {
|
||||
+ t.Errorf("proxy forwarded raw query %q as %q, want %q", test.rawQuery, got, want)
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
From 4dc2cae3abd75f386374d0635d00443b897d0672 Mon Sep 17 00:00:00 2001
|
||||
From: "Miss Islington (bot)"
|
||||
<31488909+miss-islington@users.noreply.github.com>
|
||||
Date: Wed, 22 Jun 2022 01:42:52 -0700
|
||||
Subject: [PATCH] gh-87389: Fix an open redirection vulnerability in
|
||||
http.server. (GH-93879) (GH-94094)
|
||||
|
||||
Fix an open redirection vulnerability in the `http.server` module when
|
||||
an URI path starts with `//` that could produce a 301 Location header
|
||||
with a misleading target. Vulnerability discovered, and logic fix
|
||||
proposed, by Hamza Avvan (@hamzaavvan).
|
||||
|
||||
Test and comments authored by Gregory P. Smith [Google].
|
||||
(cherry picked from commit 4abab6b603dd38bec1168e9a37c40a48ec89508e)
|
||||
|
||||
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
||||
|
||||
Signed-off-by: Riyaz Khan <Riyaz.Khan@kpit.com>
|
||||
|
||||
CVE: CVE-2021-28861
|
||||
|
||||
Upstream-Status: Backport [https://github.com/python/cpython/commit/4dc2cae3abd75f386374d0635d00443b897d0672]
|
||||
|
||||
---
|
||||
Lib/http/server.py | 7 +++
|
||||
Lib/test/test_httpservers.py | 53 ++++++++++++++++++-
|
||||
...2-06-15-20-09-23.gh-issue-87389.QVaC3f.rst | 3 ++
|
||||
3 files changed, 61 insertions(+), 2 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2022-06-15-20-09-23.gh-issue-87389.QVaC3f.rst
|
||||
|
||||
diff --git a/Lib/http/server.py b/Lib/http/server.py
|
||||
index 38f7accad7a3..39de35458c38 100644
|
||||
--- a/Lib/http/server.py
|
||||
+++ b/Lib/http/server.py
|
||||
@@ -332,6 +332,13 @@ def parse_request(self):
|
||||
return False
|
||||
self.command, self.path = command, path
|
||||
|
||||
+ # gh-87389: The purpose of replacing '//' with '/' is to protect
|
||||
+ # against open redirect attacks possibly triggered if the path starts
|
||||
+ # with '//' because http clients treat //path as an absolute URI
|
||||
+ # without scheme (similar to http://path) rather than a path.
|
||||
+ if self.path.startswith('//'):
|
||||
+ self.path = '/' + self.path.lstrip('/') # Reduce to a single /
|
||||
+
|
||||
# Examine the headers and look for a Connection directive.
|
||||
try:
|
||||
self.headers = http.client.parse_headers(self.rfile,
|
||||
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
|
||||
index 87d4924a34b3..fb026188f0b4 100644
|
||||
--- a/Lib/test/test_httpservers.py
|
||||
+++ b/Lib/test/test_httpservers.py
|
||||
@@ -330,7 +330,7 @@ class request_handler(NoLogRequestHandler, SimpleHTTPRequestHandler):
|
||||
pass
|
||||
|
||||
def setUp(self):
|
||||
- BaseTestCase.setUp(self)
|
||||
+ super().setUp()
|
||||
self.cwd = os.getcwd()
|
||||
basetempdir = tempfile.gettempdir()
|
||||
os.chdir(basetempdir)
|
||||
@@ -358,7 +358,7 @@ def tearDown(self):
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
- BaseTestCase.tearDown(self)
|
||||
+ super().tearDown()
|
||||
|
||||
def check_status_and_reason(self, response, status, data=None):
|
||||
def close_conn():
|
||||
@@ -414,6 +414,55 @@ def test_undecodable_filename(self):
|
||||
self.check_status_and_reason(response, HTTPStatus.OK,
|
||||
data=support.TESTFN_UNDECODABLE)
|
||||
|
||||
+ def test_get_dir_redirect_location_domain_injection_bug(self):
|
||||
+ """Ensure //evil.co/..%2f../../X does not put //evil.co/ in Location.
|
||||
+
|
||||
+ //netloc/ in a Location header is a redirect to a new host.
|
||||
+ https://github.com/python/cpython/issues/87389
|
||||
+
|
||||
+ This checks that a path resolving to a directory on our server cannot
|
||||
+ resolve into a redirect to another server.
|
||||
+ """
|
||||
+ os.mkdir(os.path.join(self.tempdir, 'existing_directory'))
|
||||
+ url = f'/python.org/..%2f..%2f..%2f..%2f..%2f../%0a%0d/../{self.tempdir_name}/existing_directory'
|
||||
+ expected_location = f'{url}/' # /python.org.../ single slash single prefix, trailing slash
|
||||
+ # Canonicalizes to /tmp/tempdir_name/existing_directory which does
|
||||
+ # exist and is a dir, triggering the 301 redirect logic.
|
||||
+ response = self.request(url)
|
||||
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
|
||||
+ location = response.getheader('Location')
|
||||
+ self.assertEqual(location, expected_location, msg='non-attack failed!')
|
||||
+
|
||||
+ # //python.org... multi-slash prefix, no trailing slash
|
||||
+ attack_url = f'/{url}'
|
||||
+ response = self.request(attack_url)
|
||||
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
|
||||
+ location = response.getheader('Location')
|
||||
+ self.assertFalse(location.startswith('//'), msg=location)
|
||||
+ self.assertEqual(location, expected_location,
|
||||
+ msg='Expected Location header to start with a single / and '
|
||||
+ 'end with a / as this is a directory redirect.')
|
||||
+
|
||||
+ # ///python.org... triple-slash prefix, no trailing slash
|
||||
+ attack3_url = f'//{url}'
|
||||
+ response = self.request(attack3_url)
|
||||
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
|
||||
+ self.assertEqual(response.getheader('Location'), expected_location)
|
||||
+
|
||||
+ # If the second word in the http request (Request-URI for the http
|
||||
+ # method) is a full URI, we don't worry about it, as that'll be parsed
|
||||
+ # and reassembled as a full URI within BaseHTTPRequestHandler.send_head
|
||||
+ # so no errant scheme-less //netloc//evil.co/ domain mixup can happen.
|
||||
+ attack_scheme_netloc_2slash_url = f'https://pypi.org/{url}'
|
||||
+ expected_scheme_netloc_location = f'{attack_scheme_netloc_2slash_url}/'
|
||||
+ response = self.request(attack_scheme_netloc_2slash_url)
|
||||
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
|
||||
+ location = response.getheader('Location')
|
||||
+ # We're just ensuring that the scheme and domain make it through, if
|
||||
+ # there are or aren't multiple slashes at the start of the path that
|
||||
+ # follows that isn't important in this Location: header.
|
||||
+ self.assertTrue(location.startswith('https://pypi.org/'), msg=location)
|
||||
+
|
||||
def test_get(self):
|
||||
#constructs the path relative to the root directory of the HTTPServer
|
||||
response = self.request(self.base_url + '/test')
|
||||
diff --git a/Misc/NEWS.d/next/Security/2022-06-15-20-09-23.gh-issue-87389.QVaC3f.rst b/Misc/NEWS.d/next/Security/2022-06-15-20-09-23.gh-issue-87389.QVaC3f.rst
|
||||
new file mode 100644
|
||||
index 000000000000..029d437190de
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2022-06-15-20-09-23.gh-issue-87389.QVaC3f.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+:mod:`http.server`: Fix an open redirection vulnerability in the HTTP server
|
||||
+when an URI path starts with ``//``. Vulnerability discovered, and initial
|
||||
+fix proposed, by Hamza Avvan.
|
||||
@@ -34,7 +34,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||
file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \
|
||||
file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
|
||||
file://makerace.patch \
|
||||
file://CVE-2021-28861.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_class-native = " \
|
||||
@@ -43,8 +42,8 @@ SRC_URI_append_class-native = " \
|
||||
file://0001-Don-t-search-system-for-headers-libraries.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "c4b7100dcaace9d33ab1fda9a3a038d6"
|
||||
SRC_URI[sha256sum] = "6f309077012040aa39fe8f0c61db8c0fa1c45136763299d375c9e5756f09cf57"
|
||||
SRC_URI[md5sum] = "78710eed185b71f4198d354502ff62c9"
|
||||
SRC_URI[sha256sum] = "5d77e278271ba803e9909a41a4f3baca006181c93ada682a5e5fe8dc4a24c5f3"
|
||||
|
||||
# exclude pre-releases for both python 2.x and 3.x
|
||||
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
|
||||
@@ -111,6 +111,8 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
|
||||
file://CVE-2021-4207.patch \
|
||||
file://CVE-2022-0216-1.patch \
|
||||
file://CVE-2022-0216-2.patch \
|
||||
file://CVE-2021-3750.patch \
|
||||
file://CVE-2021-3638.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
@@ -274,6 +276,9 @@ PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone"
|
||||
# libnfs is currently provided by meta-kodi
|
||||
PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs"
|
||||
PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi"
|
||||
PACKAGECONFIG[vde] = "--enable-vde,--disable-vde"
|
||||
PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd"
|
||||
PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
|
||||
|
||||
INSANE_SKIP_${PN} = "arch"
|
||||
|
||||
|
||||
80
meta/recipes-devtools/qemu/qemu/CVE-2021-3638.patch
Normal file
80
meta/recipes-devtools/qemu/qemu/CVE-2021-3638.patch
Normal file
@@ -0,0 +1,80 @@
|
||||
From b68d13531d8882ba66994b9f767b6a8f822464f3 Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
Date: Fri, 11 Nov 2022 12:43:26 +0530
|
||||
Subject: [PATCH] CVE-2021-3638
|
||||
|
||||
Upstream-Status: Backport [https://lists.nongnu.org/archive/html/qemu-devel/2021-09/msg01682.html]
|
||||
CVE: CVE-2021-3638
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
|
||||
When building QEMU with DEBUG_ATI defined then running with
|
||||
'-device ati-vga,romfile="" -d unimp,guest_errors -trace ati\*'
|
||||
we get:
|
||||
|
||||
ati_mm_write 4 0x16c0 DP_CNTL <- 0x1
|
||||
ati_mm_write 4 0x146c DP_GUI_MASTER_CNTL <- 0x2
|
||||
ati_mm_write 4 0x16c8 DP_MIX <- 0xff0000
|
||||
ati_mm_write 4 0x16c4 DP_DATATYPE <- 0x2
|
||||
ati_mm_write 4 0x224 CRTC_OFFSET <- 0x0
|
||||
ati_mm_write 4 0x142c DST_PITCH_OFFSET <- 0xfe00000
|
||||
ati_mm_write 4 0x1420 DST_Y <- 0x3fff
|
||||
ati_mm_write 4 0x1410 DST_HEIGHT <- 0x3fff
|
||||
ati_mm_write 4 0x1588 DST_WIDTH_X <- 0x3fff3fff
|
||||
ati_2d_blt: vram:0x7fff5fa00000 addr:0 ds:0x7fff61273800 stride:2560 bpp:32
|
||||
rop:0xff
|
||||
ati_2d_blt: 0 0 0, 0 127 0, (0,0) -> (16383,16383) 16383x16383 > ^
|
||||
ati_2d_blt: pixman_fill(dst:0x7fff5fa00000, stride:254, bpp:8, x:16383,
|
||||
y:16383, w:16383, h:16383, xor:0xff000000)
|
||||
Thread 3 "qemu-system-i38" received signal SIGSEGV, Segmentation fault.
|
||||
(gdb) bt
|
||||
#0 0x00007ffff7f62ce0 in sse2_fill.lto_priv () at /lib64/libpixman-1.so.0
|
||||
#1 0x00007ffff7f09278 in pixman_fill () at /lib64/libpixman-1.so.0
|
||||
#2 0x0000555557b5a9af in ati_2d_blt (s=0x631000028800) at
|
||||
hw/display/ati_2d.c:196
|
||||
#3 0x0000555557b4b5a2 in ati_mm_write (opaque=0x631000028800, addr=5512,
|
||||
data=1073692671, size=4) at hw/display/ati.c:843
|
||||
#4 0x0000555558b90ec4 in memory_region_write_accessor (mr=0x631000039cc0,
|
||||
addr=5512, ..., size=4, ...) at softmmu/memory.c:492
|
||||
|
||||
Commit 584acf34cb0 ("ati-vga: Fix reverse bit blts") introduced
|
||||
the local dst_x and dst_y which adjust the (x, y) coordinates
|
||||
depending on the direction in the SRCCOPY ROP3 operation, but
|
||||
forgot to address the same issue for the PATCOPY, BLACKNESS and
|
||||
WHITENESS operations, which also call pixman_fill().
|
||||
|
||||
Fix that now by using the adjusted coordinates in the pixman_fill
|
||||
call, and update the related debug printf().
|
||||
---
|
||||
hw/display/ati_2d.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
|
||||
index 4dc10ea7..692bec91 100644
|
||||
--- a/hw/display/ati_2d.c
|
||||
+++ b/hw/display/ati_2d.c
|
||||
@@ -84,7 +84,7 @@ void ati_2d_blt(ATIVGAState *s)
|
||||
DPRINTF("%d %d %d, %d %d %d, (%d,%d) -> (%d,%d) %dx%d %c %c\n",
|
||||
s->regs.src_offset, s->regs.dst_offset, s->regs.default_offset,
|
||||
s->regs.src_pitch, s->regs.dst_pitch, s->regs.default_pitch,
|
||||
- s->regs.src_x, s->regs.src_y, s->regs.dst_x, s->regs.dst_y,
|
||||
+ s->regs.src_x, s->regs.src_y, dst_x, dst_y,
|
||||
s->regs.dst_width, s->regs.dst_height,
|
||||
(s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ? '>' : '<'),
|
||||
(s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? 'v' : '^'));
|
||||
@@ -180,11 +180,11 @@ void ati_2d_blt(ATIVGAState *s)
|
||||
dst_stride /= sizeof(uint32_t);
|
||||
DPRINTF("pixman_fill(%p, %d, %d, %d, %d, %d, %d, %x)\n",
|
||||
dst_bits, dst_stride, bpp,
|
||||
- s->regs.dst_x, s->regs.dst_y,
|
||||
+ dst_x, dst_y,
|
||||
s->regs.dst_width, s->regs.dst_height,
|
||||
filler);
|
||||
pixman_fill((uint32_t *)dst_bits, dst_stride, bpp,
|
||||
- s->regs.dst_x, s->regs.dst_y,
|
||||
+ dst_x, dst_y,
|
||||
s->regs.dst_width, s->regs.dst_height,
|
||||
filler);
|
||||
if (dst_bits >= s->vga.vram_ptr + s->vga.vbe_start_addr &&
|
||||
--
|
||||
2.25.1
|
||||
|
||||
180
meta/recipes-devtools/qemu/qemu/CVE-2021-3750.patch
Normal file
180
meta/recipes-devtools/qemu/qemu/CVE-2021-3750.patch
Normal file
@@ -0,0 +1,180 @@
|
||||
From 1938fbc7ec197e2612ab2ce36dd69bff19208aa5 Mon Sep 17 00:00:00 2001
|
||||
From: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Date: Mon, 10 Oct 2022 17:44:41 +0530
|
||||
Subject: [PATCH] CVE-2021-3750
|
||||
|
||||
Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=b9d383ab797f54ae5fa8746117770709921dc529 && https://git.qemu.org/?p=qemu.git;a=commit;h=3ab6fdc91b72e156da22848f0003ff4225690ced && https://git.qemu.org/?p=qemu.git;a=commit;h=58e74682baf4e1ad26b064d8c02e5bc99c75c5d9]
|
||||
CVE: CVE-2021-3750
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
exec.c | 55 +++++++++++++++++++++++++++++++-------
|
||||
hw/intc/arm_gicv3_redist.c | 4 +--
|
||||
include/exec/memattrs.h | 9 +++++++
|
||||
3 files changed, 56 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/exec.c b/exec.c
|
||||
index 1360051a..10581d8d 100644
|
||||
--- a/exec.c
|
||||
+++ b/exec.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "qemu/config-file.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/qemu-print.h"
|
||||
+#include "qemu/log.h"
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#include "qemu.h"
|
||||
#else /* !CONFIG_USER_ONLY */
|
||||
@@ -3118,6 +3119,33 @@ static bool prepare_mmio_access(MemoryRegion *mr)
|
||||
return release_lock;
|
||||
}
|
||||
|
||||
+/**
|
||||
++ * flatview_access_allowed
|
||||
++ * @mr: #MemoryRegion to be accessed
|
||||
++ * @attrs: memory transaction attributes
|
||||
++ * @addr: address within that memory region
|
||||
++ * @len: the number of bytes to access
|
||||
++ *
|
||||
++ * Check if a memory transaction is allowed.
|
||||
++ *
|
||||
++ * Returns: true if transaction is allowed, false if denied.
|
||||
++ */
|
||||
+static bool flatview_access_allowed(MemoryRegion *mr, MemTxAttrs attrs,
|
||||
+ hwaddr addr, hwaddr len)
|
||||
+{
|
||||
+ if (likely(!attrs.memory)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (memory_region_is_ram(mr)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ qemu_log_mask(LOG_GUEST_ERROR,
|
||||
+ "Invalid access to non-RAM device at "
|
||||
+ "addr 0x%" HWADDR_PRIX ", size %" HWADDR_PRIu ", "
|
||||
+ "region '%s'\n", addr, len, memory_region_name(mr));
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
/* Called within RCU critical section. */
|
||||
static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr,
|
||||
MemTxAttrs attrs,
|
||||
@@ -3131,7 +3159,10 @@ static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr,
|
||||
bool release_lock = false;
|
||||
|
||||
for (;;) {
|
||||
- if (!memory_access_is_direct(mr, true)) {
|
||||
+ if (!flatview_access_allowed(mr, attrs, addr1, l)) {
|
||||
+ result |= MEMTX_ACCESS_ERROR;
|
||||
+ /* Keep going. */
|
||||
+ } else if (!memory_access_is_direct(mr, true)) {
|
||||
release_lock |= prepare_mmio_access(mr);
|
||||
l = memory_access_size(mr, l, addr1);
|
||||
/* XXX: could force current_cpu to NULL to avoid
|
||||
@@ -3173,14 +3204,14 @@ static MemTxResult flatview_write(FlatView *fv, hwaddr addr, MemTxAttrs attrs,
|
||||
hwaddr l;
|
||||
hwaddr addr1;
|
||||
MemoryRegion *mr;
|
||||
- MemTxResult result = MEMTX_OK;
|
||||
|
||||
l = len;
|
||||
mr = flatview_translate(fv, addr, &addr1, &l, true, attrs);
|
||||
- result = flatview_write_continue(fv, addr, attrs, buf, len,
|
||||
- addr1, l, mr);
|
||||
-
|
||||
- return result;
|
||||
+ if (!flatview_access_allowed(mr, attrs, addr, len)) {
|
||||
+ return MEMTX_ACCESS_ERROR;
|
||||
+ }
|
||||
+ return flatview_write_continue(fv, addr, attrs, buf, len,
|
||||
+ addr1, l, mr);
|
||||
}
|
||||
|
||||
/* Called within RCU critical section. */
|
||||
@@ -3195,7 +3226,10 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr,
|
||||
bool release_lock = false;
|
||||
|
||||
for (;;) {
|
||||
- if (!memory_access_is_direct(mr, false)) {
|
||||
+ if (!flatview_access_allowed(mr, attrs, addr1, l)) {
|
||||
+ result |= MEMTX_ACCESS_ERROR;
|
||||
+ /* Keep going. */
|
||||
+ } else if (!memory_access_is_direct(mr, false)) {
|
||||
/* I/O case */
|
||||
release_lock |= prepare_mmio_access(mr);
|
||||
l = memory_access_size(mr, l, addr1);
|
||||
@@ -3238,6 +3272,9 @@ static MemTxResult flatview_read(FlatView *fv, hwaddr addr,
|
||||
|
||||
l = len;
|
||||
mr = flatview_translate(fv, addr, &addr1, &l, false, attrs);
|
||||
+ if (!flatview_access_allowed(mr, attrs, addr, len)) {
|
||||
+ return MEMTX_ACCESS_ERROR;
|
||||
+ }
|
||||
return flatview_read_continue(fv, addr, attrs, buf, len,
|
||||
addr1, l, mr);
|
||||
}
|
||||
@@ -3474,12 +3511,10 @@ bool address_space_access_valid(AddressSpace *as, hwaddr addr,
|
||||
MemTxAttrs attrs)
|
||||
{
|
||||
FlatView *fv;
|
||||
- bool result;
|
||||
|
||||
RCU_READ_LOCK_GUARD();
|
||||
fv = address_space_to_flatview(as);
|
||||
- result = flatview_access_valid(fv, addr, len, is_write, attrs);
|
||||
- return result;
|
||||
+ return flatview_access_valid(fv, addr, len, is_write, attrs);
|
||||
}
|
||||
|
||||
static hwaddr
|
||||
diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c
|
||||
index 8645220d..44368e28 100644
|
||||
--- a/hw/intc/arm_gicv3_redist.c
|
||||
+++ b/hw/intc/arm_gicv3_redist.c
|
||||
@@ -450,7 +450,7 @@ MemTxResult gicv3_redist_read(void *opaque, hwaddr offset, uint64_t *data,
|
||||
break;
|
||||
}
|
||||
|
||||
- if (r == MEMTX_ERROR) {
|
||||
+ if (r != MEMTX_OK) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: invalid guest read at offset " TARGET_FMT_plx
|
||||
"size %u\n", __func__, offset, size);
|
||||
@@ -507,7 +507,7 @@ MemTxResult gicv3_redist_write(void *opaque, hwaddr offset, uint64_t data,
|
||||
break;
|
||||
}
|
||||
|
||||
- if (r == MEMTX_ERROR) {
|
||||
+ if (r != MEMTX_OK) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: invalid guest write at offset " TARGET_FMT_plx
|
||||
"size %u\n", __func__, offset, size);
|
||||
diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h
|
||||
index 95f2d20d..9fb98bc1 100644
|
||||
--- a/include/exec/memattrs.h
|
||||
+++ b/include/exec/memattrs.h
|
||||
@@ -35,6 +35,14 @@ typedef struct MemTxAttrs {
|
||||
unsigned int secure:1;
|
||||
/* Memory access is usermode (unprivileged) */
|
||||
unsigned int user:1;
|
||||
+ /*
|
||||
+ * Bus interconnect and peripherals can access anything (memories,
|
||||
+ * devices) by default. By setting the 'memory' bit, bus transaction
|
||||
+ * are restricted to "normal" memories (per the AMBA documentation)
|
||||
+ * versus devices. Access to devices will be logged and rejected
|
||||
+ * (see MEMTX_ACCESS_ERROR).
|
||||
+ */
|
||||
+ unsigned int memory:1;
|
||||
/* Requester ID (for MSI for example) */
|
||||
unsigned int requester_id:16;
|
||||
/* Invert endianness for this page */
|
||||
@@ -66,6 +74,7 @@ typedef struct MemTxAttrs {
|
||||
#define MEMTX_OK 0
|
||||
#define MEMTX_ERROR (1U << 0) /* device returned an error */
|
||||
#define MEMTX_DECODE_ERROR (1U << 1) /* nothing at that address */
|
||||
+#define MEMTX_ACCESS_ERROR (1U << 2) /* access denied */
|
||||
typedef uint32_t MemTxResult;
|
||||
|
||||
#endif
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -6,7 +6,7 @@ SECTION = "base"
|
||||
LICENSE = "PD & BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
|
||||
|
||||
PV = "2022c"
|
||||
PV = "2022d"
|
||||
|
||||
SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
|
||||
http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
|
||||
@@ -14,6 +14,6 @@ SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz
|
||||
|
||||
UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
|
||||
|
||||
SRC_URI[tzcode.sha256sum] = "3e7ce1f3620cc0481907c7e074d69910793285bffe0ca331ef1a6d1ae3ea90cc"
|
||||
SRC_URI[tzdata.sha256sum] = "6974f4e348bf2323274b56dff9e7500247e3159eaa4b485dfa0cd66e75c14bfe"
|
||||
SRC_URI[tzcode.sha256sum] = "d644ba0f938899374ea8cb554e35fb4afa0f7bd7b716c61777cd00500b8759e0"
|
||||
SRC_URI[tzdata.sha256sum] = "6ecdbee27fa43dcfa49f3d4fd8bb1dfef54c90da1abcd82c9abcf2dc4f321de0"
|
||||
|
||||
|
||||
58
meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch
Normal file
58
meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
From 8b51d1375a4dd6a7cf3a919da83d8e87e57e7333 Mon Sep 17 00:00:00 2001
|
||||
From: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Date: Wed, 2 Nov 2022 17:04:15 +0530
|
||||
Subject: [PATCH] CVE-2022-3554
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/1d11822601fd24a396b354fa616b04ed3df8b4ef]
|
||||
CVE: CVE-2022-3554
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
|
||||
fix a memory leak in XRegisterIMInstantiateCallback
|
||||
|
||||
Analysis:
|
||||
|
||||
_XimRegisterIMInstantiateCallback() opens an XIM and closes it using
|
||||
the internal function pointers, but the internal close function does
|
||||
not free the pointer to the XIM (this would be done in XCloseIM()).
|
||||
|
||||
Report/patch:
|
||||
|
||||
Date: Mon, 03 Oct 2022 18:47:32 +0800
|
||||
From: Po Lu <luangruo@yahoo.com>
|
||||
To: xorg-devel@lists.x.org
|
||||
Subject: Re: Yet another leak in Xlib
|
||||
|
||||
For reference, here's how I'm calling XRegisterIMInstantiateCallback:
|
||||
|
||||
XSetLocaleModifiers ("");
|
||||
XRegisterIMInstantiateCallback (compositor.display,
|
||||
XrmGetDatabase (compositor.display),
|
||||
(char *) compositor.resource_name,
|
||||
(char *) compositor.app_name,
|
||||
IMInstantiateCallback, NULL);
|
||||
and XMODIFIERS is:
|
||||
|
||||
@im=ibus
|
||||
|
||||
Signed-off-by: Thomas E. Dickey's avatarThomas E. Dickey <dickey@invisible-island.net>
|
||||
---
|
||||
modules/im/ximcp/imInsClbk.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
|
||||
index 961aaba..0a8a874 100644
|
||||
--- a/modules/im/ximcp/imInsClbk.c
|
||||
+++ b/modules/im/ximcp/imInsClbk.c
|
||||
@@ -204,6 +204,9 @@ _XimRegisterIMInstantiateCallback(
|
||||
if( xim ) {
|
||||
lock = True;
|
||||
xim->methods->close( (XIM)xim );
|
||||
+ /* XIMs must be freed manually after being opened; close just
|
||||
+ does the protocol to deinitialize the IM. */
|
||||
+ XFree( xim );
|
||||
lock = False;
|
||||
icb->call = True;
|
||||
callback( display, client_data, NULL );
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -16,6 +16,7 @@ SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \
|
||||
file://CVE-2020-14344.patch \
|
||||
file://CVE-2020-14363.patch \
|
||||
file://CVE-2021-31535.patch \
|
||||
file://CVE-2022-3554.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "55adbfb6d4370ecac5e70598c4e7eed2"
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "03cd66d9814a26fff4681d3a053654848e519fd6"
|
||||
SRCREV_meta ?= "2f18e629f78da51cacf531bed58a83568724a376"
|
||||
SRCREV_machine ?= "983b2c21d3fa76840461947f3f644dd9442d8e40"
|
||||
SRCREV_meta ?= "7e9781b04df1fc0aac9309734bbe23b36c050b42"
|
||||
|
||||
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.213"
|
||||
LINUX_VERSION ?= "5.4.219"
|
||||
|
||||
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.213"
|
||||
LINUX_VERSION ?= "5.4.219"
|
||||
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 ?= "284fd0f6e11db890ad6cfd246a2c47521db4a05f"
|
||||
SRCREV_machine ?= "6d8cf8757864e674bb8f55b6ff68de5e3387d110"
|
||||
SRCREV_meta ?= "2f18e629f78da51cacf531bed58a83568724a376"
|
||||
SRCREV_machine_qemuarm ?= "a4c846b5cacb954ae98a8eba9e0450812f1db42c"
|
||||
SRCREV_machine ?= "ae25c500cf7dae5520897489b3fe49bdf068528b"
|
||||
SRCREV_meta ?= "7e9781b04df1fc0aac9309734bbe23b36c050b42"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -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 ?= "bcf3f5cf5f1bcfac1df54a2a9f19c92a49fc7538"
|
||||
SRCREV_machine_qemuarm64 ?= "fea87c9d80c7531f85f69fee97cf9500403cef6b"
|
||||
SRCREV_machine_qemumips ?= "f1d654a16a5b5a3bbc9288936827628a4a4553a2"
|
||||
SRCREV_machine_qemuppc ?= "f6bbc9d216fd3cef1df3ced215b0b22503c48906"
|
||||
SRCREV_machine_qemuriscv64 ?= "c0b728020967728840c39994e472db7ed7b727cf"
|
||||
SRCREV_machine_qemux86 ?= "c0b728020967728840c39994e472db7ed7b727cf"
|
||||
SRCREV_machine_qemux86-64 ?= "c0b728020967728840c39994e472db7ed7b727cf"
|
||||
SRCREV_machine_qemumips64 ?= "841245c9bd427e2e7cc786b92cecaf4390e5dd52"
|
||||
SRCREV_machine ?= "c0b728020967728840c39994e472db7ed7b727cf"
|
||||
SRCREV_meta ?= "2f18e629f78da51cacf531bed58a83568724a376"
|
||||
SRCREV_machine_qemuarm ?= "88065fdc7d5d404312da98b78229996b61f56c21"
|
||||
SRCREV_machine_qemuarm64 ?= "ac9667e4dba109088d7ed5922f28d6ef1ba66e9b"
|
||||
SRCREV_machine_qemumips ?= "e0dd90f622f78e0ad05797996756528623070da4"
|
||||
SRCREV_machine_qemuppc ?= "0d45c84c8240fadec9a36a13d9cf077b6793bcfb"
|
||||
SRCREV_machine_qemuriscv64 ?= "35826e154ee014b64ccfa0d1f12d36b8f8a75939"
|
||||
SRCREV_machine_qemux86 ?= "35826e154ee014b64ccfa0d1f12d36b8f8a75939"
|
||||
SRCREV_machine_qemux86-64 ?= "35826e154ee014b64ccfa0d1f12d36b8f8a75939"
|
||||
SRCREV_machine_qemumips64 ?= "a5cc27ae60c504fc309926d8e72129128befdbd5"
|
||||
SRCREV_machine ?= "35826e154ee014b64ccfa0d1f12d36b8f8a75939"
|
||||
SRCREV_meta ?= "7e9781b04df1fc0aac9309734bbe23b36c050b42"
|
||||
|
||||
# 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.213"
|
||||
LINUX_VERSION ?= "5.4.219"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
29
meta/recipes-support/curl/curl/CVE-2022-32221.patch
Normal file
29
meta/recipes-support/curl/curl/CVE-2022-32221.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 75c04a3e75e8e3025a17ca3033ca307da9691cd0 Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
Date: Fri, 11 Nov 2022 10:49:58 +0530
|
||||
Subject: [PATCH] CVE-2022-32221
|
||||
|
||||
Upstream-Status: Backport [https://github.com/curl/curl/commit/a64e3e59938abd7d6]
|
||||
CVE: CVE-2022-32221
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
|
||||
setopt: when POST is set, reset the 'upload' field.
|
||||
---
|
||||
lib/setopt.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/setopt.c b/lib/setopt.c
|
||||
index bebb2e4..4d96f6b 100644
|
||||
--- a/lib/setopt.c
|
||||
+++ b/lib/setopt.c
|
||||
@@ -486,6 +486,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
||||
}
|
||||
else
|
||||
data->set.httpreq = HTTPREQ_GET;
|
||||
+ data->set.upload = FALSE;
|
||||
break;
|
||||
|
||||
case CURLOPT_COPYPOSTFIELDS:
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -39,6 +39,7 @@ SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
|
||||
file://CVE-2022-32207.patch \
|
||||
file://CVE-2022-32208.patch \
|
||||
file://CVE-2022-35252.patch \
|
||||
file://CVE-2022-32221.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "ec5fc263f898a3dfef08e805f1ecca42"
|
||||
|
||||
@@ -20,8 +20,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://no-path-adjust.patch \
|
||||
"
|
||||
|
||||
PV .= ".0598"
|
||||
SRCREV = "8279af514ca7e5fd3c31cf13b0864163d1a0bfeb"
|
||||
PV .= ".0614"
|
||||
SRCREV = "ef976323e770315b5fca544efb6b2faa25674d15"
|
||||
|
||||
# Remove when 8.3 is out
|
||||
UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
|
||||
@@ -201,9 +201,9 @@ def deploy(args, config, basepath, workspace):
|
||||
print(' %s' % item)
|
||||
return 0
|
||||
|
||||
extraoptions = ''
|
||||
extraoptions = '-o HostKeyAlgorithms=+ssh-rsa'
|
||||
if args.no_host_check:
|
||||
extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||
extraoptions += ' -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||
if not args.show_status:
|
||||
extraoptions += ' -q'
|
||||
|
||||
@@ -274,9 +274,9 @@ def undeploy(args, config, basepath, workspace):
|
||||
elif not args.recipename and not args.all:
|
||||
raise argparse_oe.ArgumentUsageError('If you don\'t specify a recipe, you must specify -a/--all', 'undeploy-target')
|
||||
|
||||
extraoptions = ''
|
||||
extraoptions = '-o HostKeyAlgorithms=+ssh-rsa'
|
||||
if args.no_host_check:
|
||||
extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||
extraoptions += ' -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||
if not args.show_status:
|
||||
extraoptions += ' -q'
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ class DirectPlugin(ImagerPlugin):
|
||||
updated = False
|
||||
for part in self.parts:
|
||||
if not part.realnum or not part.mountpoint \
|
||||
or part.mountpoint == "/" or not part.mountpoint.startswith('/'):
|
||||
or part.mountpoint == "/" or not (part.mountpoint.startswith('/') or part.mountpoint == "swap"):
|
||||
continue
|
||||
|
||||
if part.use_uuid:
|
||||
|
||||
Reference in New Issue
Block a user