mirror of
https://git.yoctoproject.org/poky
synced 2026-02-22 09:29:40 +01:00
Compare commits
50 Commits
dunfell-23
...
yocto-3.1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbe19706ec | ||
|
|
b86bf0103c | ||
|
|
bf9eabafc2 | ||
|
|
8c297c4b42 | ||
|
|
658a3832de | ||
|
|
0b105ed7c8 | ||
|
|
25972743e6 | ||
|
|
2e5bead98f | ||
|
|
7dd1d3973e | ||
|
|
9e0ebdc95f | ||
|
|
9716962e34 | ||
|
|
fd1ba91818 | ||
|
|
2b4a973db3 | ||
|
|
45845f8056 | ||
|
|
d0120e8aec | ||
|
|
97b8007eff | ||
|
|
59f99476d8 | ||
|
|
7f8394e2b1 | ||
|
|
24fe566155 | ||
|
|
b8f1972b84 | ||
|
|
75bc08971b | ||
|
|
c86e8fe287 | ||
|
|
3afde32bfa | ||
|
|
0efbcefe73 | ||
|
|
c64835823a | ||
|
|
716693cccc | ||
|
|
8cabed090e | ||
|
|
be8b0f8178 | ||
|
|
7c678246f6 | ||
|
|
d3f1ae99a7 | ||
|
|
d843ae7d5d | ||
|
|
63909c1cc6 | ||
|
|
4553984904 | ||
|
|
1149fde2f4 | ||
|
|
cdc9522ede | ||
|
|
800272477a | ||
|
|
6fd1064e82 | ||
|
|
76fb1012eb | ||
|
|
1b7c8a3e7e | ||
|
|
38c0d384bd | ||
|
|
01cabaea04 | ||
|
|
72c7bacfd3 | ||
|
|
8a8d40420f | ||
|
|
a405e12beb | ||
|
|
be04eefcaf | ||
|
|
77214fc5d4 | ||
|
|
cd9a699320 | ||
|
|
5e9e6627ac | ||
|
|
facedadb5c | ||
|
|
e66a386604 |
@@ -229,9 +229,10 @@ class diskMonitor:
|
||||
freeInode = st.f_favail
|
||||
|
||||
if minInode and freeInode < minInode:
|
||||
# Some filesystems use dynamic inodes so can't run out
|
||||
# (e.g. btrfs). This is reported by the inode count being 0.
|
||||
if st.f_files == 0:
|
||||
# Some filesystems use dynamic inodes so can't run out.
|
||||
# This is reported by the inode count being 0 (btrfs) or the free
|
||||
# inode count being -1 (cephfs).
|
||||
if st.f_files == 0 or st.f_favail == -1:
|
||||
self.devDict[k][2] = None
|
||||
continue
|
||||
# Always show warning, the self.checked would always be False if the action is WARN
|
||||
|
||||
@@ -318,7 +318,8 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
||||
else:
|
||||
sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[tid]
|
||||
|
||||
bb.utils.mkdirhier(os.path.dirname(sigfile))
|
||||
with bb.utils.umask(0o002):
|
||||
bb.utils.mkdirhier(os.path.dirname(sigfile))
|
||||
|
||||
data = {}
|
||||
data['task'] = task
|
||||
|
||||
@@ -969,6 +969,17 @@ def which(path, item, direction = 0, history = False, executable=False):
|
||||
return "", hist
|
||||
return ""
|
||||
|
||||
@contextmanager
|
||||
def umask(new_mask):
|
||||
"""
|
||||
Context manager to set the umask to a specific mask, and restore it afterwards.
|
||||
"""
|
||||
current_mask = os.umask(new_mask)
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
os.umask(current_mask)
|
||||
|
||||
def to_boolean(string, default=None):
|
||||
if not string:
|
||||
return default
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
DISTRO : "3.1.29"
|
||||
DISTRO : "3.1.30"
|
||||
DISTRO_NAME_NO_CAP : "dunfell"
|
||||
DISTRO_NAME : "Dunfell"
|
||||
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
|
||||
YOCTO_DOC_VERSION : "3.1.29"
|
||||
YOCTO_DOC_VERSION : "3.1.30"
|
||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.4"
|
||||
DISTRO_REL_TAG : "yocto-3.1.29"
|
||||
DOCCONF_VERSION : "3.1.29"
|
||||
DISTRO_REL_TAG : "yocto-3.1.30"
|
||||
DOCCONF_VERSION : "3.1.30"
|
||||
BITBAKE_SERIES : "1.46"
|
||||
POKYVERSION : "23.0.29"
|
||||
POKYVERSION : "23.0.30"
|
||||
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.29"
|
||||
DISTRO_VERSION = "3.1.30"
|
||||
DISTRO_CODENAME = "dunfell"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
|
||||
|
||||
@@ -97,6 +97,8 @@ def generate_json_report(d, out_path, link_path):
|
||||
cve_check_merge_jsons(summary, data)
|
||||
filename = f.readline()
|
||||
|
||||
summary["package"].sort(key=lambda d: d['name'])
|
||||
|
||||
with open(out_path, "w") as f:
|
||||
json.dump(summary, f, indent=2)
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ def cve_check_merge_jsons(output, data):
|
||||
|
||||
for product in output["package"]:
|
||||
if product["name"] == data["package"][0]["name"]:
|
||||
bb.error("Error adding the same package twice")
|
||||
bb.error("Error adding the same package %s twice" % product["name"])
|
||||
return
|
||||
|
||||
output["package"].append(data["package"][0])
|
||||
@@ -114,11 +114,6 @@ def get_patched_cves(d):
|
||||
for url in oe.patch.src_patches(d):
|
||||
patch_file = bb.fetch.decodeurl(url)[2]
|
||||
|
||||
# Remote compressed patches may not be unpacked, so silently ignore them
|
||||
if not os.path.isfile(patch_file):
|
||||
bb.warn("%s does not exist, cannot extract CVE list" % patch_file)
|
||||
continue
|
||||
|
||||
# Check patch file name for CVE ID
|
||||
fname_match = cve_file_name_match.search(patch_file)
|
||||
if fname_match:
|
||||
@@ -126,6 +121,12 @@ def get_patched_cves(d):
|
||||
patched_cves.add(cve)
|
||||
bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file))
|
||||
|
||||
# Remote patches won't be present and compressed patches won't be
|
||||
# unpacked, so say we're not scanning them
|
||||
if not os.path.isfile(patch_file):
|
||||
bb.note("%s is remote or compressed, not scanning content" % patch_file)
|
||||
continue
|
||||
|
||||
with open(patch_file, "r", encoding="utf-8") as f:
|
||||
try:
|
||||
patch_text = f.read()
|
||||
|
||||
@@ -185,14 +185,8 @@ class TestImage(OESelftestTestCase):
|
||||
self.skipTest('virgl isn\'t working with Centos 7')
|
||||
if distro and distro == 'centos-8':
|
||||
self.skipTest('virgl isn\'t working with Centos 8')
|
||||
if distro and distro == 'fedora-34':
|
||||
self.skipTest('virgl isn\'t working with Fedora 34')
|
||||
if distro and distro == 'fedora-35':
|
||||
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.startswith('fedora'):
|
||||
self.skipTest('virgl isn\'t working with Fedora')
|
||||
if distro and distro == 'opensuseleap-15.0':
|
||||
self.skipTest('virgl isn\'t working with Opensuse 15.0')
|
||||
if distro and distro == 'ubuntu-22.04':
|
||||
|
||||
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
@@ -0,0 +1,97 @@
|
||||
From 43651027d24e62a7a463254165e1e46e42aecdea Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Date: Mon, 28 Aug 2023 16:31:57 +0300
|
||||
Subject: [PATCH] fs/ntfs: Fix an OOB write when parsing the $ATTRIBUTE_LIST
|
||||
attribute for the $MFT file
|
||||
|
||||
When parsing an extremely fragmented $MFT file, i.e., the file described
|
||||
using the $ATTRIBUTE_LIST attribute, current NTFS code will reuse a buffer
|
||||
containing bytes read from the underlying drive to store sector numbers,
|
||||
which are consumed later to read data from these sectors into another buffer.
|
||||
|
||||
These sectors numbers, two 32-bit integers, are always stored at predefined
|
||||
offsets, 0x10 and 0x14, relative to first byte of the selected entry within
|
||||
the $ATTRIBUTE_LIST attribute. Usually, this won't cause any problem.
|
||||
|
||||
However, when parsing a specially-crafted file system image, this may cause
|
||||
the NTFS code to write these integers beyond the buffer boundary, likely
|
||||
causing the GRUB memory allocator to misbehave or fail. These integers contain
|
||||
values which are controlled by on-disk structures of the NTFS file system.
|
||||
|
||||
Such modification and resulting misbehavior may touch a memory range not
|
||||
assigned to the GRUB and owned by firmware or another EFI application/driver.
|
||||
|
||||
This fix introduces checks to ensure that these sector numbers are never
|
||||
written beyond the boundary.
|
||||
|
||||
Fixes: CVE-2023-4692
|
||||
|
||||
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=43651027d24e62a7a463254165e1e46e42aecdea]
|
||||
CVE: CVE-2023-4692
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
grub-core/fs/ntfs.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||
index 2f34f76..c8d3683 100644
|
||||
--- a/grub-core/fs/ntfs.c
|
||||
+++ b/grub-core/fs/ntfs.c
|
||||
@@ -184,7 +184,7 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
}
|
||||
if (at->attr_end)
|
||||
{
|
||||
- grub_uint8_t *pa;
|
||||
+ grub_uint8_t *pa, *pa_end;
|
||||
|
||||
at->emft_buf = grub_malloc (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||
if (at->emft_buf == NULL)
|
||||
@@ -209,11 +209,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
}
|
||||
at->attr_nxt = at->edat_buf;
|
||||
at->attr_end = at->edat_buf + u32at (pa, 0x30);
|
||||
+ pa_end = at->edat_buf + n;
|
||||
}
|
||||
else
|
||||
{
|
||||
at->attr_nxt = at->attr_end + u16at (pa, 0x14);
|
||||
at->attr_end = at->attr_end + u32at (pa, 4);
|
||||
+ pa_end = at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||
}
|
||||
at->flags |= GRUB_NTFS_AF_ALST;
|
||||
while (at->attr_nxt < at->attr_end)
|
||||
@@ -230,6 +232,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
at->flags |= GRUB_NTFS_AF_GPOS;
|
||||
at->attr_cur = at->attr_nxt;
|
||||
pa = at->attr_cur;
|
||||
+
|
||||
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
grub_set_unaligned32 ((char *) pa + 0x10,
|
||||
grub_cpu_to_le32 (at->mft->data->mft_start));
|
||||
grub_set_unaligned32 ((char *) pa + 0x14,
|
||||
@@ -240,6 +249,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
{
|
||||
if (*pa != attr)
|
||||
break;
|
||||
+
|
||||
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
if (read_attr
|
||||
(at, pa + 0x10,
|
||||
u32at (pa, 0x10) * (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR),
|
||||
--
|
||||
2.25.1
|
||||
|
||||
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From 0ed2458cc4eff6d9a9199527e2a0b6d445802f94 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Date: Mon, 28 Aug 2023 16:32:33 +0300
|
||||
Subject: [PATCH] fs/ntfs: Fix an OOB read when reading data from the resident
|
||||
$DATA attribute
|
||||
|
||||
When reading a file containing resident data, i.e., the file data is stored in
|
||||
the $DATA attribute within the NTFS file record, not in external clusters,
|
||||
there are no checks that this resident data actually fits the corresponding
|
||||
file record segment.
|
||||
|
||||
When parsing a specially-crafted file system image, the current NTFS code will
|
||||
read the file data from an arbitrary, attacker-chosen memory offset and of
|
||||
arbitrary, attacker-chosen length.
|
||||
|
||||
This allows an attacker to display arbitrary chunks of memory, which could
|
||||
contain sensitive information like password hashes or even plain-text,
|
||||
obfuscated passwords from BS EFI variables.
|
||||
|
||||
This fix implements a check to ensure that resident data is read from the
|
||||
corresponding file record segment only.
|
||||
|
||||
Fixes: CVE-2023-4693
|
||||
|
||||
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=0ed2458cc4eff6d9a9199527e2a0b6d445802f94]
|
||||
CVE: CVE-2023-4693
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
grub-core/fs/ntfs.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||
index c8d3683..4d1fe42 100644
|
||||
--- a/grub-core/fs/ntfs.c
|
||||
+++ b/grub-core/fs/ntfs.c
|
||||
@@ -401,7 +401,18 @@ read_data (struct grub_ntfs_attr *at, grub_uint8_t *pa, grub_uint8_t *dest,
|
||||
{
|
||||
if (ofs + len > u32at (pa, 0x10))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "read out of range");
|
||||
- grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
|
||||
+
|
||||
+ if (u32at (pa, 0x10) > (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute too large");
|
||||
+
|
||||
+ if (pa >= at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||
+
|
||||
+ if (u16at (pa, 0x14) + u32at (pa, 0x10) >
|
||||
+ (grub_addr_t) at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR) - (grub_addr_t) pa)
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||
+
|
||||
+ grub_memcpy (dest, pa + u16at (pa, 0x14) + ofs, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -109,6 +109,8 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
|
||||
file://CVE-2020-27749.patch \
|
||||
file://CVE-2021-20225.patch \
|
||||
file://CVE-2021-20233.patch \
|
||||
file://CVE-2023-4692.patch \
|
||||
file://CVE-2023-4693.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934"
|
||||
SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea"
|
||||
|
||||
@@ -22,6 +22,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
|
||||
SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
|
||||
file://fix-CVE-2017-6519.patch \
|
||||
file://CVE-2021-3468.patch \
|
||||
file://CVE-2023-1981.patch \
|
||||
file://CVE-2023-38469-1.patch \
|
||||
file://CVE-2023-38469-2.patch \
|
||||
file://CVE-2023-38470-1.patch \
|
||||
file://CVE-2023-38470-2.patch \
|
||||
file://CVE-2023-38471-1.patch \
|
||||
file://CVE-2023-38471-2.patch \
|
||||
file://CVE-2023-38472.patch \
|
||||
file://CVE-2023-38473.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
|
||||
|
||||
60
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
60
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
Backport of:
|
||||
|
||||
From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Thu, 17 Nov 2022 01:51:53 +0100
|
||||
Subject: [PATCH] Emit error if requested service is not found
|
||||
|
||||
It currently just crashes instead of replying with error. Check return
|
||||
value and emit error instead of passing NULL pointer to reply.
|
||||
|
||||
Fixes #375
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f]
|
||||
CVE: CVE-2023-1981
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/avahi-daemon/dbus-protocol.c
|
||||
+++ b/avahi-daemon/dbus-protocol.c
|
||||
@@ -391,10 +391,14 @@ static DBusHandlerResult msg_server_impl
|
||||
}
|
||||
|
||||
t = avahi_alternative_host_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
-
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
+
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
|
||||
+ }
|
||||
|
||||
} else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetAlternativeServiceName")) {
|
||||
char *n, *t;
|
||||
@@ -405,10 +409,14 @@ static DBusHandlerResult msg_server_impl
|
||||
}
|
||||
|
||||
t = avahi_alternative_service_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
-
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
+
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
|
||||
+ }
|
||||
|
||||
} else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "EntryGroupNew")) {
|
||||
Client *client;
|
||||
48
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
48
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From a337a1ba7d15853fb56deef1f464529af6e3a1cf Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Mon, 23 Oct 2023 20:29:31 +0000
|
||||
Subject: [PATCH] core: reject overly long TXT resource records
|
||||
|
||||
Closes https://github.com/lathiat/avahi/issues/455
|
||||
|
||||
CVE-2023-38469
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-1.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/a337a1ba7d15853fb56deef1f464529af6e3a1cf]
|
||||
CVE: CVE-2023-38469
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-core/rr.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.7/avahi-core/rr.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-core/rr.c
|
||||
+++ avahi-0.7/avahi-core/rr.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <avahi-common/malloc.h>
|
||||
#include <avahi-common/defs.h>
|
||||
|
||||
+#include "dns.h"
|
||||
#include "rr.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
@@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r
|
||||
case AVAHI_DNS_TYPE_TXT: {
|
||||
|
||||
AvahiStringList *strlst;
|
||||
+ size_t used = 0;
|
||||
|
||||
- for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
|
||||
+ for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) {
|
||||
if (strlst->size > 255 || strlst->size <= 0)
|
||||
return 0;
|
||||
|
||||
+ used += 1+strlst->size;
|
||||
+ if (used > AVAHI_DNS_RDATA_MAX)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Wed, 25 Oct 2023 18:15:42 +0000
|
||||
Subject: [PATCH] tests: pass overly long TXT resource records
|
||||
|
||||
to make sure they don't crash avahi any more.
|
||||
It reproduces https://github.com/lathiat/avahi/issues/455
|
||||
|
||||
Canonical notes:
|
||||
nickgalanis> removed first hunk since there is no .github dir in this release
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-2.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/c6cab87df290448a63323c8ca759baa516166237]
|
||||
CVE: CVE-2023-38469
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-client/client-test.c | 14 ++++++++++++++
|
||||
1 files changed, 14 insertions(+)
|
||||
|
||||
Index: avahi-0.7/avahi-client/client-test.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-client/client-test.c
|
||||
+++ avahi-0.7/avahi-client/client-test.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <avahi-client/client.h>
|
||||
@@ -33,6 +34,8 @@
|
||||
#include <avahi-common/malloc.h>
|
||||
#include <avahi-common/timeval.h>
|
||||
|
||||
+#include <avahi-core/dns.h>
|
||||
+
|
||||
static const AvahiPoll *poll_api = NULL;
|
||||
static AvahiSimplePoll *simple_poll = NULL;
|
||||
|
||||
@@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
uint32_t cookie;
|
||||
struct timeval tv;
|
||||
AvahiAddress a;
|
||||
+ uint8_t rdata[AVAHI_DNS_RDATA_MAX+1];
|
||||
+ AvahiStringList *txt = NULL;
|
||||
+ int r;
|
||||
|
||||
simple_poll = avahi_simple_poll_new();
|
||||
poll_api = avahi_simple_poll_get(simple_poll);
|
||||
@@ -258,6 +264,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL)));
|
||||
printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6));
|
||||
|
||||
+ memset(rdata, 1, sizeof(rdata));
|
||||
+ r = avahi_string_list_parse(rdata, sizeof(rdata), &txt);
|
||||
+ assert(r >= 0);
|
||||
+ assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata));
|
||||
+ error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt);
|
||||
+ assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||
+ avahi_string_list_free(txt);
|
||||
+
|
||||
avahi_entry_group_commit (group);
|
||||
|
||||
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||
57
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
57
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
From 94cb6489114636940ac683515417990b55b5d66c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Tue, 11 Apr 2023 15:29:59 +0200
|
||||
Subject: [PATCH] Ensure each label is at least one byte long
|
||||
|
||||
The only allowed exception is single dot, where it should return empty
|
||||
string.
|
||||
|
||||
Fixes #454.
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38470-1.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c]
|
||||
CVE: CVE-2023-38470
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-common/domain-test.c | 14 ++++++++++++++
|
||||
avahi-common/domain.c | 2 +-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.7/avahi-common/domain-test.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-common/domain-test.c
|
||||
+++ avahi-0.7/avahi-common/domain-test.c
|
||||
@@ -45,6 +45,20 @@ int main(AVAHI_GCC_UNUSED int argc, AVAH
|
||||
printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo."));
|
||||
avahi_free(s);
|
||||
|
||||
+ printf("%s\n", s = avahi_normalize_name_strdup("."));
|
||||
+ avahi_free(s);
|
||||
+
|
||||
+ s = avahi_normalize_name_strdup(",.=.}.=.?-.}.=.?.?.}.}.?.?.?.z.?.?.}.}."
|
||||
+ "}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.}.}.}"
|
||||
+ ".?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.?.zM.?`"
|
||||
+ "?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}??.}.}.?.?."
|
||||
+ "?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.?`?.}.}.}."
|
||||
+ "??.?.zM.?`?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}?"
|
||||
+ "?.}.}.?.?.?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM."
|
||||
+ "?`?.}.}.}.?.?.?.r.=.=.?.?`.?.?}.}.}.?.?.?.r.=.?.}.=.?.?."
|
||||
+ "}.?.?.?.}.=.?.?.}");
|
||||
+ assert(s == NULL);
|
||||
+
|
||||
printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
|
||||
printf("%i\n", avahi_domain_equal("A", "a"));
|
||||
|
||||
Index: avahi-0.7/avahi-common/domain.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-common/domain.c
|
||||
+++ avahi-0.7/avahi-common/domain.c
|
||||
@@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s
|
||||
}
|
||||
|
||||
if (!empty) {
|
||||
- if (size < 1)
|
||||
+ if (size < 2)
|
||||
return NULL;
|
||||
|
||||
*(r++) = '.';
|
||||
53
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
53
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From 20dec84b2480821704258bc908e7b2bd2e883b24 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Tue, 19 Sep 2023 03:21:25 +0000
|
||||
Subject: [PATCH] [common] bail out when escaped labels can't fit into ret
|
||||
|
||||
Fixes:
|
||||
```
|
||||
==93410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9e76f14c16 at pc 0x00000047208d bp 0x7ffee90a6a00 sp 0x7ffee90a61c8
|
||||
READ of size 1110 at 0x7f9e76f14c16 thread T0
|
||||
#0 0x47208c in __interceptor_strlen (out/fuzz-domain+0x47208c) (BuildId: 731b20c1eef22c2104e75a6496a399b10cfc7cba)
|
||||
#1 0x534eb0 in avahi_strdup avahi/avahi-common/malloc.c:167:12
|
||||
#2 0x53862c in avahi_normalize_name_strdup avahi/avahi-common/domain.c:226:12
|
||||
```
|
||||
and
|
||||
```
|
||||
fuzz-domain: fuzz/fuzz-domain.c:38: int LLVMFuzzerTestOneInput(const uint8_t *, size_t): Assertion `avahi_domain_equal(s, t)' failed.
|
||||
==101571== ERROR: libFuzzer: deadly signal
|
||||
#0 0x501175 in __sanitizer_print_stack_trace (/home/vagrant/avahi/out/fuzz-domain+0x501175) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#1 0x45ad2c in fuzzer::PrintStackTrace() (/home/vagrant/avahi/out/fuzz-domain+0x45ad2c) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#2 0x43fc07 in fuzzer::Fuzzer::CrashCallback() (/home/vagrant/avahi/out/fuzz-domain+0x43fc07) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#3 0x7f1581d7ebaf (/lib64/libc.so.6+0x3dbaf) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#4 0x7f1581dcf883 in __pthread_kill_implementation (/lib64/libc.so.6+0x8e883) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#5 0x7f1581d7eafd in gsignal (/lib64/libc.so.6+0x3dafd) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#6 0x7f1581d6787e in abort (/lib64/libc.so.6+0x2687e) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#7 0x7f1581d6779a in __assert_fail_base.cold (/lib64/libc.so.6+0x2679a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#8 0x7f1581d77186 in __assert_fail (/lib64/libc.so.6+0x36186) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#9 0x5344a4 in LLVMFuzzerTestOneInput /home/vagrant/avahi/fuzz/fuzz-domain.c:38:9
|
||||
```
|
||||
|
||||
It's a follow-up to 94cb6489114636940ac683515417990b55b5d66c
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/20dec84b2480821704258bc908e7b2bd2e883b24]
|
||||
CVE: CVE-2023-38470 #Follow-up patch
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-common/domain.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.7/avahi-common/domain.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-common/domain.c
|
||||
+++ avahi-0.7/avahi-common/domain.c
|
||||
@@ -210,7 +210,8 @@ char *avahi_normalize_name(const char *s
|
||||
} else
|
||||
empty = 0;
|
||||
|
||||
- avahi_escape_label(label, strlen(label), &r, &size);
|
||||
+ if (!(avahi_escape_label(label, strlen(label), &r, &size)))
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
return ret_s;
|
||||
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
From 894f085f402e023a98cbb6f5a3d117bd88d93b09 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Mon, 23 Oct 2023 13:38:35 +0200
|
||||
Subject: [PATCH] core: extract host name using avahi_unescape_label()
|
||||
|
||||
Previously we could create invalid escape sequence when we split the
|
||||
string on dot. For example, from valid host name "foo\\.bar" we have
|
||||
created invalid name "foo\\" and tried to set that as the host name
|
||||
which crashed the daemon.
|
||||
|
||||
Fixes #453
|
||||
|
||||
CVE-2023-38471
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-1.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09]
|
||||
CVE: CVE-2023-38471
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-core/server.c | 27 +++++++++++++++++++++------
|
||||
1 file changed, 21 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: avahi-0.7/avahi-core/server.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-core/server.c
|
||||
+++ avahi-0.7/avahi-core/server.c
|
||||
@@ -1253,7 +1253,11 @@ static void update_fqdn(AvahiServer *s)
|
||||
}
|
||||
|
||||
int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
|
||||
- char *hn = NULL;
|
||||
+ char label_escaped[AVAHI_LABEL_MAX*4+1];
|
||||
+ char label[AVAHI_LABEL_MAX];
|
||||
+ char *hn = NULL, *h;
|
||||
+ size_t len;
|
||||
+
|
||||
assert(s);
|
||||
|
||||
AVAHI_CHECK_VALIDITY(s, !host_name || avahi_is_valid_host_name(host_name), AVAHI_ERR_INVALID_HOST_NAME);
|
||||
@@ -1263,17 +1267,28 @@ int avahi_server_set_host_name(AvahiServ
|
||||
else
|
||||
hn = avahi_normalize_name_strdup(host_name);
|
||||
|
||||
- hn[strcspn(hn, ".")] = 0;
|
||||
+ h = hn;
|
||||
+ if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||
+ avahi_free(h);
|
||||
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ }
|
||||
+
|
||||
+ avahi_free(h);
|
||||
|
||||
- if (avahi_domain_equal(s->host_name, hn) && s->state != AVAHI_SERVER_COLLISION) {
|
||||
- avahi_free(hn);
|
||||
+ h = label_escaped;
|
||||
+ len = sizeof(label_escaped);
|
||||
+ if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+
|
||||
+ if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||
- }
|
||||
|
||||
withdraw_host_rrs(s);
|
||||
|
||||
avahi_free(s->host_name);
|
||||
- s->host_name = hn;
|
||||
+ s->host_name = avahi_strdup(label_escaped);
|
||||
+ if (!s->host_name)
|
||||
+ return AVAHI_ERR_NO_MEMORY;
|
||||
|
||||
update_fqdn(s);
|
||||
|
||||
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From b675f70739f404342f7f78635d6e2dcd85a13460 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Tue, 24 Oct 2023 22:04:51 +0000
|
||||
Subject: [PATCH] core: return errors from avahi_server_set_host_name properly
|
||||
|
||||
It's a follow-up to 894f085f402e023a98cbb6f5a3d117bd88d93b09
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460]
|
||||
CVE: CVE-2023-38471 #Follow-up Patch
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-core/server.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: avahi-0.7/avahi-core/server.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-core/server.c
|
||||
+++ avahi-0.7/avahi-core/server.c
|
||||
@@ -1267,10 +1267,13 @@ int avahi_server_set_host_name(AvahiServ
|
||||
else
|
||||
hn = avahi_normalize_name_strdup(host_name);
|
||||
|
||||
+ if (!hn)
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||
+
|
||||
h = hn;
|
||||
if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||
avahi_free(h);
|
||||
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||
}
|
||||
|
||||
avahi_free(h);
|
||||
@@ -1278,7 +1281,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||
h = label_escaped;
|
||||
len = sizeof(label_escaped);
|
||||
if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||
|
||||
if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||
@@ -1288,7 +1291,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||
avahi_free(s->host_name);
|
||||
s->host_name = avahi_strdup(label_escaped);
|
||||
if (!s->host_name)
|
||||
- return AVAHI_ERR_NO_MEMORY;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||
|
||||
update_fqdn(s);
|
||||
|
||||
45
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
45
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From b024ae5749f4aeba03478e6391687c3c9c8dee40 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Thu, 19 Oct 2023 17:36:44 +0200
|
||||
Subject: [PATCH] core: make sure there is rdata to process before parsing it
|
||||
|
||||
Fixes #452
|
||||
|
||||
CVE-2023-38472
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38472.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40]
|
||||
CVE: CVE-2023-38472
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-client/client-test.c | 3 +++
|
||||
avahi-daemon/dbus-entry-group.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.7/avahi-client/client-test.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-client/client-test.c
|
||||
+++ avahi-0.7/avahi-client/client-test.c
|
||||
@@ -272,6 +272,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||
avahi_string_list_free(txt);
|
||||
|
||||
+ error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0);
|
||||
+ assert(error != AVAHI_OK);
|
||||
+
|
||||
avahi_entry_group_commit (group);
|
||||
|
||||
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||
Index: avahi-0.7/avahi-daemon/dbus-entry-group.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-daemon/dbus-entry-group.c
|
||||
+++ avahi-0.7/avahi-daemon/dbus-entry-group.c
|
||||
@@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_g
|
||||
if (!(r = avahi_record_new_full (name, clazz, type, ttl)))
|
||||
return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL);
|
||||
|
||||
- if (avahi_rdata_parse (r, rdata, size) < 0) {
|
||||
+ if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) {
|
||||
avahi_record_unref (r);
|
||||
return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL);
|
||||
}
|
||||
109
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
109
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
@@ -0,0 +1,109 @@
|
||||
From b448c9f771bada14ae8de175695a9729f8646797 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Wed, 11 Oct 2023 17:45:44 +0200
|
||||
Subject: [PATCH] common: derive alternative host name from its unescaped
|
||||
version
|
||||
|
||||
Normalization of input makes sure we don't have to deal with special
|
||||
cases like unescaped dot at the end of label.
|
||||
|
||||
Fixes #451 #487
|
||||
CVE-2023-38473
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38473.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797]
|
||||
CVE: CVE-2023-38473
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-common/alternative-test.c | 3 +++
|
||||
avahi-common/alternative.c | 27 +++++++++++++++++++--------
|
||||
2 files changed, 22 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: avahi-0.7/avahi-common/alternative-test.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-common/alternative-test.c
|
||||
+++ avahi-0.7/avahi-common/alternative-test.c
|
||||
@@ -31,6 +31,9 @@ int main(AVAHI_GCC_UNUSED int argc, AVAH
|
||||
const char* const test_strings[] = {
|
||||
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXüüüüüüü",
|
||||
+ ").",
|
||||
+ "\\.",
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\",
|
||||
"gurke",
|
||||
"-",
|
||||
" #",
|
||||
Index: avahi-0.7/avahi-common/alternative.c
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/avahi-common/alternative.c
|
||||
+++ avahi-0.7/avahi-common/alternative.c
|
||||
@@ -49,15 +49,20 @@ static void drop_incomplete_utf8(char *c
|
||||
}
|
||||
|
||||
char *avahi_alternative_host_name(const char *s) {
|
||||
+ char label[AVAHI_LABEL_MAX], alternative[AVAHI_LABEL_MAX*4+1];
|
||||
+ char *alt, *r, *ret;
|
||||
const char *e;
|
||||
- char *r;
|
||||
+ size_t len;
|
||||
|
||||
assert(s);
|
||||
|
||||
if (!avahi_is_valid_host_name(s))
|
||||
return NULL;
|
||||
|
||||
- if ((e = strrchr(s, '-'))) {
|
||||
+ if (!avahi_unescape_label(&s, label, sizeof(label)))
|
||||
+ return NULL;
|
||||
+
|
||||
+ if ((e = strrchr(label, '-'))) {
|
||||
const char *p;
|
||||
|
||||
e++;
|
||||
@@ -74,19 +79,18 @@ char *avahi_alternative_host_name(const
|
||||
|
||||
if (e) {
|
||||
char *c, *m;
|
||||
- size_t l;
|
||||
int n;
|
||||
|
||||
n = atoi(e)+1;
|
||||
if (!(m = avahi_strdup_printf("%i", n)))
|
||||
return NULL;
|
||||
|
||||
- l = e-s-1;
|
||||
+ len = e-label-1;
|
||||
|
||||
- if (l >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||
- l = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||
+ if (len >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||
+ len = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||
|
||||
- if (!(c = avahi_strndup(s, l))) {
|
||||
+ if (!(c = avahi_strndup(label, len))) {
|
||||
avahi_free(m);
|
||||
return NULL;
|
||||
}
|
||||
@@ -100,7 +104,7 @@ char *avahi_alternative_host_name(const
|
||||
} else {
|
||||
char *c;
|
||||
|
||||
- if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-2)))
|
||||
+ if (!(c = avahi_strndup(label, AVAHI_LABEL_MAX-1-2)))
|
||||
return NULL;
|
||||
|
||||
drop_incomplete_utf8(c);
|
||||
@@ -109,6 +113,13 @@ char *avahi_alternative_host_name(const
|
||||
avahi_free(c);
|
||||
}
|
||||
|
||||
+ alt = alternative;
|
||||
+ len = sizeof(alternative);
|
||||
+ ret = avahi_escape_label(r, strlen(r), &alt, &len);
|
||||
+
|
||||
+ avahi_free(r);
|
||||
+ r = avahi_strdup(ret);
|
||||
+
|
||||
assert(avahi_is_valid_host_name(r));
|
||||
|
||||
return r;
|
||||
175
meta/recipes-connectivity/bind/bind/CVE-2023-3341.patch
Normal file
175
meta/recipes-connectivity/bind/bind/CVE-2023-3341.patch
Normal file
@@ -0,0 +1,175 @@
|
||||
From c4fac5ca98efd02fbaef43601627c7a3a09f5a71 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Andrews <marka@isc.org>
|
||||
Date: Tue, 20 Jun 2023 15:21:36 +1000
|
||||
Subject: [PATCH] Limit isccc_cc_fromwire recursion depth
|
||||
|
||||
Named and rndc do not need a lot of recursion so the depth is
|
||||
set to 10.
|
||||
|
||||
Taken from BIND 9.16.44 change.
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/-/commit/c4fac5ca98efd02fbaef43601627c7a3a09f5a71]
|
||||
CVE: CVE-2023-3341
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
lib/isccc/cc.c | 38 +++++++++++++++++++++++---------
|
||||
lib/isccc/include/isccc/result.h | 4 +++-
|
||||
lib/isccc/result.c | 4 +++-
|
||||
3 files changed, 34 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c
|
||||
index e012685..8eac3d6 100644
|
||||
--- a/lib/isccc/cc.c
|
||||
+++ b/lib/isccc/cc.c
|
||||
@@ -53,6 +53,10 @@
|
||||
|
||||
#define MAX_TAGS 256
|
||||
#define DUP_LIFETIME 900
|
||||
+#ifndef ISCCC_MAXDEPTH
|
||||
+#define ISCCC_MAXDEPTH \
|
||||
+ 10 /* Big enough for rndc which just sends a string each way. */
|
||||
+#endif
|
||||
|
||||
typedef isccc_sexpr_t *sexpr_ptr;
|
||||
|
||||
@@ -561,19 +565,25 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length,
|
||||
|
||||
static isc_result_t
|
||||
table_fromwire(isccc_region_t *source, isccc_region_t *secret,
|
||||
- uint32_t algorithm, isccc_sexpr_t **alistp);
|
||||
+ uint32_t algorithm, unsigned int depth, isccc_sexpr_t **alistp);
|
||||
|
||||
static isc_result_t
|
||||
-list_fromwire(isccc_region_t *source, isccc_sexpr_t **listp);
|
||||
+list_fromwire(isccc_region_t *source, unsigned int depth,
|
||||
+ isccc_sexpr_t **listp);
|
||||
|
||||
static isc_result_t
|
||||
-value_fromwire(isccc_region_t *source, isccc_sexpr_t **valuep) {
|
||||
+value_fromwire(isccc_region_t *source, unsigned int depth,
|
||||
+ isccc_sexpr_t **valuep) {
|
||||
unsigned int msgtype;
|
||||
uint32_t len;
|
||||
isccc_sexpr_t *value;
|
||||
isccc_region_t active;
|
||||
isc_result_t result;
|
||||
|
||||
+ if (depth > ISCCC_MAXDEPTH) {
|
||||
+ return (ISCCC_R_MAXDEPTH);
|
||||
+ }
|
||||
+
|
||||
if (REGION_SIZE(*source) < 1 + 4)
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
GET8(msgtype, source->rstart);
|
||||
@@ -591,9 +601,9 @@ value_fromwire(isccc_region_t *source, isccc_sexpr_t **valuep) {
|
||||
} else
|
||||
result = ISC_R_NOMEMORY;
|
||||
} else if (msgtype == ISCCC_CCMSGTYPE_TABLE)
|
||||
- result = table_fromwire(&active, NULL, 0, valuep);
|
||||
+ result = table_fromwire(&active, NULL, 0, depth + 1, valuep);
|
||||
else if (msgtype == ISCCC_CCMSGTYPE_LIST)
|
||||
- result = list_fromwire(&active, valuep);
|
||||
+ result = list_fromwire(&active, depth + 1, valuep);
|
||||
else
|
||||
result = ISCCC_R_SYNTAX;
|
||||
|
||||
@@ -602,7 +612,7 @@ value_fromwire(isccc_region_t *source, isccc_sexpr_t **valuep) {
|
||||
|
||||
static isc_result_t
|
||||
table_fromwire(isccc_region_t *source, isccc_region_t *secret,
|
||||
- uint32_t algorithm, isccc_sexpr_t **alistp)
|
||||
+ uint32_t algorithm, unsigned int depth, isccc_sexpr_t **alistp)
|
||||
{
|
||||
char key[256];
|
||||
uint32_t len;
|
||||
@@ -613,6 +623,10 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
|
||||
|
||||
REQUIRE(alistp != NULL && *alistp == NULL);
|
||||
|
||||
+ if (depth > ISCCC_MAXDEPTH) {
|
||||
+ return (ISCCC_R_MAXDEPTH);
|
||||
+ }
|
||||
+
|
||||
checksum_rstart = NULL;
|
||||
first_tag = true;
|
||||
alist = isccc_alist_create();
|
||||
@@ -628,7 +642,7 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
|
||||
GET_MEM(key, len, source->rstart);
|
||||
key[len] = '\0'; /* Ensure NUL termination. */
|
||||
value = NULL;
|
||||
- result = value_fromwire(source, &value);
|
||||
+ result = value_fromwire(source, depth + 1, &value);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto bad;
|
||||
if (isccc_alist_define(alist, key, value) == NULL) {
|
||||
@@ -661,14 +675,18 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
-list_fromwire(isccc_region_t *source, isccc_sexpr_t **listp) {
|
||||
+list_fromwire(isccc_region_t *source, unsigned int depth, isccc_sexpr_t **listp) {
|
||||
isccc_sexpr_t *list, *value;
|
||||
isc_result_t result;
|
||||
|
||||
+ if (depth > ISCCC_MAXDEPTH) {
|
||||
+ return (ISCCC_R_MAXDEPTH);
|
||||
+ }
|
||||
+
|
||||
list = NULL;
|
||||
while (!REGION_EMPTY(*source)) {
|
||||
value = NULL;
|
||||
- result = value_fromwire(source, &value);
|
||||
+ result = value_fromwire(source, depth + 1, &value);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isccc_sexpr_free(&list);
|
||||
return (result);
|
||||
@@ -699,7 +717,7 @@ isccc_cc_fromwire(isccc_region_t *source, isccc_sexpr_t **alistp,
|
||||
if (version != 1)
|
||||
return (ISCCC_R_UNKNOWNVERSION);
|
||||
|
||||
- return (table_fromwire(source, secret, algorithm, alistp));
|
||||
+ return (table_fromwire(source, secret, algorithm, 0, alistp));
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
diff --git a/lib/isccc/include/isccc/result.h b/lib/isccc/include/isccc/result.h
|
||||
index 6c79dd7..a85861c 100644
|
||||
--- a/lib/isccc/include/isccc/result.h
|
||||
+++ b/lib/isccc/include/isccc/result.h
|
||||
@@ -47,8 +47,10 @@
|
||||
#define ISCCC_R_CLOCKSKEW (ISC_RESULTCLASS_ISCCC + 4)
|
||||
/*% Duplicate */
|
||||
#define ISCCC_R_DUPLICATE (ISC_RESULTCLASS_ISCCC + 5)
|
||||
+/*% Maximum recursion depth */
|
||||
+#define ISCCC_R_MAXDEPTH (ISC_RESULTCLASS_ISCCC + 6)
|
||||
|
||||
-#define ISCCC_R_NRESULTS 6 /*%< Number of results */
|
||||
+#define ISCCC_R_NRESULTS 7 /*%< Number of results */
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
diff --git a/lib/isccc/result.c b/lib/isccc/result.c
|
||||
index 8419bbb..325200b 100644
|
||||
--- a/lib/isccc/result.c
|
||||
+++ b/lib/isccc/result.c
|
||||
@@ -40,7 +40,8 @@ static const char *text[ISCCC_R_NRESULTS] = {
|
||||
"bad auth", /* 3 */
|
||||
"expired", /* 4 */
|
||||
"clock skew", /* 5 */
|
||||
- "duplicate" /* 6 */
|
||||
+ "duplicate", /* 6 */
|
||||
+ "max depth", /* 7 */
|
||||
};
|
||||
|
||||
static const char *ids[ISCCC_R_NRESULTS] = {
|
||||
@@ -50,6 +51,7 @@ static const char *ids[ISCCC_R_NRESULTS] = {
|
||||
"ISCCC_R_EXPIRED",
|
||||
"ISCCC_R_CLOCKSKEW",
|
||||
"ISCCC_R_DUPLICATE",
|
||||
+ "ISCCC_R_MAXDEPTH",
|
||||
};
|
||||
|
||||
#define ISCCC_RESULT_RESULTSET 2
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -23,6 +23,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
|
||||
file://CVE-2022-38177.patch \
|
||||
file://CVE-2022-38178.patch \
|
||||
file://CVE-2023-2828.patch \
|
||||
file://CVE-2023-3341.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "0d8efbe7ec166ada90e46add4267b7e7c934790cba9bd5af6b8380a4fbfb5aff"
|
||||
|
||||
@@ -11,7 +11,7 @@ AUTHOR = "Thomas Hood"
|
||||
HOMEPAGE = "http://packages.debian.org/resolvconf"
|
||||
RDEPENDS_${PN} = "bash"
|
||||
|
||||
SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=master \
|
||||
SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
|
||||
file://fix-path-for-busybox.patch \
|
||||
file://99_resolvconf \
|
||||
"
|
||||
|
||||
@@ -29,6 +29,13 @@ CVE_CHECK_WHITELIST += "CVE-2019-1010025"
|
||||
# https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dunfell&id=e1e89ff7d75c3d2223f9e3bd875b9b0c5e15836b
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-35942"
|
||||
|
||||
# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-4527
|
||||
# This vulnerability was introduced in 2.36 by commit
|
||||
# f282cdbe7f436c75864e5640a409a10485e9abb2 resolv: Implement no-aaaa stub resolver option
|
||||
# so our version is not yet vulnerable
|
||||
# See https://sourceware.org/bugzilla/show_bug.cgi?id=30842
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4527"
|
||||
|
||||
DEPENDS += "gperf-native bison-native make-native"
|
||||
|
||||
NATIVESDKFIXES ?= ""
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "9a045bde41e8edf3b17c73526d8b3c151e0bb242"
|
||||
SRCREV ?= "b86bf0103c5d5ee04012473b80353e3da1f9e67f"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dunfell \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
40
meta/recipes-core/zlib/zlib/CVE-2023-45853.patch
Normal file
40
meta/recipes-core/zlib/zlib/CVE-2023-45853.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 73331a6a0481067628f065ffe87bb1d8f787d10c Mon Sep 17 00:00:00 2001
|
||||
From: Hans Wennborg <hans@chromium.org>
|
||||
Date: Fri, 18 Aug 2023 11:05:33 +0200
|
||||
Subject: [PATCH] Reject overflows of zip header fields in minizip.
|
||||
|
||||
This checks the lengths of the file name, extra field, and comment
|
||||
that would be put in the zip headers, and rejects them if they are
|
||||
too long. They are each limited to 65535 bytes in length by the zip
|
||||
format. This also avoids possible buffer overflows if the provided
|
||||
fields are too long.
|
||||
|
||||
Upstream-Status: Backport from [https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c]
|
||||
CVE: CVE-2023-45853
|
||||
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||
---
|
||||
contrib/minizip/zip.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
|
||||
index 3d3d4cadd..0446109b2 100644
|
||||
--- a/contrib/minizip/zip.c
|
||||
+++ b/contrib/minizip/zip.c
|
||||
@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
|
||||
return ZIP_PARAMERROR;
|
||||
#endif
|
||||
|
||||
+ // The filename and comment length must fit in 16 bits.
|
||||
+ if ((filename!=NULL) && (strlen(filename)>0xffff))
|
||||
+ return ZIP_PARAMERROR;
|
||||
+ if ((comment!=NULL) && (strlen(comment)>0xffff))
|
||||
+ return ZIP_PARAMERROR;
|
||||
+ // The extra field length must fit in 16 bits. If the member also requires
|
||||
+ // a Zip64 extra block, that will also need to fit within that 16-bit
|
||||
+ // length, but that will be checked for later.
|
||||
+ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff))
|
||||
+ return ZIP_PARAMERROR;
|
||||
+
|
||||
zi = (zip64_internal*)file;
|
||||
|
||||
if (zi->in_opened_file_inzip == 1)
|
||||
@@ -11,6 +11,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
|
||||
file://CVE-2018-25032.patch \
|
||||
file://run-ptest \
|
||||
file://CVE-2022-37434.patch \
|
||||
file://CVE-2023-45853.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_URI = "http://zlib.net/"
|
||||
|
||||
|
||||
@@ -54,5 +54,6 @@ SRC_URI = "\
|
||||
file://0001-CVE-2021-45078.patch \
|
||||
file://CVE-2022-38533.patch \
|
||||
file://CVE-2023-25588.patch \
|
||||
file://CVE-2021-46174.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
35
meta/recipes-devtools/binutils/binutils/CVE-2021-46174.patch
Normal file
35
meta/recipes-devtools/binutils/binutils/CVE-2021-46174.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 46322722ad40ac1a75672ae0f62f4969195f1368 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 13:58:38 +1030
|
||||
Subject: [PATCH] PR28753, buffer overflow in read_section_stabs_debugging_info
|
||||
|
||||
PR 28753
|
||||
* rddbg.c (read_section_stabs_debugging_info): Don't read past
|
||||
end of section when concatentating stab strings.
|
||||
|
||||
CVE: CVE-2021-46174
|
||||
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cad4d6b91e97]
|
||||
|
||||
(cherry picked from commit 085b299b71721e15f5c5c5344dc3e4e4536dadba)
|
||||
(cherry picked from commit cad4d6b91e97b6962807d33c04ed7e7797788438)
|
||||
Signed-off-by: poojitha adireddy <pooadire@cisco.com>
|
||||
---
|
||||
binutils/rddbg.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
|
||||
index 72e934055b5..5e76d94a3c4 100644
|
||||
--- a/binutils/rddbg.c
|
||||
+++ b/binutils/rddbg.c
|
||||
@@ -207,7 +207,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
an attempt to read the byte before 'strings' would occur. */
|
||||
while ((len = strlen (s)) > 0
|
||||
&& s[len - 1] == '\\'
|
||||
- && stab + 12 < stabs + stabsize)
|
||||
+ && stab + 16 <= stabs + stabsize)
|
||||
{
|
||||
char *p;
|
||||
|
||||
--
|
||||
2.23.1
|
||||
|
||||
@@ -13,7 +13,10 @@ anyway, so get rid of them. Also, simplify and correct sanity checks.
|
||||
---
|
||||
Upstream-Status: Backport from [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d12f8998d2d086f0a6606589e5aedb7147e6f2f1]
|
||||
CVE: CVE-2023-25588
|
||||
CVE: CVE-2022-47696
|
||||
|
||||
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||
Signed-off-by: poojitha adireddy <pooadire@cisco.com>
|
||||
|
||||
bfd/mach-o.c | 72 ++++++++++++++++++++++------------------------------
|
||||
1 file changed, 31 insertions(+), 41 deletions(-)
|
||||
|
||||
@@ -8,6 +8,8 @@ PYPI_PACKAGE_EXT = "zip"
|
||||
|
||||
inherit pypi
|
||||
|
||||
SRC_URI += " file://CVE-2022-40897.patch "
|
||||
|
||||
SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
|
||||
|
||||
SRC_URI[md5sum] = "0c956eea142af9c2b02d72e3c042af30"
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 43a9c9bfa6aa626ec2a22540bea28d2ca77964be Mon Sep 17 00:00:00 2001
|
||||
From: "Jason R. Coombs" <jaraco@jaraco.com>
|
||||
Date: Fri, 4 Nov 2022 13:47:53 -0400
|
||||
Subject: [PATCH] Limit the amount of whitespace to search/backtrack. Fixes
|
||||
#3659.
|
||||
|
||||
CVE: CVE-2022-40897
|
||||
Upstream-Status: Backport [
|
||||
Upstream : https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be
|
||||
Import from Ubuntu: http://archive.ubuntu.com/ubuntu/pool/main/s/setuptools/setuptools_45.2.0-1ubuntu0.1.debian.tar.xz
|
||||
]
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
|
||||
---
|
||||
setuptools/package_index.py | 2 +-
|
||||
setuptools/tests/test_packageindex.py | 1 -
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- setuptools-45.2.0.orig/setuptools/package_index.py
|
||||
+++ setuptools-45.2.0/setuptools/package_index.py
|
||||
@@ -215,7 +215,7 @@ def unique_values(func):
|
||||
return wrapper
|
||||
|
||||
|
||||
-REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
|
||||
+REL = re.compile(r"""<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>""", re.I)
|
||||
# this line is here to fix emacs' cruddy broken syntax highlighting
|
||||
|
||||
|
||||
@@ -137,8 +137,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
|
||||
file://CVE-2021-3409-4.patch \
|
||||
file://CVE-2021-3409-5.patch \
|
||||
file://hw-display-qxl-Pass-requested-buffer-size-to-qxl_phy.patch \
|
||||
file://CVE-2023-0330_1.patch \
|
||||
file://CVE-2023-0330_2.patch \
|
||||
file://CVE-2023-0330.patch \
|
||||
file://CVE-2023-3354.patch \
|
||||
file://CVE-2023-3180.patch \
|
||||
file://CVE-2020-24165.patch \
|
||||
@@ -167,6 +166,13 @@ CVE_CHECK_WHITELIST += "CVE-2020-27661"
|
||||
# this bug related to windows specific.
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-0664"
|
||||
|
||||
# As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387
|
||||
# RHEL specific issue
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-2680"
|
||||
|
||||
# Affected only `qemu-kvm` shipped with Red Hat Enterprise Linux 8.3 release.
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-20295"
|
||||
|
||||
COMPATIBLE_HOST_mipsarchn32 = "null"
|
||||
COMPATIBLE_HOST_mipsarchn64 = "null"
|
||||
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
From a2e1753b8054344f32cf94f31c6399a58794a380 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Bulekov <alxndr@bu.edu>
|
||||
Date: Thu, 27 Apr 2023 17:10:06 -0400
|
||||
Subject: [PATCH] memory: prevent dma-reentracy issues
|
||||
|
||||
Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA.
|
||||
This flag is set/checked prior to calling a device's MemoryRegion
|
||||
handlers, and set when device code initiates DMA. The purpose of this
|
||||
flag is to prevent two types of DMA-based reentrancy issues:
|
||||
|
||||
1.) mmio -> dma -> mmio case
|
||||
2.) bh -> dma write -> mmio case
|
||||
|
||||
These issues have led to problems such as stack-exhaustion and
|
||||
use-after-frees.
|
||||
|
||||
Summary of the problem from Peter Maydell:
|
||||
https://lore.kernel.org/qemu-devel/CAFEAcA_23vc7hE3iaM-JVA6W38LK4hJoWae5KcknhPRD5fPBZA@mail.gmail.com
|
||||
|
||||
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/62
|
||||
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/540
|
||||
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/541
|
||||
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/556
|
||||
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/557
|
||||
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/827
|
||||
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1282
|
||||
Resolves: CVE-2023-0330
|
||||
|
||||
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Message-Id: <20230427211013.2994127-2-alxndr@bu.edu>
|
||||
[thuth: Replace warn_report() with warn_report_once()]
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/a2e1753b8054344f32cf94f31c6399a58794a380]
|
||||
CVE: CVE-2023-0330
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
include/exec/memory.h | 5 +++++
|
||||
include/hw/qdev-core.h | 7 +++++++
|
||||
memory.c | 16 ++++++++++++++++
|
||||
3 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/include/exec/memory.h b/include/exec/memory.h
|
||||
index 2b8bccdd..0c8cdb8e 100644
|
||||
--- a/include/exec/memory.h
|
||||
+++ b/include/exec/memory.h
|
||||
@@ -378,6 +378,8 @@ struct MemoryRegion {
|
||||
bool is_iommu;
|
||||
RAMBlock *ram_block;
|
||||
Object *owner;
|
||||
+ /* owner as TYPE_DEVICE. Used for re-entrancy checks in MR access hotpath */
|
||||
+ DeviceState *dev;
|
||||
|
||||
const MemoryRegionOps *ops;
|
||||
void *opaque;
|
||||
@@ -400,6 +402,9 @@ struct MemoryRegion {
|
||||
const char *name;
|
||||
unsigned ioeventfd_nb;
|
||||
MemoryRegionIoeventfd *ioeventfds;
|
||||
+
|
||||
+ /* For devices designed to perform re-entrant IO into their own IO MRs */
|
||||
+ bool disable_reentrancy_guard;
|
||||
};
|
||||
|
||||
struct IOMMUMemoryRegion {
|
||||
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
|
||||
index 1518495b..206f0a70 100644
|
||||
--- a/include/hw/qdev-core.h
|
||||
+++ b/include/hw/qdev-core.h
|
||||
@@ -138,6 +138,10 @@ struct NamedGPIOList {
|
||||
QLIST_ENTRY(NamedGPIOList) node;
|
||||
};
|
||||
|
||||
+typedef struct {
|
||||
+ bool engaged_in_io;
|
||||
+} MemReentrancyGuard;
|
||||
+
|
||||
/**
|
||||
* DeviceState:
|
||||
* @realized: Indicates whether the device has been fully constructed.
|
||||
@@ -163,6 +167,9 @@ struct DeviceState {
|
||||
int num_child_bus;
|
||||
int instance_id_alias;
|
||||
int alias_required_for_version;
|
||||
+
|
||||
+ /* Is the device currently in mmio/pio/dma? Used to prevent re-entrancy */
|
||||
+ MemReentrancyGuard mem_reentrancy_guard;
|
||||
};
|
||||
|
||||
struct DeviceListener {
|
||||
diff --git a/memory.c b/memory.c
|
||||
index 8cafb86a..94ebcaf9 100644
|
||||
--- a/memory.c
|
||||
+++ b/memory.c
|
||||
@@ -531,6 +531,18 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
|
||||
access_size_max = 4;
|
||||
}
|
||||
|
||||
+ /* Do not allow more than one simultaneous access to a device's IO Regions */
|
||||
+ if (mr->dev && !mr->disable_reentrancy_guard &&
|
||||
+ !mr->ram_device && !mr->ram && !mr->rom_device && !mr->readonly) {
|
||||
+ if (mr->dev->mem_reentrancy_guard.engaged_in_io) {
|
||||
+ warn_report_once("Blocked re-entrant IO on MemoryRegion: "
|
||||
+ "%s at addr: 0x%" HWADDR_PRIX,
|
||||
+ memory_region_name(mr), addr);
|
||||
+ return MEMTX_ACCESS_ERROR;
|
||||
+ }
|
||||
+ mr->dev->mem_reentrancy_guard.engaged_in_io = true;
|
||||
+ }
|
||||
+
|
||||
/* FIXME: support unaligned access? */
|
||||
access_size = MAX(MIN(size, access_size_max), access_size_min);
|
||||
access_mask = MAKE_64BIT_MASK(0, access_size * 8);
|
||||
@@ -545,6 +557,9 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
|
||||
access_mask, attrs);
|
||||
}
|
||||
}
|
||||
+ if (mr->dev) {
|
||||
+ mr->dev->mem_reentrancy_guard.engaged_in_io = false;
|
||||
+ }
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -1132,6 +1147,7 @@ static void memory_region_do_init(MemoryRegion *mr,
|
||||
}
|
||||
mr->name = g_strdup(name);
|
||||
mr->owner = owner;
|
||||
+ mr->dev = (DeviceState *) object_dynamic_cast(mr->owner, TYPE_DEVICE);
|
||||
mr->ram_block = NULL;
|
||||
|
||||
if (name) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
80
meta/recipes-extended/mdadm/files/CVE-2023-28938.patch
Normal file
80
meta/recipes-extended/mdadm/files/CVE-2023-28938.patch
Normal file
@@ -0,0 +1,80 @@
|
||||
From 7d374a1869d3a84971d027a7f4233878c8f25a62 Mon Sep 17 00:00:00 2001
|
||||
From: Mateusz Grzonka <mateusz.grzonka@intel.com>
|
||||
Date: Tue, 27 Jul 2021 10:25:18 +0200
|
||||
Subject: Fix memory leak after "mdadm --detail"
|
||||
|
||||
Signed-off-by: Mateusz Grzonka <mateusz.grzonka@intel.com>
|
||||
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
||||
---
|
||||
Upstream-Status: Backport from [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/patch/?id=7d374a1869d3a84971d027a7f4233878c8f25a62]
|
||||
CVE: CVE-2023-28938
|
||||
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||
|
||||
Detail.c | 20 +++++++++-----------
|
||||
1 file changed, 9 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Detail.c b/Detail.c
|
||||
index ad56344f..d3af0ab5 100644
|
||||
--- a/Detail.c
|
||||
+++ b/Detail.c
|
||||
@@ -66,11 +66,11 @@ int Detail(char *dev, struct context *c)
|
||||
int spares = 0;
|
||||
struct stat stb;
|
||||
int failed = 0;
|
||||
- struct supertype *st;
|
||||
+ struct supertype *st = NULL;
|
||||
char *subarray = NULL;
|
||||
int max_disks = MD_SB_DISKS; /* just a default */
|
||||
struct mdinfo *info = NULL;
|
||||
- struct mdinfo *sra;
|
||||
+ struct mdinfo *sra = NULL;
|
||||
struct mdinfo *subdev;
|
||||
char *member = NULL;
|
||||
char *container = NULL;
|
||||
@@ -93,8 +93,7 @@ int Detail(char *dev, struct context *c)
|
||||
if (!sra) {
|
||||
if (md_get_array_info(fd, &array)) {
|
||||
pr_err("%s does not appear to be an md device\n", dev);
|
||||
- close(fd);
|
||||
- return rv;
|
||||
+ goto out;
|
||||
}
|
||||
}
|
||||
external = (sra != NULL && sra->array.major_version == -1 &&
|
||||
@@ -108,16 +107,13 @@ int Detail(char *dev, struct context *c)
|
||||
sra->devs == NULL) {
|
||||
pr_err("Array associated with md device %s does not exist.\n",
|
||||
dev);
|
||||
- close(fd);
|
||||
- sysfs_free(sra);
|
||||
- return rv;
|
||||
+ goto out;
|
||||
}
|
||||
array = sra->array;
|
||||
} else {
|
||||
pr_err("cannot get array detail for %s: %s\n",
|
||||
dev, strerror(errno));
|
||||
- close(fd);
|
||||
- return rv;
|
||||
+ goto out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -827,10 +823,12 @@ out:
|
||||
close(fd);
|
||||
free(subarray);
|
||||
free(avail);
|
||||
- for (d = 0; d < n_devices; d++)
|
||||
- free(devices[d]);
|
||||
+ if (devices)
|
||||
+ for (d = 0; d < n_devices; d++)
|
||||
+ free(devices[d]);
|
||||
free(devices);
|
||||
sysfs_free(sra);
|
||||
+ free(st);
|
||||
return rv;
|
||||
}
|
||||
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -25,6 +25,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
|
||||
file://include_sysmacros.patch \
|
||||
file://0001-mdadm-skip-test-11spare-migration.patch \
|
||||
file://CVE-2023-28736.patch \
|
||||
file://CVE-2023-28938.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From 2eaea70111f65b16d55998386e4ceb4273c19eb4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
||||
Date: Fri, 31 Mar 2023 14:46:50 +0200
|
||||
Subject: [PATCH] Overhaul valid_field()
|
||||
|
||||
e5905c4b ("Added control character check") introduced checking for
|
||||
control characters but had the logic inverted, so it rejects all
|
||||
characters that are not control ones.
|
||||
|
||||
Cast the character to `unsigned char` before passing to the character
|
||||
checking functions to avoid UB.
|
||||
|
||||
Use strpbrk(3) for the illegal character test and return early.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/2eaea70111f65b16d55998386e4ceb4273c19eb4]
|
||||
|
||||
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
lib/fields.c | 24 ++++++++++--------------
|
||||
1 file changed, 10 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/lib/fields.c b/lib/fields.c
|
||||
index fb51b582..53929248 100644
|
||||
--- a/lib/fields.c
|
||||
+++ b/lib/fields.c
|
||||
@@ -37,26 +37,22 @@ int valid_field (const char *field, const char *illegal)
|
||||
|
||||
/* For each character of field, search if it appears in the list
|
||||
* of illegal characters. */
|
||||
+ if (illegal && NULL != strpbrk (field, illegal)) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* Search if there are non-printable or control characters */
|
||||
for (cp = field; '\0' != *cp; cp++) {
|
||||
- if (strchr (illegal, *cp) != NULL) {
|
||||
+ unsigned char c = *cp;
|
||||
+ if (!isprint (c)) {
|
||||
+ err = 1;
|
||||
+ }
|
||||
+ if (iscntrl (c)) {
|
||||
err = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- if (0 == err) {
|
||||
- /* Search if there are non-printable or control characters */
|
||||
- for (cp = field; '\0' != *cp; cp++) {
|
||||
- if (!isprint (*cp)) {
|
||||
- err = 1;
|
||||
- }
|
||||
- if (!iscntrl (*cp)) {
|
||||
- err = -1;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
return err;
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
54
meta/recipes-extended/shadow/files/CVE-2023-29383.patch
Normal file
54
meta/recipes-extended/shadow/files/CVE-2023-29383.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
From e5905c4b84d4fb90aefcd96ee618411ebfac663d Mon Sep 17 00:00:00 2001
|
||||
From: tomspiderlabs <128755403+tomspiderlabs@users.noreply.github.com>
|
||||
Date: Thu, 23 Mar 2023 23:39:38 +0000
|
||||
Subject: [PATCH] Added control character check
|
||||
|
||||
Added control character check, returning -1 (to "err") if control characters are present.
|
||||
|
||||
CVE: CVE-2023-29383
|
||||
Upstream-Status: Backport
|
||||
|
||||
Reference to upstream:
|
||||
https://github.com/shadow-maint/shadow/commit/e5905c4b84d4fb90aefcd96ee618411ebfac663d
|
||||
|
||||
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
lib/fields.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/fields.c b/lib/fields.c
|
||||
index 640be931..fb51b582 100644
|
||||
--- a/lib/fields.c
|
||||
+++ b/lib/fields.c
|
||||
@@ -21,9 +21,9 @@
|
||||
*
|
||||
* The supplied field is scanned for non-printable and other illegal
|
||||
* characters.
|
||||
- * + -1 is returned if an illegal character is present.
|
||||
- * + 1 is returned if no illegal characters are present, but the field
|
||||
- * contains a non-printable character.
|
||||
+ * + -1 is returned if an illegal or control character is present.
|
||||
+ * + 1 is returned if no illegal or control characters are present,
|
||||
+ * but the field contains a non-printable character.
|
||||
* + 0 is returned otherwise.
|
||||
*/
|
||||
int valid_field (const char *field, const char *illegal)
|
||||
@@ -45,10 +45,13 @@ int valid_field (const char *field, const char *illegal)
|
||||
}
|
||||
|
||||
if (0 == err) {
|
||||
- /* Search if there are some non-printable characters */
|
||||
+ /* Search if there are non-printable or control characters */
|
||||
for (cp = field; '\0' != *cp; cp++) {
|
||||
if (!isprint (*cp)) {
|
||||
err = 1;
|
||||
+ }
|
||||
+ if (!iscntrl (*cp)) {
|
||||
+ err = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -14,6 +14,8 @@ SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.
|
||||
file://shadow-4.1.3-dots-in-usernames.patch \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
|
||||
file://shadow-relaxed-usernames.patch \
|
||||
file://CVE-2023-29383.patch \
|
||||
file://0001-Overhaul-valid_field.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_class-target = " \
|
||||
|
||||
@@ -16,6 +16,7 @@ REQUIRED_DISTRO_FEATURES = "x11 opengl"
|
||||
|
||||
SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
|
||||
file://0002-help-meson.build-disable-the-use-of-yelp.patch \
|
||||
file://CVE-2022-29536.patch \
|
||||
"
|
||||
SRC_URI[archive.md5sum] = "a559f164bb7d6cbeceb348648076830b"
|
||||
SRC_URI[archive.sha256sum] = "60e190fc07ec7e33472e60c7e633e04004f7e277a0ffc5e9cd413706881e598d"
|
||||
|
||||
46
meta/recipes-gnome/epiphany/files/CVE-2022-29536.patch
Normal file
46
meta/recipes-gnome/epiphany/files/CVE-2022-29536.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
CVE: CVE-2022-29536
|
||||
Upstream-Status: Backport [ https://gitlab.gnome.org/GNOME/epiphany/-/commit/486da133569ebfc436c959a7419565ab102e8525 ]
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
|
||||
From 486da133569ebfc436c959a7419565ab102e8525 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Catanzaro <mcatanzaro@redhat.com>
|
||||
Date: Fri, 15 Apr 2022 18:09:46 -0500
|
||||
Subject: [PATCH] Fix memory corruption in ephy_string_shorten()
|
||||
|
||||
This fixes a regression that I introduced in 232c613472b38ff0d0d97338f366024ddb9cd228.
|
||||
|
||||
I got my browser stuck in a crash loop today while visiting a website
|
||||
with a page title greater than ephy-embed.c's MAX_TITLE_LENGTH, the only
|
||||
condition in which ephy_string_shorten() is ever used. Turns out this
|
||||
commit is wrong: an ellipses is a multibyte character (three bytes in
|
||||
UTF-8) and so we're writing past the end of the buffer when calling
|
||||
strcat() here. Ooops.
|
||||
|
||||
Shame it took nearly four years to notice and correct this.
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1106>
|
||||
---
|
||||
lib/ephy-string.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/ephy-string.c b/lib/ephy-string.c
|
||||
index 35a148ab32..8e524d52ca 100644
|
||||
--- a/lib/ephy-string.c
|
||||
+++ b/lib/ephy-string.c
|
||||
@@ -114,11 +114,10 @@ ephy_string_shorten (char *str,
|
||||
/* create string */
|
||||
bytes = GPOINTER_TO_UINT (g_utf8_offset_to_pointer (str, target_length - 1) - str);
|
||||
|
||||
- /* +1 for ellipsis, +1 for trailing NUL */
|
||||
- new_str = g_new (gchar, bytes + 1 + 1);
|
||||
+ new_str = g_new (gchar, bytes + strlen ("…") + 1);
|
||||
|
||||
strncpy (new_str, str, bytes);
|
||||
- strcat (new_str, "…");
|
||||
+ strncpy (new_str + bytes, "…", strlen ("…") + 1);
|
||||
|
||||
g_free (str);
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271"
|
||||
|
||||
DEPENDS = "zlib"
|
||||
|
||||
SRC_URI = "git://github.com/assimp/assimp.git;branch=assimp_5.0_release;protocol=https \
|
||||
SRC_URI = "git://github.com/assimp/assimp.git;nobranch=1;protocol=https \
|
||||
file://0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch \
|
||||
file://0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch \
|
||||
"
|
||||
|
||||
111
meta/recipes-graphics/wayland/wayland/CVE-2021-3782.patch
Normal file
111
meta/recipes-graphics/wayland/wayland/CVE-2021-3782.patch
Normal file
@@ -0,0 +1,111 @@
|
||||
From 5eed6609619cc2e4eaa8618d11c15d442abf54be Mon Sep 17 00:00:00 2001
|
||||
From: Derek Foreman <derek.foreman@collabora.com>
|
||||
Date: Fri, 28 Jan 2022 13:18:37 -0600
|
||||
Subject: [PATCH] util: Limit size of wl_map
|
||||
|
||||
Since server IDs are basically indistinguishable from really big client
|
||||
IDs at many points in the source, it's theoretically possible to overflow
|
||||
a map and either overflow server IDs into the client ID space, or grow
|
||||
client IDs into the server ID space. This would currently take a massive
|
||||
amount of RAM, but the definition of massive changes yearly.
|
||||
|
||||
Prevent this by placing a ridiculous but arbitrary upper bound on the
|
||||
number of items we can put in a map: 0xF00000, somewhere over 15 million.
|
||||
This should satisfy pathological clients without restriction, but stays
|
||||
well clear of the 0xFF000000 transition point between server and client
|
||||
IDs. It will still take an improbable amount of RAM to hit this, and a
|
||||
client could still exhaust all RAM in this way, but our goal is to prevent
|
||||
overflow and undefined behaviour.
|
||||
|
||||
Fixes #224
|
||||
|
||||
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2021-3782
|
||||
|
||||
Reference to upstream patch:
|
||||
https://gitlab.freedesktop.org/wayland/wayland/-/commit/b19488c7154b902354cb26a27f11415d7799b0b2
|
||||
|
||||
[DP: adjust context for wayland version 1.20.0]
|
||||
Signed-off-by: Dragos-Marian Panait <dragos.panait@windriver.com>
|
||||
---
|
||||
src/wayland-private.h | 1 +
|
||||
src/wayland-util.c | 25 +++++++++++++++++++++++--
|
||||
2 files changed, 24 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/wayland-private.h b/src/wayland-private.h
|
||||
index 9bf8cb7..35dc40e 100644
|
||||
--- a/src/wayland-private.h
|
||||
+++ b/src/wayland-private.h
|
||||
@@ -45,6 +45,7 @@
|
||||
#define WL_MAP_SERVER_SIDE 0
|
||||
#define WL_MAP_CLIENT_SIDE 1
|
||||
#define WL_SERVER_ID_START 0xff000000
|
||||
+#define WL_MAP_MAX_OBJECTS 0x00f00000
|
||||
#define WL_CLOSURE_MAX_ARGS 20
|
||||
|
||||
struct wl_object {
|
||||
diff --git a/src/wayland-util.c b/src/wayland-util.c
|
||||
index d5973bf..3e45d19 100644
|
||||
--- a/src/wayland-util.c
|
||||
+++ b/src/wayland-util.c
|
||||
@@ -195,6 +195,7 @@ wl_map_insert_new(struct wl_map *map, uint32_t flags, void *data)
|
||||
union map_entry *start, *entry;
|
||||
struct wl_array *entries;
|
||||
uint32_t base;
|
||||
+ uint32_t count;
|
||||
|
||||
if (map->side == WL_MAP_CLIENT_SIDE) {
|
||||
entries = &map->client_entries;
|
||||
@@ -215,10 +216,25 @@ wl_map_insert_new(struct wl_map *map, uint32_t flags, void *data)
|
||||
start = entries->data;
|
||||
}
|
||||
|
||||
+ /* wl_array only grows, so if we have too many objects at
|
||||
+ * this point there's no way to clean up. We could be more
|
||||
+ * pro-active about trying to avoid this allocation, but
|
||||
+ * it doesn't really matter because at this point there is
|
||||
+ * nothing to be done but disconnect the client and delete
|
||||
+ * the whole array either way.
|
||||
+ */
|
||||
+ count = entry - start;
|
||||
+ if (count > WL_MAP_MAX_OBJECTS) {
|
||||
+ /* entry->data is freshly malloced garbage, so we'd
|
||||
+ * better make it a NULL so wl_map_for_each doesn't
|
||||
+ * dereference it later. */
|
||||
+ entry->data = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
entry->data = data;
|
||||
entry->next |= (flags & 0x1) << 1;
|
||||
|
||||
- return (entry - start) + base;
|
||||
+ return count + base;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -235,6 +251,9 @@ wl_map_insert_at(struct wl_map *map, uint32_t flags, uint32_t i, void *data)
|
||||
i -= WL_SERVER_ID_START;
|
||||
}
|
||||
|
||||
+ if (i > WL_MAP_MAX_OBJECTS)
|
||||
+ return -1;
|
||||
+
|
||||
count = entries->size / sizeof *start;
|
||||
if (count < i)
|
||||
return -1;
|
||||
@@ -269,8 +288,10 @@ wl_map_reserve_new(struct wl_map *map, uint32_t i)
|
||||
i -= WL_SERVER_ID_START;
|
||||
}
|
||||
|
||||
- count = entries->size / sizeof *start;
|
||||
+ if (i > WL_MAP_MAX_OBJECTS)
|
||||
+ return -1;
|
||||
|
||||
+ count = entries->size / sizeof *start;
|
||||
if (count < i)
|
||||
return -1;
|
||||
|
||||
--
|
||||
2.37.3
|
||||
@@ -18,6 +18,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
|
||||
file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \
|
||||
file://0001-build-Fix-strndup-detection-on-MinGW.patch \
|
||||
file://0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch \
|
||||
file://CVE-2021-3782.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "23317697b6e3ff2e1ac8c5ba3ed57b65"
|
||||
SRC_URI[sha256sum] = "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d"
|
||||
|
||||
63
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43785.patch
Normal file
63
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43785.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
From 6858d468d9ca55fb4c5fd70b223dbc78a3358a7f Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun, 17 Sep 2023 14:19:40 -0700
|
||||
Subject: [PATCH libX11 1/5] CVE-2023-43785: out-of-bounds memory access in
|
||||
_XkbReadKeySyms()
|
||||
|
||||
Make sure we allocate enough memory in the first place, and
|
||||
also handle error returns from _XkbReadBufferCopyKeySyms() when
|
||||
it detects out-of-bounds issues.
|
||||
|
||||
Reported-by: Gregory James DUCK <gjduck@gmail.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libx11/tree/debian/patches/0001-CVE-2023-43785-out-of-bounds-memory-access-in-_XkbRe.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/6858d468d9ca55fb4c5fd70b223dbc78a3358a7f]
|
||||
CVE: CVE-2023-43785
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/xkb/XKBGetMap.c | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
|
||||
index 2891d21e..31199e4a 100644
|
||||
--- a/src/xkb/XKBGetMap.c
|
||||
+++ b/src/xkb/XKBGetMap.c
|
||||
@@ -182,7 +182,8 @@ _XkbReadKeySyms(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
|
||||
if (offset + newMap->nSyms >= map->size_syms) {
|
||||
register int sz;
|
||||
|
||||
- sz = map->size_syms + 128;
|
||||
+ sz = offset + newMap->nSyms;
|
||||
+ sz = ((sz + (unsigned) 128) / 128) * 128;
|
||||
_XkbResizeArray(map->syms, map->size_syms, sz, KeySym);
|
||||
if (map->syms == NULL) {
|
||||
map->size_syms = 0;
|
||||
@@ -191,8 +192,9 @@ _XkbReadKeySyms(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
|
||||
map->size_syms = sz;
|
||||
}
|
||||
if (newMap->nSyms > 0) {
|
||||
- _XkbReadBufferCopyKeySyms(buf, (KeySym *) &map->syms[offset],
|
||||
- newMap->nSyms);
|
||||
+ if (_XkbReadBufferCopyKeySyms(buf, (KeySym *) &map->syms[offset],
|
||||
+ newMap->nSyms) == 0)
|
||||
+ return BadLength;
|
||||
offset += newMap->nSyms;
|
||||
}
|
||||
else {
|
||||
@@ -222,8 +224,10 @@ _XkbReadKeySyms(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
|
||||
newSyms = XkbResizeKeySyms(xkb, i + rep->firstKeySym, tmp);
|
||||
if (newSyms == NULL)
|
||||
return BadAlloc;
|
||||
- if (newMap->nSyms > 0)
|
||||
- _XkbReadBufferCopyKeySyms(buf, newSyms, newMap->nSyms);
|
||||
+ if (newMap->nSyms > 0) {
|
||||
+ if (_XkbReadBufferCopyKeySyms(buf, newSyms, newMap->nSyms) == 0)
|
||||
+ return BadLength;
|
||||
+ }
|
||||
else
|
||||
newSyms[0] = NoSymbol;
|
||||
oldMap->kt_index[0] = newMap->ktIndex[0];
|
||||
--
|
||||
2.39.3
|
||||
|
||||
42
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43786-1.patch
Normal file
42
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43786-1.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 204c3393c4c90a29ed6bef64e43849536e863a86 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu, 7 Sep 2023 15:54:30 -0700
|
||||
Subject: [PATCH libX11 2/5] CVE-2023-43786: stack exhaustion from infinite
|
||||
recursion in PutSubImage()
|
||||
|
||||
When splitting a single line of pixels into chunks to send to the
|
||||
X server, be sure to take into account the number of bits per pixel,
|
||||
so we don't just loop forever trying to send more pixels than fit in
|
||||
the given request size and not breaking them down into a small enough
|
||||
chunk to fix.
|
||||
|
||||
Fixes: "almost complete rewrite" (Dec. 12, 1987) from X11R2
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libx11/tree/debian/patches/0002-CVE-2023-43786-stack-exhaustion-from-infinite-recurs.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/204c3393c4c90a29ed6bef64e43849536e863a86]
|
||||
CVE: CVE-2023-43786
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/PutImage.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/PutImage.c b/src/PutImage.c
|
||||
index 857ee916..a6db7b42 100644
|
||||
--- a/src/PutImage.c
|
||||
+++ b/src/PutImage.c
|
||||
@@ -914,8 +914,9 @@ PutSubImage (
|
||||
req_width, req_height - SubImageHeight,
|
||||
dest_bits_per_pixel, dest_scanline_pad);
|
||||
} else {
|
||||
- int SubImageWidth = (((Available << 3) / dest_scanline_pad)
|
||||
- * dest_scanline_pad) - left_pad;
|
||||
+ int SubImageWidth = ((((Available << 3) / dest_scanline_pad)
|
||||
+ * dest_scanline_pad) - left_pad)
|
||||
+ / dest_bits_per_pixel;
|
||||
|
||||
PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
|
||||
(unsigned int) SubImageWidth, 1,
|
||||
--
|
||||
2.39.3
|
||||
|
||||
46
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43786-2.patch
Normal file
46
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43786-2.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From 73a37d5f2fcadd6540159b432a70d80f442ddf4a Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu, 7 Sep 2023 15:55:04 -0700
|
||||
Subject: [PATCH libX11 3/5] XPutImage: clip images to maximum height & width
|
||||
allowed by protocol
|
||||
|
||||
The PutImage request specifies height & width of the image as CARD16
|
||||
(unsigned 16-bit integer), same as the maximum dimensions of an X11
|
||||
Drawable, which the image is being copied to.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libx11/tree/debian/patches/0003-XPutImage-clip-images-to-maximum-height-width-allowe.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/73a37d5f2fcadd6540159b432a70d80f442ddf4a]
|
||||
CVE: CVE-2023-43786
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/PutImage.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/PutImage.c b/src/PutImage.c
|
||||
index a6db7b42..ba411e36 100644
|
||||
--- a/src/PutImage.c
|
||||
+++ b/src/PutImage.c
|
||||
@@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include "Xlibint.h"
|
||||
#include "Xutil.h"
|
||||
#include <stdio.h>
|
||||
+#include <limits.h>
|
||||
#include "Cr.h"
|
||||
#include "ImUtil.h"
|
||||
#include "reallocarray.h"
|
||||
@@ -962,6 +963,10 @@ XPutImage (
|
||||
height = image->height - req_yoffset;
|
||||
if ((width <= 0) || (height <= 0))
|
||||
return 0;
|
||||
+ if (width > USHRT_MAX)
|
||||
+ width = USHRT_MAX;
|
||||
+ if (height > USHRT_MAX)
|
||||
+ height = USHRT_MAX;
|
||||
|
||||
if ((image->bits_per_pixel == 1) || (image->format != ZPixmap)) {
|
||||
dest_bits_per_pixel = 1;
|
||||
--
|
||||
2.39.3
|
||||
|
||||
52
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43787-1.patch
Normal file
52
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43787-1.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From b4031fc023816aca07fbd592ed97010b9b48784b Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu, 7 Sep 2023 16:12:27 -0700
|
||||
Subject: [PATCH libX11 4/5] XCreatePixmap: trigger BadValue error for
|
||||
out-of-range dimensions
|
||||
|
||||
The CreatePixmap request specifies height & width of the image as CARD16
|
||||
(unsigned 16-bit integer), so if either is larger than that, set it to 0
|
||||
so the X server returns a BadValue error as the protocol requires.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libx11/tree/debian/patches/0004-XCreatePixmap-trigger-BadValue-error-for-out-of-rang.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/b4031fc023816aca07fbd592ed97010b9b48784b]
|
||||
CVE: CVE-2023-43787
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/CrPixmap.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/CrPixmap.c b/src/CrPixmap.c
|
||||
index cdf31207..3cb2ca6d 100644
|
||||
--- a/src/CrPixmap.c
|
||||
+++ b/src/CrPixmap.c
|
||||
@@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "Xlibint.h"
|
||||
+#include <limits.h>
|
||||
|
||||
#ifdef USE_DYNAMIC_XCURSOR
|
||||
void
|
||||
@@ -47,6 +48,16 @@ Pixmap XCreatePixmap (
|
||||
Pixmap pid;
|
||||
register xCreatePixmapReq *req;
|
||||
|
||||
+ /*
|
||||
+ * Force a BadValue X Error if the requested dimensions are larger
|
||||
+ * than the X11 protocol has room for, since that's how callers expect
|
||||
+ * to get notified of errors.
|
||||
+ */
|
||||
+ if (width > USHRT_MAX)
|
||||
+ width = 0;
|
||||
+ if (height > USHRT_MAX)
|
||||
+ height = 0;
|
||||
+
|
||||
LockDisplay(dpy);
|
||||
GetReq(CreatePixmap, req);
|
||||
req->drawable = d;
|
||||
--
|
||||
2.39.3
|
||||
|
||||
64
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43787-2.patch
Normal file
64
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43787-2.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
From 7916869d16bdd115ac5be30a67c3749907aea6a0 Mon Sep 17 00:00:00 2001
|
||||
From: Yair Mizrahi <yairm@jfrog.com>
|
||||
Date: Thu, 7 Sep 2023 16:15:32 -0700
|
||||
Subject: [PATCH libX11 5/5] CVE-2023-43787: Integer overflow in XCreateImage()
|
||||
leading to a heap overflow
|
||||
|
||||
When the format is `Pixmap` it calculates the size of the image data as:
|
||||
ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
|
||||
There is no validation on the `width` of the image, and so this
|
||||
calculation exceeds the capacity of a 4-byte integer, causing an overflow.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libx11/tree/debian/patches/0005-CVE-2023-43787-Integer-overflow-in-XCreateImage-lead.patch?h=ubuntu/focal-security
|
||||
Upstream commit https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/7916869d16bdd115ac5be30a67c3749907aea6a0]
|
||||
CVE: CVE-2023-43787
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/ImUtil.c | 20 +++++++++++++++-----
|
||||
1 file changed, 15 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/ImUtil.c b/src/ImUtil.c
|
||||
index 36f08a03..fbfad33e 100644
|
||||
--- a/src/ImUtil.c
|
||||
+++ b/src/ImUtil.c
|
||||
@@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <stdio.h>
|
||||
+#include <limits.h>
|
||||
#include "ImUtil.h"
|
||||
|
||||
static int _XDestroyImage(XImage *);
|
||||
@@ -361,13 +362,22 @@ XImage *XCreateImage (
|
||||
/*
|
||||
* compute per line accelerator.
|
||||
*/
|
||||
- {
|
||||
- if (format == ZPixmap)
|
||||
+ if (format == ZPixmap) {
|
||||
+ if ((INT_MAX / bits_per_pixel) < width) {
|
||||
+ Xfree(image);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
min_bytes_per_line =
|
||||
- ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
|
||||
- else
|
||||
+ ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
|
||||
+ } else {
|
||||
+ if ((INT_MAX - offset) < width) {
|
||||
+ Xfree(image);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
min_bytes_per_line =
|
||||
- ROUNDUP((width + offset), image->bitmap_pad);
|
||||
+ ROUNDUP((width + offset), image->bitmap_pad);
|
||||
}
|
||||
if (image_bytes_per_line == 0) {
|
||||
image->bytes_per_line = min_bytes_per_line;
|
||||
--
|
||||
2.39.3
|
||||
|
||||
@@ -19,6 +19,11 @@ SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \
|
||||
file://CVE-2022-3554.patch \
|
||||
file://CVE-2022-3555.patch \
|
||||
file://CVE-2023-3138.patch \
|
||||
file://CVE-2023-43785.patch \
|
||||
file://CVE-2023-43786-1.patch \
|
||||
file://CVE-2023-43786-2.patch \
|
||||
file://CVE-2023-43787-1.patch \
|
||||
file://CVE-2023-43787-2.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "55adbfb6d4370ecac5e70598c4e7eed2"
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
From 541ab2ecd41d4d8689e71855d93e492bc554719a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 3 Oct 2023 11:53:05 +1000
|
||||
Subject: [PATCH] Xi/randr: fix handling of PropModeAppend/Prepend
|
||||
|
||||
The handling of appending/prepending properties was incorrect, with at
|
||||
least two bugs: the property length was set to the length of the new
|
||||
part only, i.e. appending or prepending N elements to a property with P
|
||||
existing elements always resulted in the property having N elements
|
||||
instead of N + P.
|
||||
|
||||
Second, when pre-pending a value to a property, the offset for the old
|
||||
values was incorrect, leaving the new property with potentially
|
||||
uninitalized values and/or resulting in OOB memory writes.
|
||||
For example, prepending a 3 element value to a 5 element property would
|
||||
result in this 8 value array:
|
||||
[N, N, N, ?, ?, P, P, P ] P, P
|
||||
^OOB write
|
||||
|
||||
The XI2 code is a copy/paste of the RandR code, so the bug exists in
|
||||
both.
|
||||
|
||||
CVE-2023-5367, ZDI-CAN-22153
|
||||
|
||||
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/541ab2ecd41d4d8689e71855d93e492bc554719a]
|
||||
CVE: CVE-2023-5367
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
Xi/xiproperty.c | 4 ++--
|
||||
randr/rrproperty.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
|
||||
index 066ba21fba..d315f04d0e 100644
|
||||
--- a/Xi/xiproperty.c
|
||||
+++ b/Xi/xiproperty.c
|
||||
@@ -730,7 +730,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||
XIDestroyDeviceProperty(prop);
|
||||
return BadAlloc;
|
||||
}
|
||||
- new_value.size = len;
|
||||
+ new_value.size = total_len;
|
||||
new_value.type = type;
|
||||
new_value.format = format;
|
||||
|
||||
@@ -747,7 +747,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||
case PropModePrepend:
|
||||
new_data = new_value.data;
|
||||
old_data = (void *) (((char *) new_value.data) +
|
||||
- (prop_value->size * size_in_bytes));
|
||||
+ (len * size_in_bytes));
|
||||
break;
|
||||
}
|
||||
if (new_data)
|
||||
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
|
||||
index c2fb9585c6..25469f57b2 100644
|
||||
--- a/randr/rrproperty.c
|
||||
+++ b/randr/rrproperty.c
|
||||
@@ -209,7 +209,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
||||
RRDestroyOutputProperty(prop);
|
||||
return BadAlloc;
|
||||
}
|
||||
- new_value.size = len;
|
||||
+ new_value.size = total_len;
|
||||
new_value.type = type;
|
||||
new_value.format = format;
|
||||
|
||||
@@ -226,7 +226,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
||||
case PropModePrepend:
|
||||
new_data = new_value.data;
|
||||
old_data = (void *) (((char *) new_value.data) +
|
||||
- (prop_value->size * size_in_bytes));
|
||||
+ (len * size_in_bytes));
|
||||
break;
|
||||
}
|
||||
if (new_data)
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
From 564ccf2ce9616620456102727acb8b0256b7bbd7 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu, 5 Oct 2023 12:19:45 +1000
|
||||
Subject: [PATCH] mi: reset the PointerWindows reference on screen switch
|
||||
|
||||
PointerWindows[] keeps a reference to the last window our sprite
|
||||
entered - changes are usually handled by CheckMotion().
|
||||
|
||||
If we switch between screens via XWarpPointer our
|
||||
dev->spriteInfo->sprite->win is set to the new screen's root window.
|
||||
If there's another window at the cursor location CheckMotion() will
|
||||
trigger the right enter/leave events later. If there is not, it skips
|
||||
that process and we never trigger LeaveWindow() - PointerWindows[] for
|
||||
the device still refers to the previous window.
|
||||
|
||||
If that window is destroyed we have a dangling reference that will
|
||||
eventually cause a use-after-free bug when checking the window hierarchy
|
||||
later.
|
||||
|
||||
To trigger this, we require:
|
||||
- two protocol screens
|
||||
- XWarpPointer to the other screen's root window
|
||||
- XDestroyWindow before entering any other window
|
||||
|
||||
This is a niche bug so we hack around it by making sure we reset the
|
||||
PointerWindows[] entry so we cannot have a dangling pointer. This
|
||||
doesn't handle Enter/Leave events correctly but the previous code didn't
|
||||
either.
|
||||
|
||||
CVE-2023-5380, ZDI-CAN-21608
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Sri working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/564ccf2ce9616620456102727acb8b0256b7bbd7]
|
||||
CVE: CVE-2023-5380
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
dix/enterleave.h | 2 --
|
||||
include/eventstr.h | 3 +++
|
||||
mi/mipointer.c | 17 +++++++++++++++--
|
||||
3 files changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dix/enterleave.h b/dix/enterleave.h
|
||||
index 4b833d8..e8af924 100644
|
||||
--- a/dix/enterleave.h
|
||||
+++ b/dix/enterleave.h
|
||||
@@ -58,8 +58,6 @@ extern void DeviceFocusEvent(DeviceIntPtr dev,
|
||||
|
||||
extern void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode);
|
||||
|
||||
-extern void LeaveWindow(DeviceIntPtr dev);
|
||||
-
|
||||
extern void CoreFocusEvent(DeviceIntPtr kbd,
|
||||
int type, int mode, int detail, WindowPtr pWin);
|
||||
|
||||
diff --git a/include/eventstr.h b/include/eventstr.h
|
||||
index bf3b95f..2bae3b0 100644
|
||||
--- a/include/eventstr.h
|
||||
+++ b/include/eventstr.h
|
||||
@@ -296,4 +296,7 @@ union _InternalEvent {
|
||||
#endif
|
||||
};
|
||||
|
||||
+extern void
|
||||
+LeaveWindow(DeviceIntPtr dev);
|
||||
+
|
||||
#endif
|
||||
diff --git a/mi/mipointer.c b/mi/mipointer.c
|
||||
index 75be1ae..b12ae9b 100644
|
||||
--- a/mi/mipointer.c
|
||||
+++ b/mi/mipointer.c
|
||||
@@ -397,8 +397,21 @@ miPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||
#ifdef PANORAMIX
|
||||
&& noPanoramiXExtension
|
||||
#endif
|
||||
- )
|
||||
- UpdateSpriteForScreen(pDev, pScreen);
|
||||
+ ) {
|
||||
+ DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
|
||||
+ /* Hack for CVE-2023-5380: if we're moving
|
||||
+ * screens PointerWindows[] keeps referring to the
|
||||
+ * old window. If that gets destroyed we have a UAF
|
||||
+ * bug later. Only happens when jumping from a window
|
||||
+ * to the root window on the other screen.
|
||||
+ * Enter/Leave events are incorrect for that case but
|
||||
+ * too niche to fix.
|
||||
+ */
|
||||
+ LeaveWindow(pDev);
|
||||
+ if (master)
|
||||
+ LeaveWindow(master);
|
||||
+ UpdateSpriteForScreen(pDev, pScreen);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -16,6 +16,8 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
|
||||
file://CVE-2022-46344.patch \
|
||||
file://CVE-2023-0494.patch \
|
||||
file://CVE-2023-1393.patch \
|
||||
file://CVE-2023-5367.patch \
|
||||
file://CVE-2023-5380.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "453fc86aac8c629b3a5b77e8dcca30bf"
|
||||
SRC_URI[sha256sum] = "54b199c9280ff8bf0f73a54a759645bd0eeeda7255d1c99310d5b7595f3ac066"
|
||||
|
||||
@@ -30,6 +30,9 @@ inherit autotools update-rc.d systemd
|
||||
export LDFLAGS = "-L${STAGING_LIBDIR}"
|
||||
EXTRA_OECONF = " --with-zlib=yes"
|
||||
|
||||
# affects kexec-tools shipped by Fedora versions prior to 2.0.21-8 and RHEL versions prior to 2.0.20-47.
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-20269"
|
||||
|
||||
do_compile_prepend() {
|
||||
# Remove the prepackaged config.h from the source tree as it overrides
|
||||
# the same file generated by configure and placed in the build tree
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
# Auto-generated CVE metadata, DO NOT EDIT BY HAND.
|
||||
# Generated at 2023-10-24 06:03:05.289306 for version 5.4.257
|
||||
# Generated at 2023-12-05 04:45:42.561193 for version 5.4.262
|
||||
|
||||
python check_kernel_cve_status_version() {
|
||||
this_version = "5.4.257"
|
||||
this_version = "5.4.262"
|
||||
kernel_version = d.getVar("LINUX_VERSION")
|
||||
if kernel_version != this_version:
|
||||
bb.warn("Kernel CVE status needs updating: generated for %s but kernel is %s" % (this_version, kernel_version))
|
||||
@@ -5638,7 +5638,8 @@ CVE_CHECK_WHITELIST += "CVE-2021-43976"
|
||||
# cpe-stable-backport: Backported in 5.4.170
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-44733"
|
||||
|
||||
# CVE-2021-44879 needs backporting (fixed from 5.17rc1)
|
||||
# cpe-stable-backport: Backported in 5.4.260
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-44879"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.171
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-45095"
|
||||
@@ -6500,7 +6501,7 @@ CVE_CHECK_WHITELIST += "CVE-2022-43945"
|
||||
|
||||
# CVE-2022-44033 needs backporting (fixed from 6.4rc1)
|
||||
|
||||
# CVE-2022-44034 has no known resolution
|
||||
# CVE-2022-44034 needs backporting (fixed from 6.4rc1)
|
||||
|
||||
# CVE-2022-4543 has no known resolution
|
||||
|
||||
@@ -6670,7 +6671,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-1118"
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-1192"
|
||||
|
||||
# CVE-2023-1193 has no known resolution
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-1193"
|
||||
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-1194"
|
||||
@@ -6964,7 +6966,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-3106"
|
||||
|
||||
# CVE-2023-31084 needs backporting (fixed from 6.4rc3)
|
||||
|
||||
# CVE-2023-31085 needs backporting (fixed from 5.4.258)
|
||||
# cpe-stable-backport: Backported in 5.4.258
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-31085"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.247
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-3111"
|
||||
@@ -7079,7 +7082,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-34256"
|
||||
# fixed-version: only affects 6.1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-34319"
|
||||
|
||||
# CVE-2023-34324 needs backporting (fixed from 5.4.258)
|
||||
# fixed-version: only affects 5.10rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-34324"
|
||||
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-3439"
|
||||
@@ -7104,7 +7108,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-35824"
|
||||
# fixed-version: only affects 5.18rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-35826"
|
||||
|
||||
# CVE-2023-35827 has no known resolution
|
||||
# cpe-stable-backport: Backported in 5.4.259
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-35827"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.243
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-35828"
|
||||
@@ -7182,7 +7187,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-3867"
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-39189"
|
||||
|
||||
# CVE-2023-39191 needs backporting (fixed from 6.3rc1)
|
||||
# fixed-version: only affects 5.19rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-39191"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-39192"
|
||||
@@ -7193,6 +7199,11 @@ CVE_CHECK_WHITELIST += "CVE-2023-39193"
|
||||
# cpe-stable-backport: Backported in 5.4.255
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-39194"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.251
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-39197"
|
||||
|
||||
# CVE-2023-39198 needs backporting (fixed from 6.5rc7)
|
||||
|
||||
# fixed-version: only affects 5.6rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4004"
|
||||
|
||||
@@ -7204,7 +7215,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-4015"
|
||||
# cpe-stable-backport: Backported in 5.4.253
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-40283"
|
||||
|
||||
# CVE-2023-40791 needs backporting (fixed from 6.5rc6)
|
||||
# fixed-version: only affects 6.3rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-40791"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.253
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4128"
|
||||
@@ -7246,7 +7258,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-42752"
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-42753"
|
||||
|
||||
# CVE-2023-42754 needs backporting (fixed from 5.4.258)
|
||||
# cpe-stable-backport: Backported in 5.4.258
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-42754"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-42755"
|
||||
@@ -7281,14 +7294,16 @@ CVE_CHECK_WHITELIST += "CVE-2023-4569"
|
||||
# cpe-stable-backport: Backported in 5.4.235
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-45862"
|
||||
|
||||
# CVE-2023-45863 needs backporting (fixed from 6.3rc1)
|
||||
# cpe-stable-backport: Backported in 5.4.260
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-45863"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-45871"
|
||||
|
||||
# CVE-2023-45898 needs backporting (fixed from 6.6rc1)
|
||||
# fixed-version: only affects 6.5rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-45898"
|
||||
|
||||
# CVE-2023-4610 has no known resolution
|
||||
# CVE-2023-4610 needs backporting (fixed from 6.4)
|
||||
|
||||
# fixed-version: only affects 6.4rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4611"
|
||||
@@ -7298,6 +7313,13 @@ CVE_CHECK_WHITELIST += "CVE-2023-4611"
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4623"
|
||||
|
||||
# fixed-version: only affects 5.10rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-46813"
|
||||
|
||||
# CVE-2023-46862 needs backporting (fixed from 6.6)
|
||||
|
||||
# CVE-2023-47233 has no known resolution
|
||||
|
||||
# CVE-2023-4732 needs backporting (fixed from 5.14rc1)
|
||||
|
||||
# CVE-2023-4881 needs backporting (fixed from 6.6rc1)
|
||||
@@ -7305,7 +7327,14 @@ CVE_CHECK_WHITELIST += "CVE-2023-4623"
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4921"
|
||||
|
||||
# CVE-2023-5158 has no known resolution
|
||||
# fixed-version: only affects 6.0rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5090"
|
||||
|
||||
# fixed-version: only affects 5.13rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5158"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.260
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5178"
|
||||
|
||||
# fixed-version: only affects 5.9rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5197"
|
||||
@@ -7313,3 +7342,23 @@ CVE_CHECK_WHITELIST += "CVE-2023-5197"
|
||||
# fixed-version: only affects 6.1rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5345"
|
||||
|
||||
# fixed-version: only affects 6.2 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5633"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.259
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5717"
|
||||
|
||||
# CVE-2023-5972 needs backporting (fixed from 6.6rc7)
|
||||
|
||||
# CVE-2023-6039 needs backporting (fixed from 6.5rc5)
|
||||
|
||||
# fixed-version: only affects 6.6rc3 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6111"
|
||||
|
||||
# CVE-2023-6121 needs backporting (fixed from 6.7rc3)
|
||||
|
||||
# fixed-version: only affects 5.7rc7 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6176"
|
||||
|
||||
# CVE-2023-6238 has no known resolution
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "85315779726690bf22e615a8f5e2ab9f3ea8e580"
|
||||
SRCREV_meta ?= "3f4db4c1957e98a3da50908339aaee426e58fd13"
|
||||
SRCREV_machine ?= "43d5f7eb85acc21ec87ec45b2cae127dad8bf7a4"
|
||||
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
|
||||
|
||||
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.257"
|
||||
LINUX_VERSION ?= "5.4.262"
|
||||
|
||||
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.257"
|
||||
LINUX_VERSION ?= "5.4.262"
|
||||
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 ?= "dd581fe8efd97479b60c1169c77d2e9e37fdbd42"
|
||||
SRCREV_machine ?= "739b4ff36fdf4203e60448f252dd4afcd8871046"
|
||||
SRCREV_meta ?= "3f4db4c1957e98a3da50908339aaee426e58fd13"
|
||||
SRCREV_machine_qemuarm ?= "7c33fa232f43e9059395bd30e23ef3c16359ba11"
|
||||
SRCREV_machine ?= "42abef1facd8bc8d1f51470493f08d87d0862f8e"
|
||||
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -13,16 +13,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemux86-64 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "af8795f548930f376f648b3c38c96ea9adeca302"
|
||||
SRCREV_machine_qemuarm64 ?= "08b2d42ab0000a6f12d816c0828632c162f5173a"
|
||||
SRCREV_machine_qemumips ?= "37c8da56986328d9030015e1a80beaa90babab30"
|
||||
SRCREV_machine_qemuppc ?= "3cd238f6056560888f7f717c569ca4a1fe16ccc9"
|
||||
SRCREV_machine_qemuriscv64 ?= "aee8802f6fec35ea9b393707cc2adb4d433d93c8"
|
||||
SRCREV_machine_qemux86 ?= "aee8802f6fec35ea9b393707cc2adb4d433d93c8"
|
||||
SRCREV_machine_qemux86-64 ?= "aee8802f6fec35ea9b393707cc2adb4d433d93c8"
|
||||
SRCREV_machine_qemumips64 ?= "44fbd145164885c2ba73a8ddcb09fd6f3ab0d59c"
|
||||
SRCREV_machine ?= "aee8802f6fec35ea9b393707cc2adb4d433d93c8"
|
||||
SRCREV_meta ?= "3f4db4c1957e98a3da50908339aaee426e58fd13"
|
||||
SRCREV_machine_qemuarm ?= "76b8ef2c7ecb7cf484e0eff4d509ec57c310d06e"
|
||||
SRCREV_machine_qemuarm64 ?= "23b9912a979d98708f3adc8312af42eb9049c1d6"
|
||||
SRCREV_machine_qemumips ?= "2e266704c46066c80821a491ad6f42c930e00d5d"
|
||||
SRCREV_machine_qemuppc ?= "2343a888a77678d4440032d22327f753d1a90cdb"
|
||||
SRCREV_machine_qemuriscv64 ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
|
||||
SRCREV_machine_qemux86 ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
|
||||
SRCREV_machine_qemux86-64 ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
|
||||
SRCREV_machine_qemumips64 ?= "73d9e7eaf1161e5deb6d3fbfdefb07fc5fd87d3f"
|
||||
SRCREV_machine ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
|
||||
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
|
||||
|
||||
# remap qemuarm to qemuarma15 for the 5.4 kernel
|
||||
# KMACHINE_qemuarm ?= "qemuarma15"
|
||||
@@ -31,7 +31,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.257"
|
||||
LINUX_VERSION ?= "5.4.262"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 0754562e13d2e63a248a1c82f90b30bc0ffe307c Mon Sep 17 00:00:00 2001
|
||||
From: Alex Stewart <alex.stewart@ni.com>
|
||||
Date: Tue, 10 Oct 2023 16:10:34 -0400
|
||||
Subject: [PATCH] mat4/mat5: fix int overflow in dataend calculation
|
||||
|
||||
The clang sanitizer warns of a possible signed integer overflow when
|
||||
calculating the `dataend` value in `mat4_read_header()`.
|
||||
|
||||
```
|
||||
src/mat4.c:323:41: runtime error: signed integer overflow: 205 * -100663296 cannot be represented in type 'int'
|
||||
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:41 in
|
||||
src/mat4.c:323:48: runtime error: signed integer overflow: 838860800 * 4 cannot be represented in type 'int'
|
||||
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:48 in
|
||||
```
|
||||
|
||||
Cast the offending `rows` and `cols` ints to `sf_count_t` (the type of
|
||||
`dataend` before performing the calculation, to avoid the issue.
|
||||
|
||||
CVE: CVE-2022-33065
|
||||
Fixes: https://github.com/libsndfile/libsndfile/issues/789
|
||||
Fixes: https://github.com/libsndfile/libsndfile/issues/833
|
||||
|
||||
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/libsndfile/libsndfile/commit/0754562e13d2e63a248a1c82f90b30bc0ffe307c]
|
||||
CVE: CVE-2022-33065
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
src/mat4.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/mat4.c b/src/mat4.c
|
||||
index 3c73680..e2f98b7 100644
|
||||
--- a/src/mat4.c
|
||||
+++ b/src/mat4.c
|
||||
@@ -320,7 +320,7 @@ mat4_read_header (SF_PRIVATE *psf)
|
||||
psf->filelength - psf->dataoffset, psf->sf.channels * psf->sf.frames * psf->bytewidth) ;
|
||||
}
|
||||
else if ((psf->filelength - psf->dataoffset) > psf->sf.channels * psf->sf.frames * psf->bytewidth)
|
||||
- psf->dataend = psf->dataoffset + rows * cols * psf->bytewidth ;
|
||||
+ psf->dataend = psf->dataoffset + (sf_count_t) rows * (sf_count_t) cols * psf->bytewidth ;
|
||||
|
||||
psf->datalength = psf->filelength - psf->dataoffset - psf->dataend ;
|
||||
|
||||
--
|
||||
2.40.1
|
||||
@@ -22,7 +22,8 @@ SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
|
||||
file://CVE-2019-3832.patch \
|
||||
file://CVE-2021-3246_1.patch \
|
||||
file://CVE-2021-3246_2.patch \
|
||||
"
|
||||
file://CVE-2022-33065.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"
|
||||
SRC_URI[sha256sum] = "1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9"
|
||||
|
||||
548
meta/recipes-multimedia/libtiff/files/CVE-2022-40090.patch
Normal file
548
meta/recipes-multimedia/libtiff/files/CVE-2022-40090.patch
Normal file
@@ -0,0 +1,548 @@
|
||||
From d385738335deb0c4bb70449f12e411f2203c0d01 Mon Sep 17 00:00:00 2001
|
||||
From: Su_Laus <sulau@freenet.de>
|
||||
Date: Fri, 2 Sep 2022 21:20:28 +0200
|
||||
Subject: [PATCH 1/4] Improved IFD-Loop Handling (fixes #455)
|
||||
|
||||
Basic approach:
|
||||
- The order in the entire chain must be checked, and not only whether an offset has already been read once.
|
||||
- To do this, pairs of directory number and offset are stored and checked.
|
||||
- The offset of a directory number can change.
|
||||
- TIFFAdvanceDirectory() must also perform an IFD loop check.
|
||||
- TIFFCheckDirOffset() is replaced by _TIFFCheckDirNumberAndOffset().
|
||||
|
||||
Rules for the check:
|
||||
- If an offset is already in the list, it must have the same IFD number. Otherwise it is an IDF loop.
|
||||
- If the offset is not in the list and the IFD number is greater than there are list entries, a new list entry is added.
|
||||
- Otherwise, the offset of the IFD number is updated.
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches/CVE-2022-40090.patch?h=ubuntu/focal-security
|
||||
Upstream commit
|
||||
https://gitlab.com/libtiff/libtiff/-/commit/c7caec9a4d8f24c17e667480d2c7d0d51c9fae41]
|
||||
CVE: CVE-2022-40090
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
libtiff/tif_close.c | 6 ++-
|
||||
libtiff/tif_dir.c | 91 +++++++++++++++++++++++++----------------
|
||||
libtiff/tif_dir.h | 1 +
|
||||
libtiff/tif_dirread.c | 94 ++++++++++++++++++++++++++++++-------------
|
||||
libtiff/tif_open.c | 3 +-
|
||||
libtiff/tiffiop.h | 3 +-
|
||||
6 files changed, 131 insertions(+), 67 deletions(-)
|
||||
|
||||
--- tiff-4.1.0+git191117.orig/libtiff/tif_close.c
|
||||
+++ tiff-4.1.0+git191117/libtiff/tif_close.c
|
||||
@@ -52,8 +52,10 @@ TIFFCleanup(TIFF* tif)
|
||||
(*tif->tif_cleanup)(tif);
|
||||
TIFFFreeDirectory(tif);
|
||||
|
||||
- if (tif->tif_dirlist)
|
||||
- _TIFFfree(tif->tif_dirlist);
|
||||
+ if (tif->tif_dirlistoff)
|
||||
+ _TIFFfree(tif->tif_dirlistoff);
|
||||
+ if (tif->tif_dirlistdirn)
|
||||
+ _TIFFfree(tif->tif_dirlistdirn);
|
||||
|
||||
/*
|
||||
* Clean up client info links.
|
||||
--- tiff-4.1.0+git191117.orig/libtiff/tif_dir.c
|
||||
+++ tiff-4.1.0+git191117/libtiff/tif_dir.c
|
||||
@@ -1463,12 +1463,22 @@ TIFFDefaultDirectory(TIFF* tif)
|
||||
}
|
||||
|
||||
static int
|
||||
-TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off)
|
||||
+TIFFAdvanceDirectory(TIFF* tif, uint64* nextdiroff, uint64* off, uint16* nextdirnum)
|
||||
{
|
||||
static const char module[] = "TIFFAdvanceDirectory";
|
||||
+
|
||||
+ /* Add this directory to the directory list, if not already in. */
|
||||
+ if (!_TIFFCheckDirNumberAndOffset(tif, *nextdirnum, *nextdiroff)) {
|
||||
+ TIFFErrorExt(tif->tif_clientdata, module, "Starting directory %hu at offset 0x%lx (%lu) might cause an IFD loop",
|
||||
+ *nextdirnum, *nextdiroff, *nextdiroff);
|
||||
+ *nextdiroff = 0;
|
||||
+ *nextdirnum = 0;
|
||||
+ return(0);
|
||||
+ }
|
||||
+
|
||||
if (isMapped(tif))
|
||||
{
|
||||
- uint64 poff=*nextdir;
|
||||
+ uint64 poff=*nextdiroff;
|
||||
if (!(tif->tif_flags&TIFF_BIGTIFF))
|
||||
{
|
||||
tmsize_t poffa,poffb,poffc,poffd;
|
||||
@@ -1479,7 +1489,7 @@ TIFFAdvanceDirectory(TIFF* tif, uint64*
|
||||
if (((uint64)poffa!=poff)||(poffb<poffa)||(poffb<(tmsize_t)sizeof(uint16))||(poffb>tif->tif_size))
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory count");
|
||||
- *nextdir=0;
|
||||
+ *nextdiroff=0;
|
||||
return(0);
|
||||
}
|
||||
_TIFFmemcpy(&dircount,tif->tif_base+poffa,sizeof(uint16));
|
||||
@@ -1497,7 +1507,7 @@ TIFFAdvanceDirectory(TIFF* tif, uint64*
|
||||
_TIFFmemcpy(&nextdir32,tif->tif_base+poffc,sizeof(uint32));
|
||||
if (tif->tif_flags&TIFF_SWAB)
|
||||
TIFFSwabLong(&nextdir32);
|
||||
- *nextdir=nextdir32;
|
||||
+ *nextdiroff=nextdir32;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1529,11 +1539,10 @@ TIFFAdvanceDirectory(TIFF* tif, uint64*
|
||||
}
|
||||
if (off!=NULL)
|
||||
*off=(uint64)poffc;
|
||||
- _TIFFmemcpy(nextdir,tif->tif_base+poffc,sizeof(uint64));
|
||||
+ _TIFFmemcpy(nextdiroff,tif->tif_base+poffc,sizeof(uint64));
|
||||
if (tif->tif_flags&TIFF_SWAB)
|
||||
- TIFFSwabLong8(nextdir);
|
||||
+ TIFFSwabLong8(nextdiroff);
|
||||
}
|
||||
- return(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1541,7 +1550,7 @@ TIFFAdvanceDirectory(TIFF* tif, uint64*
|
||||
{
|
||||
uint16 dircount;
|
||||
uint32 nextdir32;
|
||||
- if (!SeekOK(tif, *nextdir) ||
|
||||
+ if (!SeekOK(tif, *nextdiroff) ||
|
||||
!ReadOK(tif, &dircount, sizeof (uint16))) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count",
|
||||
tif->tif_name);
|
||||
@@ -1562,13 +1571,13 @@ TIFFAdvanceDirectory(TIFF* tif, uint64*
|
||||
}
|
||||
if (tif->tif_flags & TIFF_SWAB)
|
||||
TIFFSwabLong(&nextdir32);
|
||||
- *nextdir=nextdir32;
|
||||
+ *nextdiroff=nextdir32;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint64 dircount64;
|
||||
uint16 dircount16;
|
||||
- if (!SeekOK(tif, *nextdir) ||
|
||||
+ if (!SeekOK(tif, *nextdiroff) ||
|
||||
!ReadOK(tif, &dircount64, sizeof (uint64))) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count",
|
||||
tif->tif_name);
|
||||
@@ -1588,17 +1597,27 @@ TIFFAdvanceDirectory(TIFF* tif, uint64*
|
||||
else
|
||||
(void) TIFFSeekFile(tif,
|
||||
dircount16*20, SEEK_CUR);
|
||||
- if (!ReadOK(tif, nextdir, sizeof (uint64))) {
|
||||
+ if (!ReadOK(tif, nextdiroff, sizeof (uint64))) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"%s: Error fetching directory link",
|
||||
tif->tif_name);
|
||||
return (0);
|
||||
}
|
||||
if (tif->tif_flags & TIFF_SWAB)
|
||||
- TIFFSwabLong8(nextdir);
|
||||
+ TIFFSwabLong8(nextdiroff);
|
||||
}
|
||||
- return (1);
|
||||
}
|
||||
+ if (*nextdiroff != 0) {
|
||||
+ (*nextdirnum)++;
|
||||
+ /* Check next directory for IFD looping and if so, set it as last directory. */
|
||||
+ if (!_TIFFCheckDirNumberAndOffset(tif, *nextdirnum, *nextdiroff)) {
|
||||
+ TIFFWarningExt(tif->tif_clientdata, module, "the next directory %hu at offset 0x%lx (%lu) might be an IFD loop. Treating directory %hu as last directory",
|
||||
+ *nextdirnum, *nextdiroff, *nextdiroff, *nextdirnum-1);
|
||||
+ *nextdiroff = 0;
|
||||
+ (*nextdirnum)--;
|
||||
+ }
|
||||
+ }
|
||||
+ return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1608,14 +1627,16 @@ uint16
|
||||
TIFFNumberOfDirectories(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFNumberOfDirectories";
|
||||
- uint64 nextdir;
|
||||
+ uint64 nextdiroff;
|
||||
+ uint16 nextdirnum;
|
||||
uint16 n;
|
||||
if (!(tif->tif_flags&TIFF_BIGTIFF))
|
||||
- nextdir = tif->tif_header.classic.tiff_diroff;
|
||||
+ nextdiroff = tif->tif_header.classic.tiff_diroff;
|
||||
else
|
||||
- nextdir = tif->tif_header.big.tiff_diroff;
|
||||
+ nextdiroff = tif->tif_header.big.tiff_diroff;
|
||||
+ nextdirnum = 0;
|
||||
n = 0;
|
||||
- while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
|
||||
+ while (nextdiroff != 0 && TIFFAdvanceDirectory(tif, &nextdiroff, NULL, &nextdirnum))
|
||||
{
|
||||
if (n != 65535) {
|
||||
++n;
|
||||
@@ -1638,28 +1659,30 @@ TIFFNumberOfDirectories(TIFF* tif)
|
||||
int
|
||||
TIFFSetDirectory(TIFF* tif, uint16 dirn)
|
||||
{
|
||||
- uint64 nextdir;
|
||||
+ uint64 nextdiroff;
|
||||
+ uint16 nextdirnum;
|
||||
uint16 n;
|
||||
|
||||
if (!(tif->tif_flags&TIFF_BIGTIFF))
|
||||
- nextdir = tif->tif_header.classic.tiff_diroff;
|
||||
+ nextdiroff = tif->tif_header.classic.tiff_diroff;
|
||||
else
|
||||
- nextdir = tif->tif_header.big.tiff_diroff;
|
||||
- for (n = dirn; n > 0 && nextdir != 0; n--)
|
||||
- if (!TIFFAdvanceDirectory(tif, &nextdir, NULL))
|
||||
+ nextdiroff = tif->tif_header.big.tiff_diroff;
|
||||
+ nextdirnum = 0;
|
||||
+ for (n = dirn; n > 0 && nextdiroff != 0; n--)
|
||||
+ if (!TIFFAdvanceDirectory(tif, &nextdiroff, NULL, &nextdirnum))
|
||||
return (0);
|
||||
- tif->tif_nextdiroff = nextdir;
|
||||
+ /* If the n-th directory could not be reached (does not exist),
|
||||
+ * return here without touching anything further. */
|
||||
+ if (nextdiroff == 0 || n > 0)
|
||||
+ return (0);
|
||||
+
|
||||
+ tif->tif_nextdiroff = nextdiroff;
|
||||
/*
|
||||
* Set curdir to the actual directory index. The
|
||||
* -1 is because TIFFReadDirectory will increment
|
||||
* tif_curdir after successfully reading the directory.
|
||||
*/
|
||||
tif->tif_curdir = (dirn - n) - 1;
|
||||
- /*
|
||||
- * Reset tif_dirnumber counter and start new list of seen directories.
|
||||
- * We need this to prevent IFD loops.
|
||||
- */
|
||||
- tif->tif_dirnumber = 0;
|
||||
return (TIFFReadDirectory(tif));
|
||||
}
|
||||
|
||||
@@ -1672,13 +1695,42 @@ TIFFSetDirectory(TIFF* tif, uint16 dirn)
|
||||
int
|
||||
TIFFSetSubDirectory(TIFF* tif, uint64 diroff)
|
||||
{
|
||||
- tif->tif_nextdiroff = diroff;
|
||||
- /*
|
||||
- * Reset tif_dirnumber counter and start new list of seen directories.
|
||||
- * We need this to prevent IFD loops.
|
||||
+ /* Match nextdiroff and curdir for consistent IFD-loop checking.
|
||||
+ * Only with TIFFSetSubDirectory() the IFD list can be corrupted with invalid offsets
|
||||
+ * within the main IFD tree.
|
||||
+ * In the case of several subIFDs of a main image,
|
||||
+ * there are two possibilities that are not even mutually exclusive.
|
||||
+ * a.) The subIFD tag contains an array with all offsets of the subIFDs.
|
||||
+ * b.) The SubIFDs are concatenated with their NextIFD parameters.
|
||||
+ * (refer to https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf.)
|
||||
*/
|
||||
- tif->tif_dirnumber = 0;
|
||||
- return (TIFFReadDirectory(tif));
|
||||
+ int retval;
|
||||
+ uint16 curdir = 0;
|
||||
+ int8 probablySubIFD = 0;
|
||||
+ if (diroff == 0) {
|
||||
+ /* Special case to invalidate the tif_lastdiroff member. */
|
||||
+ tif->tif_curdir = 65535;
|
||||
+ } else {
|
||||
+ if (!_TIFFGetDirNumberFromOffset(tif, diroff, &curdir)) {
|
||||
+ /* Non-existing offsets might point to a SubIFD or invalid IFD.*/
|
||||
+ probablySubIFD = 1;
|
||||
+ }
|
||||
+ /* -1 because TIFFReadDirectory() will increment tif_curdir. */
|
||||
+ tif->tif_curdir = curdir - 1;
|
||||
+ }
|
||||
+
|
||||
+ tif->tif_nextdiroff = diroff;
|
||||
+ retval = TIFFReadDirectory(tif);
|
||||
+ /* If failed, curdir was not incremented in TIFFReadDirectory(), so set it back. */
|
||||
+ if (!retval )tif->tif_curdir++;
|
||||
+ if (retval && probablySubIFD) {
|
||||
+ /* Reset IFD list to start new one for SubIFD chain and also start SubIFD chain with tif_curdir=0. */
|
||||
+ tif->tif_dirnumber = 0;
|
||||
+ tif->tif_curdir = 0; /* first directory of new chain */
|
||||
+ /* add this offset to new IFD list */
|
||||
+ _TIFFCheckDirNumberAndOffset(tif, tif->tif_curdir, diroff);
|
||||
+ }
|
||||
+ return (retval);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1702,12 +1754,15 @@ TIFFLastDirectory(TIFF* tif)
|
||||
|
||||
/*
|
||||
* Unlink the specified directory from the directory chain.
|
||||
+ * Note: First directory starts with number dirn=1.
|
||||
+ * This is different to TIFFSetDirectory() where the first directory starts with zero.
|
||||
*/
|
||||
int
|
||||
TIFFUnlinkDirectory(TIFF* tif, uint16 dirn)
|
||||
{
|
||||
static const char module[] = "TIFFUnlinkDirectory";
|
||||
uint64 nextdir;
|
||||
+ uint16 nextdirnum;
|
||||
uint64 off;
|
||||
uint16 n;
|
||||
|
||||
@@ -1731,19 +1786,21 @@ TIFFUnlinkDirectory(TIFF* tif, uint16 di
|
||||
nextdir = tif->tif_header.big.tiff_diroff;
|
||||
off = 8;
|
||||
}
|
||||
+ nextdirnum = 0; /* First directory is dirn=0 */
|
||||
+
|
||||
for (n = dirn-1; n > 0; n--) {
|
||||
if (nextdir == 0) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Directory %d does not exist", dirn);
|
||||
return (0);
|
||||
}
|
||||
- if (!TIFFAdvanceDirectory(tif, &nextdir, &off))
|
||||
+ if (!TIFFAdvanceDirectory(tif, &nextdir, &off, &nextdirnum))
|
||||
return (0);
|
||||
}
|
||||
/*
|
||||
* Advance to the directory to be unlinked and fetch
|
||||
* the offset of the directory that follows.
|
||||
*/
|
||||
- if (!TIFFAdvanceDirectory(tif, &nextdir, NULL))
|
||||
+ if (!TIFFAdvanceDirectory(tif, &nextdir, NULL, &nextdirnum))
|
||||
return (0);
|
||||
/*
|
||||
* Go back and patch the link field of the preceding
|
||||
--- tiff-4.1.0+git191117.orig/libtiff/tif_dir.h
|
||||
+++ tiff-4.1.0+git191117/libtiff/tif_dir.h
|
||||
@@ -300,6 +300,8 @@ extern int _TIFFMergeFields(TIFF*, const
|
||||
extern const TIFFField* _TIFFFindOrRegisterField(TIFF *, uint32, TIFFDataType);
|
||||
extern TIFFField* _TIFFCreateAnonField(TIFF *, uint32, TIFFDataType);
|
||||
extern int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag);
|
||||
+extern int _TIFFCheckDirNumberAndOffset(TIFF *tif, uint16 dirn, uint64 diroff);
|
||||
+extern int _TIFFGetDirNumberFromOffset(TIFF *tif, uint64 diroff, uint16 *dirn);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
--- tiff-4.1.0+git191117.orig/libtiff/tif_dirread.c
|
||||
+++ tiff-4.1.0+git191117/libtiff/tif_dirread.c
|
||||
@@ -158,7 +158,6 @@ static void TIFFReadDirectoryFindFieldIn
|
||||
|
||||
static int EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount);
|
||||
static void MissingRequired(TIFF*, const char*);
|
||||
-static int TIFFCheckDirOffset(TIFF* tif, uint64 diroff);
|
||||
static int CheckDirCount(TIFF*, TIFFDirEntry*, uint32);
|
||||
static uint16 TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, uint64* nextdiroff);
|
||||
static int TIFFFetchNormalTag(TIFF*, TIFFDirEntry*, int recover);
|
||||
@@ -3584,12 +3583,19 @@ TIFFReadDirectory(TIFF* tif)
|
||||
int bitspersample_read = FALSE;
|
||||
int color_channels;
|
||||
|
||||
- tif->tif_diroff=tif->tif_nextdiroff;
|
||||
- if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff))
|
||||
- return 0; /* last offset or bad offset (IFD looping) */
|
||||
- (*tif->tif_cleanup)(tif); /* cleanup any previous compression state */
|
||||
- tif->tif_curdir++;
|
||||
- nextdiroff = tif->tif_nextdiroff;
|
||||
+ if (tif->tif_nextdiroff == 0) {
|
||||
+ /* In this special case, tif_diroff needs also to be set to 0. */
|
||||
+ tif->tif_diroff = tif->tif_nextdiroff;
|
||||
+ return 0; /* last offset, thus no checking necessary */
|
||||
+ }
|
||||
+
|
||||
+ nextdiroff = tif->tif_nextdiroff;
|
||||
+ /* tif_curdir++ and tif_nextdiroff should only be updated after SUCCESSFUL reading of the directory. Otherwise, invalid IFD offsets could corrupt the IFD list. */
|
||||
+ if (!_TIFFCheckDirNumberAndOffset(tif, tif->tif_curdir + 1, nextdiroff)) {
|
||||
+ TIFFWarningExt(tif->tif_clientdata, module,
|
||||
+ "Didn't read next directory due to IFD looping at offset 0x%lx (%lu) to offset 0x%lx (%lu)", tif->tif_diroff, tif->tif_diroff, nextdiroff, nextdiroff);
|
||||
+ return 0; /* bad offset (IFD looping) */
|
||||
+ }
|
||||
dircount=TIFFFetchDirectory(tif,nextdiroff,&dir,&tif->tif_nextdiroff);
|
||||
if (!dircount)
|
||||
{
|
||||
@@ -3597,6 +3603,11 @@ TIFFReadDirectory(TIFF* tif)
|
||||
"Failed to read directory at offset " TIFF_UINT64_FORMAT,nextdiroff);
|
||||
return 0;
|
||||
}
|
||||
+ /* Set global values after a valid directory has been fetched.
|
||||
+ * tif_diroff is already set to nextdiroff in TIFFFetchDirectory() in the beginning. */
|
||||
+ tif->tif_curdir++;
|
||||
+ (*tif->tif_cleanup)(tif); /* cleanup any previous compression state */
|
||||
+
|
||||
TIFFReadDirectoryCheckOrder(tif,dir,dircount);
|
||||
|
||||
/*
|
||||
@@ -4628,13 +4639,17 @@ MissingRequired(TIFF* tif, const char* t
|
||||
}
|
||||
|
||||
/*
|
||||
- * Check the directory offset against the list of already seen directory
|
||||
- * offsets. This is a trick to prevent IFD looping. The one can create TIFF
|
||||
- * file with looped directory pointers. We will maintain a list of already
|
||||
- * seen directories and check every IFD offset against that list.
|
||||
+ * Check the directory number and offset against the list of already seen
|
||||
+ * directory numbers and offsets. This is a trick to prevent IFD looping.
|
||||
+ * The one can create TIFF file with looped directory pointers. We will
|
||||
+ * maintain a list of already seen directories and check every IFD offset
|
||||
+ * and its IFD number against that list. However, the offset of an IFD number
|
||||
+ * can change - e.g. when writing updates to file.
|
||||
+ * Returns 1 if all is ok; 0 if last directory or IFD loop is encountered,
|
||||
+ * or an error has occured.
|
||||
*/
|
||||
-static int
|
||||
-TIFFCheckDirOffset(TIFF* tif, uint64 diroff)
|
||||
+int
|
||||
+_TIFFCheckDirNumberAndOffset(TIFF* tif, uint16 dirn, uint64 diroff)
|
||||
{
|
||||
uint16 n;
|
||||
|
||||
@@ -4646,35 +4661,64 @@ TIFFCheckDirOffset(TIFF* tif, uint64 dir
|
||||
return 0;
|
||||
}
|
||||
|
||||
- for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlist; n++) {
|
||||
- if (tif->tif_dirlist[n] == diroff)
|
||||
- return 0;
|
||||
+ /* Check if offset is already in the list:
|
||||
+ * - yes: check, if offset is at the same IFD number - if not, it is an IFD loop
|
||||
+ * - no: add to list or update offset at that IFD number
|
||||
+ */
|
||||
+ for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlistdirn && tif->tif_dirlistoff; n++) {
|
||||
+ if (tif->tif_dirlistoff[n] == diroff) {
|
||||
+ if (tif->tif_dirlistdirn[n] == dirn) {
|
||||
+ return 1;
|
||||
+ } else {
|
||||
+ TIFFWarningExt(tif->tif_clientdata, "_TIFFCheckDirNumberAndOffset",
|
||||
+ "TIFF directory %hu has IFD looping to directory %hu at offset 0x%lx (%lu)",
|
||||
+ dirn-1, tif->tif_dirlistdirn[n], diroff, diroff);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ /* Check if offset of an IFD has been changed and update offset of that IFD number. */
|
||||
+ if (dirn < tif->tif_dirnumber && tif->tif_dirlistdirn && tif->tif_dirlistoff) {
|
||||
+ /* tif_dirlistdirn can have IFD numbers dirn in random order */
|
||||
+ for (n = 0; n < tif->tif_dirnumber; n++) {
|
||||
+ if (tif->tif_dirlistdirn[n] == dirn) {
|
||||
+ tif->tif_dirlistoff[n] = diroff;
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
+ /* Add IFD offset and dirn to IFD directory list */
|
||||
tif->tif_dirnumber++;
|
||||
|
||||
- if (tif->tif_dirlist == NULL || tif->tif_dirnumber > tif->tif_dirlistsize) {
|
||||
- uint64* new_dirlist;
|
||||
-
|
||||
+ if (tif->tif_dirlistoff == NULL || tif->tif_dirlistdirn == NULL || tif->tif_dirnumber > tif->tif_dirlistsize) {
|
||||
+ uint64 *new_dirlist;
|
||||
/*
|
||||
* XXX: Reduce memory allocation granularity of the dirlist
|
||||
* array.
|
||||
*/
|
||||
- new_dirlist = (uint64*)_TIFFCheckRealloc(tif, tif->tif_dirlist,
|
||||
- tif->tif_dirnumber, 2 * sizeof(uint64), "for IFD list");
|
||||
+ if (tif->tif_dirnumber >= 32768)
|
||||
+ tif->tif_dirlistsize = 65535;
|
||||
+ else
|
||||
+ tif->tif_dirlistsize = 2 * tif->tif_dirnumber;
|
||||
+
|
||||
+ new_dirlist = (uint64 *)_TIFFCheckRealloc(tif, tif->tif_dirlistoff,
|
||||
+ tif->tif_dirlistsize, sizeof(uint64), "for IFD offset list");
|
||||
if (!new_dirlist)
|
||||
return 0;
|
||||
- if( tif->tif_dirnumber >= 32768 )
|
||||
- tif->tif_dirlistsize = 65535;
|
||||
- else
|
||||
- tif->tif_dirlistsize = 2 * tif->tif_dirnumber;
|
||||
- tif->tif_dirlist = new_dirlist;
|
||||
+ tif->tif_dirlistoff = new_dirlist;
|
||||
+ new_dirlist = (uint64 *)_TIFFCheckRealloc(tif, tif->tif_dirlistdirn,
|
||||
+ tif->tif_dirlistsize, sizeof(uint16), "for IFD dirnumber list");
|
||||
+ if (!new_dirlist)
|
||||
+ return 0;
|
||||
+ tif->tif_dirlistdirn = (uint16 *)new_dirlist;
|
||||
}
|
||||
|
||||
- tif->tif_dirlist[tif->tif_dirnumber - 1] = diroff;
|
||||
+ tif->tif_dirlistoff[tif->tif_dirnumber - 1] = diroff;
|
||||
+ tif->tif_dirlistdirn[tif->tif_dirnumber - 1] = dirn;
|
||||
|
||||
return 1;
|
||||
-}
|
||||
+} /* --- _TIFFCheckDirNumberAndOffset() ---*/
|
||||
|
||||
/*
|
||||
* Check the count field of a directory entry against a known value. The
|
||||
@@ -4703,6 +4747,47 @@ CheckDirCount(TIFF* tif, TIFFDirEntry* d
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Retrieve the matching IFD directory number of a given IFD offset
|
||||
+ * from the list of directories already seen.
|
||||
+ * Returns 1 if the offset was in the list and the directory number
|
||||
+ * can be returned.
|
||||
+ * Otherwise returns 0 or if an error occured.
|
||||
+ */
|
||||
+int
|
||||
+_TIFFGetDirNumberFromOffset(TIFF *tif, uint64 diroff, uint16* dirn)
|
||||
+{
|
||||
+ uint16 n;
|
||||
+
|
||||
+ if (diroff == 0) /* no more directories */
|
||||
+ return 0;
|
||||
+ if (tif->tif_dirnumber == 65535) {
|
||||
+ TIFFErrorExt(tif->tif_clientdata, "_TIFFGetDirNumberFromOffset",
|
||||
+ "Cannot handle more than 65535 TIFF directories");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Check if offset is already in the list and return matching directory number.
|
||||
+ * Otherwise update IFD list using TIFFNumberOfDirectories()
|
||||
+ * and search again in IFD list.
|
||||
+ */
|
||||
+ for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlistoff && tif->tif_dirlistdirn; n++) {
|
||||
+ if (tif->tif_dirlistoff[n] == diroff) {
|
||||
+ *dirn = tif->tif_dirlistdirn[n];
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
+ TIFFNumberOfDirectories(tif);
|
||||
+ for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlistoff && tif->tif_dirlistdirn; n++) {
|
||||
+ if (tif->tif_dirlistoff[n] == diroff) {
|
||||
+ *dirn = tif->tif_dirlistdirn[n];
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+} /*--- _TIFFGetDirNumberFromOffset() ---*/
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* Read IFD structure from the specified offset. If the pointer to
|
||||
* nextdiroff variable has been specified, read it too. Function returns a
|
||||
* number of fields in the directory or 0 if failed.
|
||||
--- tiff-4.1.0+git191117.orig/libtiff/tif_open.c
|
||||
+++ tiff-4.1.0+git191117/libtiff/tif_open.c
|
||||
@@ -353,7 +353,8 @@ TIFFClientOpen(
|
||||
if (!TIFFDefaultDirectory(tif))
|
||||
goto bad;
|
||||
tif->tif_diroff = 0;
|
||||
- tif->tif_dirlist = NULL;
|
||||
+ tif->tif_dirlistoff = NULL;
|
||||
+ tif->tif_dirlistdirn = NULL;
|
||||
tif->tif_dirlistsize = 0;
|
||||
tif->tif_dirnumber = 0;
|
||||
return (tif);
|
||||
--- tiff-4.1.0+git191117.orig/libtiff/tiffiop.h
|
||||
+++ tiff-4.1.0+git191117/libtiff/tiffiop.h
|
||||
@@ -145,7 +145,8 @@ struct tiff {
|
||||
#define TIFF_CHOPPEDUPARRAYS 0x4000000U /* set when allocChoppedUpStripArrays() has modified strip array */
|
||||
uint64 tif_diroff; /* file offset of current directory */
|
||||
uint64 tif_nextdiroff; /* file offset of following directory */
|
||||
- uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */
|
||||
+ uint64* tif_dirlistoff; /* list of offsets to already seen directories to prevent IFD looping */
|
||||
+ uint16* tif_dirlistdirn; /* list of directory numbers to already seen directories to prevent IFD looping */
|
||||
uint16 tif_dirlistsize; /* number of entries in offset list */
|
||||
uint16 tif_dirnumber; /* number of already seen directories */
|
||||
TIFFDirectory tif_dir; /* internal rep of current directory */
|
||||
@@ -4,8 +4,9 @@ Date: Tue, 7 Mar 2023 15:02:08 +0800
|
||||
Subject: [PATCH] Fix memory leak in tiffcrop.c
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/881a070194783561fd209b7c789a4e75566f7f37]
|
||||
CVE: CVE-2023-3618
|
||||
CVE: CVE-2023-3576
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
tools/tiffcrop.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
34
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
Normal file
34
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From 4fc16f649fa2875d5c388cf2edc295510a247ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Arie Haenel <arie.haenel@jct.ac.il>
|
||||
Date: Wed, 19 Jul 2023 19:34:25 +0000
|
||||
Subject: [PATCH] tiffcp: fix memory corruption (overflow) on hostile images
|
||||
(fixes #591)
|
||||
|
||||
Upstream-Status: Backport from [https://gitlab.com/libtiff/libtiff/-/commit/4fc16f649fa2875d5c388cf2edc295510a247ee5]
|
||||
CVE: CVE-2023-40745
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
tools/tiffcp.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
|
||||
index 83b3910..007bd05 100644
|
||||
--- a/tools/tiffcp.c
|
||||
+++ b/tools/tiffcp.c
|
||||
@@ -1437,6 +1437,13 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
|
||||
TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)");
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+ if ( (imagew - tilew * spp) > INT_MAX ){
|
||||
+ TIFFError(TIFFFileName(in),
|
||||
+ "Error, image raster scan line size is too large");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
iskew = imagew - tilew*spp;
|
||||
tilebuf = _TIFFmalloc(tilesize);
|
||||
if (tilebuf == 0)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
67
meta/recipes-multimedia/libtiff/files/CVE-2023-41175.patch
Normal file
67
meta/recipes-multimedia/libtiff/files/CVE-2023-41175.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
From 4cc97e3dfa6559f4d17af0d0687bcae07ca4b73d Mon Sep 17 00:00:00 2001
|
||||
From: Arie Haenel <arie.haenel@jct.ac.il>
|
||||
Date: Wed, 19 Jul 2023 19:40:01 +0000
|
||||
Subject: raw2tiff: fix integer overflow and bypass of the check (fixes #592)
|
||||
|
||||
Upstream-Status: Backport [import from debian security.debian.org/debian-security/pool/updates/main/t/tiff/tiff_4.1.0+git191117-2~deb10u8.debian.tar.xz
|
||||
Upstream commit https://gitlab.com/libtiff/libtiff/-/commit/6e2dac5f904496d127c92ddc4e56eccfca25c2ee]
|
||||
CVE: CVE-2023-41175
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
tools/raw2tiff.c | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/tools/raw2tiff.c b/tools/raw2tiff.c
|
||||
index ab36ff4e..a905da52 100644
|
||||
--- a/tools/raw2tiff.c
|
||||
+++ b/tools/raw2tiff.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
@@ -101,6 +102,7 @@ main(int argc, char* argv[])
|
||||
int fd;
|
||||
char *outfilename = NULL;
|
||||
TIFF *out;
|
||||
+ uint32 temp_limit_check = 0;
|
||||
|
||||
uint32 row, col, band;
|
||||
int c;
|
||||
@@ -212,6 +214,30 @@ main(int argc, char* argv[])
|
||||
if (guessSize(fd, dtype, hdr_size, nbands, swab, &width, &length) < 0)
|
||||
return 1;
|
||||
|
||||
+ if ((width == 0) || (length == 0) ){
|
||||
+ fprintf(stderr, "Too large nbands value specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ temp_limit_check = nbands * depth;
|
||||
+
|
||||
+ if ( !temp_limit_check || length > ( UINT_MAX / temp_limit_check ) ) {
|
||||
+ fprintf(stderr, "Too large length size specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+ temp_limit_check = temp_limit_check * length;
|
||||
+
|
||||
+ if ( !temp_limit_check || width > ( UINT_MAX / temp_limit_check ) ) {
|
||||
+ fprintf(stderr, "Too large width size specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+ temp_limit_check = temp_limit_check * width;
|
||||
+
|
||||
+ if ( !temp_limit_check || hdr_size > ( UINT_MAX - temp_limit_check ) ) {
|
||||
+ fprintf(stderr, "Too large header size specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
if (outfilename == NULL)
|
||||
outfilename = argv[optind+1];
|
||||
out = TIFFOpen(outfilename, "w");
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -43,8 +43,11 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
|
||||
file://CVE-2023-26966.patch \
|
||||
file://CVE-2023-2908.patch \
|
||||
file://CVE-2023-3316.patch \
|
||||
file://CVE-2023-3618-1.patch \
|
||||
file://CVE-2023-3618-2.patch \
|
||||
file://CVE-2023-3576.patch \
|
||||
file://CVE-2023-3618.patch \
|
||||
file://CVE-2023-40745.patch \
|
||||
file://CVE-2023-41175.patch \
|
||||
file://CVE-2022-40090.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424"
|
||||
SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 12b11893edf6c201710ebeee7c84743a8573fad6 Mon Sep 17 00:00:00 2001
|
||||
From 902bc9190331343b2017211debcec8d2ab87e17a Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Rabaud <vrabaud@google.com>
|
||||
Date: Thu, 7 Sep 2023 21:16:03 +0200
|
||||
Subject: [PATCH 1/1] Fix OOB write in BuildHuffmanTable.
|
||||
Subject: [PATCH 1/2] Fix OOB write in BuildHuffmanTable.
|
||||
|
||||
First, BuildHuffmanTable is called to check if the data is valid.
|
||||
If it is and the table is not big enough, more memory is allocated.
|
||||
@@ -12,16 +12,11 @@ codes) streams are still decodable.
|
||||
Bug: chromium:1479274
|
||||
Change-Id: I31c36dbf3aa78d35ecf38706b50464fd3d375741
|
||||
|
||||
Notice that it references different CVE id:
|
||||
https://nvd.nist.gov/vuln/detail/CVE-2023-5129
|
||||
which was marked as a rejected duplicate of:
|
||||
https://nvd.nist.gov/vuln/detail/CVE-2023-4863
|
||||
but it's the same issue. Hence update CVE ID CVE-2023-4863
|
||||
CVE: CVE-2023-4863
|
||||
|
||||
CVE: CVE-2023-5129 CVE-2023-4863
|
||||
Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/2af26267cdfcb63a88e5c74a85927a12d6ca1d76]
|
||||
Signed-off-by: Colin McAllister <colinmca242@gmail.com>
|
||||
Signed-off-by: Pawan Badganchi <Pawan.Badganchi@kpit.com>
|
||||
Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/902bc9190331343b2017211debcec8d2ab87e17a]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/dec/vp8l_dec.c | 46 ++++++++++---------
|
||||
src/dec/vp8li_dec.h | 2 +-
|
||||
@@ -30,7 +25,7 @@ Signed-off-by: Pawan Badganchi <Pawan.Badganchi@kpit.com>
|
||||
4 files changed, 129 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/src/dec/vp8l_dec.c b/src/dec/vp8l_dec.c
|
||||
index 93615d4e..0d38314d 100644
|
||||
index 93615d4..0d38314 100644
|
||||
--- a/src/dec/vp8l_dec.c
|
||||
+++ b/src/dec/vp8l_dec.c
|
||||
@@ -253,11 +253,11 @@ static int ReadHuffmanCodeLengths(
|
||||
@@ -178,7 +173,7 @@ index 93615d4e..0d38314d 100644
|
||||
assert(dec->hdr_.num_htree_groups_ > 0);
|
||||
|
||||
diff --git a/src/dec/vp8li_dec.h b/src/dec/vp8li_dec.h
|
||||
index 72b2e861..32540a4b 100644
|
||||
index 72b2e86..32540a4 100644
|
||||
--- a/src/dec/vp8li_dec.h
|
||||
+++ b/src/dec/vp8li_dec.h
|
||||
@@ -51,7 +51,7 @@ typedef struct {
|
||||
@@ -191,7 +186,7 @@ index 72b2e861..32540a4b 100644
|
||||
|
||||
typedef struct VP8LDecoder VP8LDecoder;
|
||||
diff --git a/src/utils/huffman_utils.c b/src/utils/huffman_utils.c
|
||||
index 0cba0fbb..9efd6283 100644
|
||||
index 0cba0fb..9efd628 100644
|
||||
--- a/src/utils/huffman_utils.c
|
||||
+++ b/src/utils/huffman_utils.c
|
||||
@@ -177,21 +177,24 @@ static int BuildHuffmanTable(HuffmanCode* const root_table, int root_bits,
|
||||
@@ -322,7 +317,7 @@ index 0cba0fbb..9efd6283 100644
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/utils/huffman_utils.h b/src/utils/huffman_utils.h
|
||||
index 13b7ad1a..98415c53 100644
|
||||
index 13b7ad1..98415c5 100644
|
||||
--- a/src/utils/huffman_utils.h
|
||||
+++ b/src/utils/huffman_utils.h
|
||||
@@ -43,6 +43,29 @@ typedef struct {
|
||||
@@ -367,5 +362,5 @@ index 13b7ad1a..98415c53 100644
|
||||
|
||||
#ifdef __cplusplus
|
||||
--
|
||||
2.34.1
|
||||
2.40.0
|
||||
|
||||
53
meta/recipes-multimedia/webp/files/CVE-2023-4863-0002.patch
Normal file
53
meta/recipes-multimedia/webp/files/CVE-2023-4863-0002.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From 95ea5226c870449522240ccff26f0b006037c520 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Rabaud <vrabaud@google.com>
|
||||
Date: Mon, 11 Sep 2023 16:06:08 +0200
|
||||
Subject: [PATCH 2/2] Fix invalid incremental decoding check.
|
||||
|
||||
The first condition is only necessary if we have not read enough
|
||||
(enough being defined by src_last, not src_end which is the end
|
||||
of the image).
|
||||
The second condition now fits the comment below: "if not
|
||||
incremental, and we are past the end of buffer".
|
||||
|
||||
BUG=oss-fuzz:62136
|
||||
|
||||
Change-Id: I0700f67c62db8e1c02c2e429a069a71e606a5e4f
|
||||
|
||||
CVE: CVE-2023-4863
|
||||
|
||||
Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/95ea5226c870449522240ccff26f0b006037c520]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/dec/vp8l_dec.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/dec/vp8l_dec.c b/src/dec/vp8l_dec.c
|
||||
index 0d38314..684a5b6 100644
|
||||
--- a/src/dec/vp8l_dec.c
|
||||
+++ b/src/dec/vp8l_dec.c
|
||||
@@ -1237,9 +1237,20 @@ static int DecodeImageData(VP8LDecoder* const dec, uint32_t* const data,
|
||||
}
|
||||
|
||||
br->eos_ = VP8LIsEndOfStream(br);
|
||||
- if (dec->incremental_ && br->eos_ && src < src_end) {
|
||||
+ // In incremental decoding:
|
||||
+ // br->eos_ && src < src_last: if 'br' reached the end of the buffer and
|
||||
+ // 'src_last' has not been reached yet, there is not enough data. 'dec' has to
|
||||
+ // be reset until there is more data.
|
||||
+ // !br->eos_ && src < src_last: this cannot happen as either the buffer is
|
||||
+ // fully read, either enough has been read to reach 'src_last'.
|
||||
+ // src >= src_last: 'src_last' is reached, all is fine. 'src' can actually go
|
||||
+ // beyond 'src_last' in case the image is cropped and an LZ77 goes further.
|
||||
+ // The buffer might have been enough or there is some left. 'br->eos_' does
|
||||
+ // not matter.
|
||||
+ assert(!dec->incremental_ || (br->eos_ && src < src_last) || src >= src_last);
|
||||
+ if (dec->incremental_ && br->eos_ && src < src_last) {
|
||||
RestoreState(dec);
|
||||
- } else if (!br->eos_) {
|
||||
+ } else if ((dec->incremental_ && src >= src_last) || !br->eos_) {
|
||||
// Process the remaining rows corresponding to last row-block.
|
||||
if (process_func != NULL) {
|
||||
process_func(dec, row > last_row ? last_row : row);
|
||||
--
|
||||
2.40.0
|
||||
@@ -21,7 +21,8 @@ UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
|
||||
|
||||
SRC_URI += " \
|
||||
file://CVE-2023-1999.patch \
|
||||
file://CVE-2023-5129.patch \
|
||||
file://CVE-2023-4863-0001.patch \
|
||||
file://CVE-2023-4863-0002.patch \
|
||||
"
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
|
||||
272
meta/recipes-support/curl/curl/CVE-2023-28321.patch
Normal file
272
meta/recipes-support/curl/curl/CVE-2023-28321.patch
Normal file
@@ -0,0 +1,272 @@
|
||||
Upstream-Status: Backport [import from ubuntu curl_7.68.0-1ubuntu2.20 with
|
||||
minor change to tests/data/test1397 part so the patch can be apply.
|
||||
upstream: https://github.com/curl/curl/commit/199f2d440d8659b42 ]
|
||||
CVE: CVE-2023-28321
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
|
||||
This backport was obtained from SUSE.
|
||||
|
||||
From 199f2d440d8659b42670c1b796220792b01a97bf Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Mon, 24 Apr 2023 21:07:02 +0200
|
||||
Subject: [PATCH] hostcheck: fix host name wildcard checking
|
||||
|
||||
The leftmost "label" of the host name can now only match against single
|
||||
'*'. Like the browsers have worked for a long time.
|
||||
|
||||
- extended unit test 1397 for this
|
||||
- move some SOURCE variables from unit/Makefile.am to unit/Makefile.inc
|
||||
|
||||
Reported-by: Hiroki Kurosawa
|
||||
Closes #11018
|
||||
---
|
||||
lib/hostcheck.c | 50 +++++++--------
|
||||
tests/data/test1397 | 10 ++-
|
||||
tests/unit/Makefile.am | 94 ----------------------------
|
||||
tests/unit/Makefile.inc | 94 ++++++++++++++++++++++++++++
|
||||
tests/unit/unit1397.c | 134 ++++++++++++++++++++++++----------------
|
||||
5 files changed, 202 insertions(+), 180 deletions(-)
|
||||
|
||||
--- a/lib/hostcheck.c
|
||||
+++ b/lib/hostcheck.c
|
||||
@@ -58,15 +58,19 @@
|
||||
* apparent distinction between a name and an IP. We need to detect the use of
|
||||
* an IP address and not wildcard match on such names.
|
||||
*
|
||||
+ * Only match on "*" being used for the leftmost label, not "a*", "a*b" nor
|
||||
+ * "*b".
|
||||
+ *
|
||||
+ * @unittest: 1397
|
||||
+ *
|
||||
* NOTE: hostmatch() gets called with copied buffers so that it can modify the
|
||||
* contents at will.
|
||||
*/
|
||||
|
||||
static int hostmatch(char *hostname, char *pattern)
|
||||
{
|
||||
- const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
|
||||
- int wildcard_enabled;
|
||||
- size_t prefixlen, suffixlen;
|
||||
+ const char *pattern_label_end, *hostname_label_end;
|
||||
+ size_t suffixlen;
|
||||
struct in_addr ignored;
|
||||
#ifdef ENABLE_IPV6
|
||||
struct sockaddr_in6 si6;
|
||||
@@ -80,13 +84,12 @@ static int hostmatch(char *hostname, cha
|
||||
if(pattern[len-1]=='.')
|
||||
pattern[len-1] = 0;
|
||||
|
||||
- pattern_wildcard = strchr(pattern, '*');
|
||||
- if(pattern_wildcard == NULL)
|
||||
+ if(strncmp(pattern, "*.", 2))
|
||||
return strcasecompare(pattern, hostname) ?
|
||||
CURL_HOST_MATCH : CURL_HOST_NOMATCH;
|
||||
|
||||
/* detect IP address as hostname and fail the match if so */
|
||||
- if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0)
|
||||
+ else if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0)
|
||||
return CURL_HOST_NOMATCH;
|
||||
#ifdef ENABLE_IPV6
|
||||
if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0)
|
||||
@@ -95,14 +98,9 @@ static int hostmatch(char *hostname, cha
|
||||
|
||||
/* We require at least 2 dots in pattern to avoid too wide wildcard
|
||||
match. */
|
||||
- wildcard_enabled = 1;
|
||||
pattern_label_end = strchr(pattern, '.');
|
||||
- if(pattern_label_end == NULL || strchr(pattern_label_end + 1, '.') == NULL ||
|
||||
- pattern_wildcard > pattern_label_end ||
|
||||
- strncasecompare(pattern, "xn--", 4)) {
|
||||
- wildcard_enabled = 0;
|
||||
- }
|
||||
- if(!wildcard_enabled)
|
||||
+ if(pattern_label_end == NULL ||
|
||||
+ strchr(pattern_label_end + 1, '.') == NULL)
|
||||
return strcasecompare(pattern, hostname) ?
|
||||
CURL_HOST_MATCH : CURL_HOST_NOMATCH;
|
||||
|
||||
@@ -117,11 +115,9 @@ static int hostmatch(char *hostname, cha
|
||||
if(hostname_label_end - hostname < pattern_label_end - pattern)
|
||||
return CURL_HOST_NOMATCH;
|
||||
|
||||
- prefixlen = pattern_wildcard - pattern;
|
||||
- suffixlen = pattern_label_end - (pattern_wildcard + 1);
|
||||
- return strncasecompare(pattern, hostname, prefixlen) &&
|
||||
- strncasecompare(pattern_wildcard + 1, hostname_label_end - suffixlen,
|
||||
- suffixlen) ?
|
||||
+ suffixlen = pattern_label_end - (pattern + 1);
|
||||
+ return strncasecompare(pattern + 1, hostname_label_end - suffixlen,
|
||||
+ suffixlen) ?
|
||||
CURL_HOST_MATCH : CURL_HOST_NOMATCH;
|
||||
}
|
||||
|
||||
--- a/tests/data/test1397
|
||||
+++ b/tests/data/test1397
|
||||
@@ -2,8 +2,7 @@
|
||||
<info>
|
||||
<keywords>
|
||||
unittest
|
||||
-ssl
|
||||
-wildcard
|
||||
+Curl_cert_hostcheck
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
@@ -16,9 +15,8 @@ none
|
||||
<features>
|
||||
unittest
|
||||
</features>
|
||||
- <name>
|
||||
-Check wildcard certificate matching function Curl_cert_hostcheck
|
||||
- </name>
|
||||
+<name>
|
||||
+Curl_cert_hostcheck unit tests
|
||||
+</name>
|
||||
</client>
|
||||
-
|
||||
</testcase>
|
||||
--- a/tests/unit/unit1397.c
|
||||
+++ b/tests/unit/unit1397.c
|
||||
@@ -21,8 +21,6 @@
|
||||
***************************************************************************/
|
||||
#include "curlcheck.h"
|
||||
|
||||
-#include "hostcheck.h" /* from the lib dir */
|
||||
-
|
||||
static CURLcode unit_setup(void)
|
||||
{
|
||||
return CURLE_OK;
|
||||
@@ -30,50 +28,94 @@ static CURLcode unit_setup(void)
|
||||
|
||||
static void unit_stop(void)
|
||||
{
|
||||
- /* done before shutting down and exiting */
|
||||
}
|
||||
|
||||
-UNITTEST_START
|
||||
+* only these backends define the tested functions */
|
||||
+#if defined(USE_OPENSSL) || defined(USE_GSKIT) || \
|
||||
+ defined(USE_SCHANNEL)
|
||||
+#include "hostcheck.h"
|
||||
+struct testcase {
|
||||
+ const char *host;
|
||||
+ const char *pattern;
|
||||
+ bool match;
|
||||
+};
|
||||
+
|
||||
+static struct testcase tests[] = {
|
||||
+ {"", "", FALSE},
|
||||
+ {"a", "", FALSE},
|
||||
+ {"", "b", FALSE},
|
||||
+ {"a", "b", FALSE},
|
||||
+ {"aa", "bb", FALSE},
|
||||
+ {"\xff", "\xff", TRUE},
|
||||
+ {"aa.aa.aa", "aa.aa.bb", FALSE},
|
||||
+ {"aa.aa.aa", "aa.aa.aa", TRUE},
|
||||
+ {"aa.aa.aa", "*.aa.bb", FALSE},
|
||||
+ {"aa.aa.aa", "*.aa.aa", TRUE},
|
||||
+ {"192.168.0.1", "192.168.0.1", TRUE},
|
||||
+ {"192.168.0.1", "*.168.0.1", FALSE},
|
||||
+ {"192.168.0.1", "*.0.1", FALSE},
|
||||
+ {"h.ello", "*.ello", FALSE},
|
||||
+ {"h.ello.", "*.ello", FALSE},
|
||||
+ {"h.ello", "*.ello.", FALSE},
|
||||
+ {"h.e.llo", "*.e.llo", TRUE},
|
||||
+ {"h.e.llo", " *.e.llo", FALSE},
|
||||
+ {" h.e.llo", "*.e.llo", TRUE},
|
||||
+ {"h.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"*.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"************.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
|
||||
+ "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
|
||||
+ "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
|
||||
+ "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
|
||||
+ ".e.llo.", "*.e.llo", TRUE},
|
||||
+ {"\xfe\xfe.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"h.e.llo.", "*.e.llo.", TRUE},
|
||||
+ {"h.e.llo", "*.e.llo.", TRUE},
|
||||
+ {".h.e.llo", "*.e.llo.", FALSE},
|
||||
+ {"h.e.llo", "*.*.llo.", FALSE},
|
||||
+ {"h.e.llo", "h.*.llo", FALSE},
|
||||
+ {"h.e.llo", "h.e.*", FALSE},
|
||||
+ {"hello", "*.ello", FALSE},
|
||||
+ {"hello", "**llo", FALSE},
|
||||
+ {"bar.foo.example.com", "*.example.com", FALSE},
|
||||
+ {"foo.example.com", "*.example.com", TRUE},
|
||||
+ {"baz.example.net", "b*z.example.net", FALSE},
|
||||
+ {"foobaz.example.net", "*baz.example.net", FALSE},
|
||||
+ {"xn--l8j.example.local", "x*.example.local", FALSE},
|
||||
+ {"xn--l8j.example.net", "*.example.net", TRUE},
|
||||
+ {"xn--l8j.example.net", "*j.example.net", FALSE},
|
||||
+ {"xn--l8j.example.net", "xn--l8j.example.net", TRUE},
|
||||
+ {"xn--l8j.example.net", "xn--l8j.*.net", FALSE},
|
||||
+ {"xl8j.example.net", "*.example.net", TRUE},
|
||||
+ {"fe80::3285:a9ff:fe46:b619", "*::3285:a9ff:fe46:b619", FALSE},
|
||||
+ {"fe80::3285:a9ff:fe46:b619", "fe80::3285:a9ff:fe46:b619", TRUE},
|
||||
+ {NULL, NULL, FALSE}
|
||||
+};
|
||||
|
||||
-/* only these backends define the tested functions */
|
||||
-#if defined(USE_OPENSSL) || defined(USE_GSKIT)
|
||||
+UNITTEST_START
|
||||
+{
|
||||
+ int i;
|
||||
+ for(i = 0; tests[i].host; i++) {
|
||||
+ if(tests[i].match != Curl_cert_hostcheck(tests[i].pattern,
|
||||
+ tests[i].host)) {
|
||||
+ fprintf(stderr,
|
||||
+ "HOST: %s\n"
|
||||
+ "PTRN: %s\n"
|
||||
+ "did %sMATCH\n",
|
||||
+ tests[i].host,
|
||||
+ tests[i].pattern,
|
||||
+ tests[i].match ? "NOT ": "");
|
||||
+ unitfail++;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
- /* here you start doing things and checking that the results are good */
|
||||
+UNITTEST_STOP
|
||||
+#else
|
||||
|
||||
-fail_unless(Curl_cert_hostcheck("www.example.com", "www.example.com"),
|
||||
- "good 1");
|
||||
-fail_unless(Curl_cert_hostcheck("*.example.com", "www.example.com"),
|
||||
- "good 2");
|
||||
-fail_unless(Curl_cert_hostcheck("xxx*.example.com", "xxxwww.example.com"),
|
||||
- "good 3");
|
||||
-fail_unless(Curl_cert_hostcheck("f*.example.com", "foo.example.com"),
|
||||
- "good 4");
|
||||
-fail_unless(Curl_cert_hostcheck("192.168.0.0", "192.168.0.0"),
|
||||
- "good 5");
|
||||
-
|
||||
-fail_if(Curl_cert_hostcheck("xxx.example.com", "www.example.com"), "bad 1");
|
||||
-fail_if(Curl_cert_hostcheck("*", "www.example.com"), "bad 2");
|
||||
-fail_if(Curl_cert_hostcheck("*.*.com", "www.example.com"), "bad 3");
|
||||
-fail_if(Curl_cert_hostcheck("*.example.com", "baa.foo.example.com"), "bad 4");
|
||||
-fail_if(Curl_cert_hostcheck("f*.example.com", "baa.example.com"), "bad 5");
|
||||
-fail_if(Curl_cert_hostcheck("*.com", "example.com"), "bad 6");
|
||||
-fail_if(Curl_cert_hostcheck("*fail.com", "example.com"), "bad 7");
|
||||
-fail_if(Curl_cert_hostcheck("*.example.", "www.example."), "bad 8");
|
||||
-fail_if(Curl_cert_hostcheck("*.example.", "www.example"), "bad 9");
|
||||
-fail_if(Curl_cert_hostcheck("", "www"), "bad 10");
|
||||
-fail_if(Curl_cert_hostcheck("*", "www"), "bad 11");
|
||||
-fail_if(Curl_cert_hostcheck("*.168.0.0", "192.168.0.0"), "bad 12");
|
||||
-fail_if(Curl_cert_hostcheck("www.example.com", "192.168.0.0"), "bad 13");
|
||||
-
|
||||
-#ifdef ENABLE_IPV6
|
||||
-fail_if(Curl_cert_hostcheck("*::3285:a9ff:fe46:b619",
|
||||
- "fe80::3285:a9ff:fe46:b619"), "bad 14");
|
||||
-fail_unless(Curl_cert_hostcheck("fe80::3285:a9ff:fe46:b619",
|
||||
- "fe80::3285:a9ff:fe46:b619"), "good 6");
|
||||
-#endif
|
||||
+UNITTEST_START
|
||||
|
||||
+UNITTEST_STOP
|
||||
#endif
|
||||
|
||||
- /* you end the test code like this: */
|
||||
-
|
||||
-UNITTEST_STOP
|
||||
380
meta/recipes-support/curl/curl/CVE-2023-28322.patch
Normal file
380
meta/recipes-support/curl/curl/CVE-2023-28322.patch
Normal file
@@ -0,0 +1,380 @@
|
||||
CVE: CVE-2023-28322
|
||||
Upstream-Status: Backport [ import patch from ubuntu curl_7.68.0-1ubuntu2.20
|
||||
upstream https://github.com/curl/curl/commit/7815647d6582c0a4900be2e1de ]
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
|
||||
Backport of:
|
||||
|
||||
From 7815647d6582c0a4900be2e1de6c5e61272c496b Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Tue, 25 Apr 2023 08:28:01 +0200
|
||||
Subject: [PATCH] lib: unify the upload/method handling
|
||||
|
||||
By making sure we set state.upload based on the set.method value and not
|
||||
independently as set.upload, we reduce confusion and mixup risks, both
|
||||
internally and externally.
|
||||
|
||||
Closes #11017
|
||||
---
|
||||
lib/curl_rtmp.c | 4 ++--
|
||||
lib/file.c | 4 ++--
|
||||
lib/ftp.c | 8 ++++----
|
||||
lib/http.c | 4 ++--
|
||||
lib/imap.c | 6 +++---
|
||||
lib/rtsp.c | 4 ++--
|
||||
lib/setopt.c | 6 ++----
|
||||
lib/smb.c | 6 +++---
|
||||
lib/smtp.c | 4 ++--
|
||||
lib/tftp.c | 8 ++++----
|
||||
lib/transfer.c | 4 ++--
|
||||
lib/urldata.h | 2 +-
|
||||
lib/vssh/libssh.c | 6 +++---
|
||||
lib/vssh/libssh2.c | 6 +++---
|
||||
lib/vssh/wolfssh.c | 2 +-
|
||||
15 files changed, 36 insertions(+), 38 deletions(-)
|
||||
|
||||
--- a/lib/curl_rtmp.c
|
||||
+++ b/lib/curl_rtmp.c
|
||||
@@ -213,7 +213,7 @@ static CURLcode rtmp_connect(struct conn
|
||||
/* We have to know if it's a write before we send the
|
||||
* connect request packet
|
||||
*/
|
||||
- if(conn->data->set.upload)
|
||||
+ if(conn->data->state.upload)
|
||||
r->Link.protocol |= RTMP_FEATURE_WRITE;
|
||||
|
||||
/* For plain streams, use the buffer toggle trick to keep data flowing */
|
||||
@@ -245,7 +245,7 @@ static CURLcode rtmp_do(struct connectda
|
||||
if(!RTMP_ConnectStream(r, 0))
|
||||
return CURLE_FAILED_INIT;
|
||||
|
||||
- if(conn->data->set.upload) {
|
||||
+ if(conn->data->state.upload) {
|
||||
Curl_pgrsSetUploadSize(data, data->state.infilesize);
|
||||
Curl_setup_transfer(data, -1, -1, FALSE, FIRSTSOCKET);
|
||||
}
|
||||
--- a/lib/file.c
|
||||
+++ b/lib/file.c
|
||||
@@ -198,7 +198,7 @@ static CURLcode file_connect(struct conn
|
||||
file->freepath = real_path; /* free this when done */
|
||||
|
||||
file->fd = fd;
|
||||
- if(!data->set.upload && (fd == -1)) {
|
||||
+ if(!data->state.upload && (fd == -1)) {
|
||||
failf(data, "Couldn't open file %s", data->state.up.path);
|
||||
file_done(conn, CURLE_FILE_COULDNT_READ_FILE, FALSE);
|
||||
return CURLE_FILE_COULDNT_READ_FILE;
|
||||
@@ -390,7 +390,7 @@ static CURLcode file_do(struct connectda
|
||||
|
||||
Curl_pgrsStartNow(data);
|
||||
|
||||
- if(data->set.upload)
|
||||
+ if(data->state.upload)
|
||||
return file_upload(conn);
|
||||
|
||||
file = conn->data->req.protop;
|
||||
--- a/lib/ftp.c
|
||||
+++ b/lib/ftp.c
|
||||
@@ -1371,7 +1371,7 @@ static CURLcode ftp_state_prepare_transf
|
||||
data->set.str[STRING_CUSTOMREQUEST]:
|
||||
(data->set.ftp_list_only?"NLST":"LIST"));
|
||||
}
|
||||
- else if(data->set.upload) {
|
||||
+ else if(data->state.upload) {
|
||||
PPSENDF(&conn->proto.ftpc.pp, "PRET STOR %s", conn->proto.ftpc.file);
|
||||
}
|
||||
else {
|
||||
@@ -3303,7 +3303,7 @@ static CURLcode ftp_done(struct connectd
|
||||
/* the response code from the transfer showed an error already so no
|
||||
use checking further */
|
||||
;
|
||||
- else if(data->set.upload) {
|
||||
+ else if(data->state.upload) {
|
||||
if((-1 != data->state.infilesize) &&
|
||||
(data->state.infilesize != data->req.writebytecount) &&
|
||||
!data->set.crlf &&
|
||||
@@ -3570,7 +3570,7 @@ static CURLcode ftp_do_more(struct conne
|
||||
connected back to us */
|
||||
}
|
||||
}
|
||||
- else if(data->set.upload) {
|
||||
+ else if(data->state.upload) {
|
||||
result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_STOR_TYPE);
|
||||
if(result)
|
||||
return result;
|
||||
@@ -4209,7 +4209,7 @@ CURLcode ftp_parse_url_path(struct conne
|
||||
ftpc->file = NULL; /* instead of point to a zero byte,
|
||||
we make it a NULL pointer */
|
||||
|
||||
- if(data->set.upload && !ftpc->file && (ftp->transfer == FTPTRANSFER_BODY)) {
|
||||
+ if(data->state.upload && !ftpc->file && (ftp->transfer == FTPTRANSFER_BODY)) {
|
||||
/* We need a file name when uploading. Return error! */
|
||||
failf(data, "Uploading to a URL without a file name!");
|
||||
free(rawPath);
|
||||
--- a/lib/http.c
|
||||
+++ b/lib/http.c
|
||||
@@ -2080,7 +2080,7 @@ CURLcode Curl_http(struct connectdata *c
|
||||
}
|
||||
|
||||
if((conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_FTP)) &&
|
||||
- data->set.upload) {
|
||||
+ data->state.upload) {
|
||||
httpreq = HTTPREQ_PUT;
|
||||
}
|
||||
|
||||
@@ -2261,7 +2261,7 @@ CURLcode Curl_http(struct connectdata *c
|
||||
if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
|
||||
(((httpreq == HTTPREQ_POST_MIME || httpreq == HTTPREQ_POST_FORM) &&
|
||||
http->postsize < 0) ||
|
||||
- ((data->set.upload || httpreq == HTTPREQ_POST) &&
|
||||
+ ((data->state.upload || httpreq == HTTPREQ_POST) &&
|
||||
data->state.infilesize == -1))) {
|
||||
if(conn->bits.authneg)
|
||||
/* don't enable chunked during auth neg */
|
||||
--- a/lib/imap.c
|
||||
+++ b/lib/imap.c
|
||||
@@ -1469,11 +1469,11 @@ static CURLcode imap_done(struct connect
|
||||
result = status; /* use the already set error code */
|
||||
}
|
||||
else if(!data->set.connect_only && !imap->custom &&
|
||||
- (imap->uid || imap->mindex || data->set.upload ||
|
||||
+ (imap->uid || imap->mindex || data->state.upload ||
|
||||
data->set.mimepost.kind != MIMEKIND_NONE)) {
|
||||
/* Handle responses after FETCH or APPEND transfer has finished */
|
||||
|
||||
- if(!data->set.upload && data->set.mimepost.kind == MIMEKIND_NONE)
|
||||
+ if(!data->state.upload && data->set.mimepost.kind == MIMEKIND_NONE)
|
||||
state(conn, IMAP_FETCH_FINAL);
|
||||
else {
|
||||
/* End the APPEND command first by sending an empty line */
|
||||
@@ -1539,7 +1539,7 @@ static CURLcode imap_perform(struct conn
|
||||
selected = TRUE;
|
||||
|
||||
/* Start the first command in the DO phase */
|
||||
- if(conn->data->set.upload || data->set.mimepost.kind != MIMEKIND_NONE)
|
||||
+ if(conn->data->state.upload || data->set.mimepost.kind != MIMEKIND_NONE)
|
||||
/* APPEND can be executed directly */
|
||||
result = imap_perform_append(conn);
|
||||
else if(imap->custom && (selected || !imap->mailbox))
|
||||
--- a/lib/rtsp.c
|
||||
+++ b/lib/rtsp.c
|
||||
@@ -499,7 +499,7 @@ static CURLcode rtsp_do(struct connectda
|
||||
rtspreq == RTSPREQ_SET_PARAMETER ||
|
||||
rtspreq == RTSPREQ_GET_PARAMETER) {
|
||||
|
||||
- if(data->set.upload) {
|
||||
+ if(data->state.upload) {
|
||||
putsize = data->state.infilesize;
|
||||
data->set.httpreq = HTTPREQ_PUT;
|
||||
|
||||
@@ -518,7 +518,7 @@ static CURLcode rtsp_do(struct connectda
|
||||
result =
|
||||
Curl_add_bufferf(&req_buffer,
|
||||
"Content-Length: %" CURL_FORMAT_CURL_OFF_T"\r\n",
|
||||
- (data->set.upload ? putsize : postsize));
|
||||
+ (data->state.upload ? putsize : postsize));
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
--- a/lib/setopt.c
|
||||
+++ b/lib/setopt.c
|
||||
@@ -258,8 +258,8 @@ CURLcode Curl_vsetopt(struct Curl_easy *
|
||||
* We want to sent data to the remote host. If this is HTTP, that equals
|
||||
* using the PUT request.
|
||||
*/
|
||||
- data->set.upload = (0 != va_arg(param, long)) ? TRUE : FALSE;
|
||||
- if(data->set.upload) {
|
||||
+ arg = va_arg(param, long);
|
||||
+ if(arg) {
|
||||
/* If this is HTTP, PUT is what's needed to "upload" */
|
||||
data->set.httpreq = HTTPREQ_PUT;
|
||||
data->set.opt_no_body = FALSE; /* this is implied */
|
||||
@@ -486,7 +486,6 @@ CURLcode Curl_vsetopt(struct Curl_easy *
|
||||
}
|
||||
else
|
||||
data->set.httpreq = HTTPREQ_GET;
|
||||
- data->set.upload = FALSE;
|
||||
break;
|
||||
|
||||
case CURLOPT_COPYPOSTFIELDS:
|
||||
@@ -797,7 +796,6 @@ CURLcode Curl_vsetopt(struct Curl_easy *
|
||||
*/
|
||||
if(va_arg(param, long)) {
|
||||
data->set.httpreq = HTTPREQ_GET;
|
||||
- data->set.upload = FALSE; /* switch off upload */
|
||||
data->set.opt_no_body = FALSE; /* this is implied */
|
||||
}
|
||||
break;
|
||||
--- a/lib/smb.c
|
||||
+++ b/lib/smb.c
|
||||
@@ -516,7 +516,7 @@ static CURLcode smb_send_open(struct con
|
||||
byte_count = strlen(req->path);
|
||||
msg.name_length = smb_swap16((unsigned short)byte_count);
|
||||
msg.share_access = smb_swap32(SMB_FILE_SHARE_ALL);
|
||||
- if(conn->data->set.upload) {
|
||||
+ if(conn->data->state.upload) {
|
||||
msg.access = smb_swap32(SMB_GENERIC_READ | SMB_GENERIC_WRITE);
|
||||
msg.create_disposition = smb_swap32(SMB_FILE_OVERWRITE_IF);
|
||||
}
|
||||
@@ -792,7 +792,7 @@ static CURLcode smb_request_state(struct
|
||||
smb_m = (const struct smb_nt_create_response*) msg;
|
||||
req->fid = smb_swap16(smb_m->fid);
|
||||
conn->data->req.offset = 0;
|
||||
- if(conn->data->set.upload) {
|
||||
+ if(conn->data->state.upload) {
|
||||
conn->data->req.size = conn->data->state.infilesize;
|
||||
Curl_pgrsSetUploadSize(conn->data, conn->data->req.size);
|
||||
next_state = SMB_UPLOAD;
|
||||
--- a/lib/smtp.c
|
||||
+++ b/lib/smtp.c
|
||||
@@ -1210,7 +1210,7 @@ static CURLcode smtp_done(struct connect
|
||||
result = status; /* use the already set error code */
|
||||
}
|
||||
else if(!data->set.connect_only && data->set.mail_rcpt &&
|
||||
- (data->set.upload || data->set.mimepost.kind)) {
|
||||
+ (data->state.upload || data->set.mimepost.kind)) {
|
||||
/* Calculate the EOB taking into account any terminating CRLF from the
|
||||
previous line of the email or the CRLF of the DATA command when there
|
||||
is "no mail data". RFC-5321, sect. 4.1.1.4.
|
||||
@@ -1297,7 +1297,7 @@ static CURLcode smtp_perform(struct conn
|
||||
smtp->eob = 2;
|
||||
|
||||
/* Start the first command in the DO phase */
|
||||
- if((data->set.upload || data->set.mimepost.kind) && data->set.mail_rcpt)
|
||||
+ if((data->state.upload || data->set.mimepost.kind) && data->set.mail_rcpt)
|
||||
/* MAIL transfer */
|
||||
result = smtp_perform_mail(conn);
|
||||
else
|
||||
--- a/lib/tftp.c
|
||||
+++ b/lib/tftp.c
|
||||
@@ -390,7 +390,7 @@ static CURLcode tftp_parse_option_ack(tf
|
||||
|
||||
/* tsize should be ignored on upload: Who cares about the size of the
|
||||
remote file? */
|
||||
- if(!data->set.upload) {
|
||||
+ if(!data->state.upload) {
|
||||
if(!tsize) {
|
||||
failf(data, "invalid tsize -:%s:- value in OACK packet", value);
|
||||
return CURLE_TFTP_ILLEGAL;
|
||||
@@ -470,7 +470,7 @@ static CURLcode tftp_send_first(tftp_sta
|
||||
return result;
|
||||
}
|
||||
|
||||
- if(data->set.upload) {
|
||||
+ if(data->state.upload) {
|
||||
/* If we are uploading, send an WRQ */
|
||||
setpacketevent(&state->spacket, TFTP_EVENT_WRQ);
|
||||
state->conn->data->req.upload_fromhere =
|
||||
@@ -505,7 +505,7 @@ static CURLcode tftp_send_first(tftp_sta
|
||||
if(!data->set.tftp_no_options) {
|
||||
char buf[64];
|
||||
/* add tsize option */
|
||||
- if(data->set.upload && (data->state.infilesize != -1))
|
||||
+ if(data->state.upload && (data->state.infilesize != -1))
|
||||
msnprintf(buf, sizeof(buf), "%" CURL_FORMAT_CURL_OFF_T,
|
||||
data->state.infilesize);
|
||||
else
|
||||
@@ -559,7 +559,7 @@ static CURLcode tftp_send_first(tftp_sta
|
||||
break;
|
||||
|
||||
case TFTP_EVENT_OACK:
|
||||
- if(data->set.upload) {
|
||||
+ if(data->state.upload) {
|
||||
result = tftp_connect_for_tx(state, event);
|
||||
}
|
||||
else {
|
||||
--- a/lib/transfer.c
|
||||
+++ b/lib/transfer.c
|
||||
@@ -1405,6 +1405,7 @@ void Curl_init_CONNECT(struct Curl_easy
|
||||
{
|
||||
data->state.fread_func = data->set.fread_func_set;
|
||||
data->state.in = data->set.in_set;
|
||||
+ data->state.upload = (data->set.httpreq == HTTPREQ_PUT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1816,7 +1817,7 @@ CURLcode Curl_retry_request(struct conne
|
||||
|
||||
/* if we're talking upload, we can't do the checks below, unless the protocol
|
||||
is HTTP as when uploading over HTTP we will still get a response */
|
||||
- if(data->set.upload &&
|
||||
+ if(data->state.upload &&
|
||||
!(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)))
|
||||
return CURLE_OK;
|
||||
|
||||
--- a/lib/urldata.h
|
||||
+++ b/lib/urldata.h
|
||||
@@ -1427,6 +1427,7 @@ struct UrlState {
|
||||
BIT(stream_depends_e); /* set or don't set the Exclusive bit */
|
||||
BIT(previouslypending); /* this transfer WAS in the multi->pending queue */
|
||||
BIT(cookie_engine);
|
||||
+ BIT(upload); /* upload request */
|
||||
};
|
||||
|
||||
|
||||
@@ -1762,7 +1763,6 @@ struct UserDefined {
|
||||
BIT(http_auto_referer); /* set "correct" referer when following
|
||||
location: */
|
||||
BIT(opt_no_body); /* as set with CURLOPT_NOBODY */
|
||||
- BIT(upload); /* upload request */
|
||||
BIT(verbose); /* output verbosity */
|
||||
BIT(krb); /* Kerberos connection requested */
|
||||
BIT(reuse_forbid); /* forbidden to be reused, close after use */
|
||||
--- a/lib/vssh/libssh.c
|
||||
+++ b/lib/vssh/libssh.c
|
||||
@@ -1076,7 +1076,7 @@ static CURLcode myssh_statemach_act(stru
|
||||
}
|
||||
|
||||
case SSH_SFTP_TRANS_INIT:
|
||||
- if(data->set.upload)
|
||||
+ if(data->state.upload)
|
||||
state(conn, SSH_SFTP_UPLOAD_INIT);
|
||||
else {
|
||||
if(protop->path[strlen(protop->path)-1] == '/')
|
||||
@@ -1686,7 +1686,7 @@ static CURLcode myssh_statemach_act(stru
|
||||
/* Functions from the SCP subsystem cannot handle/return SSH_AGAIN */
|
||||
ssh_set_blocking(sshc->ssh_session, 1);
|
||||
|
||||
- if(data->set.upload) {
|
||||
+ if(data->state.upload) {
|
||||
if(data->state.infilesize < 0) {
|
||||
failf(data, "SCP requires a known file size for upload");
|
||||
sshc->actualcode = CURLE_UPLOAD_FAILED;
|
||||
@@ -1787,7 +1787,7 @@ static CURLcode myssh_statemach_act(stru
|
||||
break;
|
||||
}
|
||||
case SSH_SCP_DONE:
|
||||
- if(data->set.upload)
|
||||
+ if(data->state.upload)
|
||||
state(conn, SSH_SCP_SEND_EOF);
|
||||
else
|
||||
state(conn, SSH_SCP_CHANNEL_FREE);
|
||||
--- a/lib/vssh/libssh2.c
|
||||
+++ b/lib/vssh/libssh2.c
|
||||
@@ -1664,7 +1664,7 @@ static CURLcode ssh_statemach_act(struct
|
||||
}
|
||||
|
||||
case SSH_SFTP_TRANS_INIT:
|
||||
- if(data->set.upload)
|
||||
+ if(data->state.upload)
|
||||
state(conn, SSH_SFTP_UPLOAD_INIT);
|
||||
else {
|
||||
if(sftp_scp->path[strlen(sftp_scp->path)-1] == '/')
|
||||
@@ -2366,7 +2366,7 @@ static CURLcode ssh_statemach_act(struct
|
||||
break;
|
||||
}
|
||||
|
||||
- if(data->set.upload) {
|
||||
+ if(data->state.upload) {
|
||||
if(data->state.infilesize < 0) {
|
||||
failf(data, "SCP requires a known file size for upload");
|
||||
sshc->actualcode = CURLE_UPLOAD_FAILED;
|
||||
@@ -2504,7 +2504,7 @@ static CURLcode ssh_statemach_act(struct
|
||||
break;
|
||||
|
||||
case SSH_SCP_DONE:
|
||||
- if(data->set.upload)
|
||||
+ if(data->state.upload)
|
||||
state(conn, SSH_SCP_SEND_EOF);
|
||||
else
|
||||
state(conn, SSH_SCP_CHANNEL_FREE);
|
||||
@@ -55,6 +55,8 @@ SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
|
||||
file://CVE-2023-32001.patch \
|
||||
file://CVE-2023-38545.patch \
|
||||
file://CVE-2023-38546.patch \
|
||||
file://CVE-2023-28321.patch \
|
||||
file://CVE-2023-28322.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "ec5fc263f898a3dfef08e805f1ecca42"
|
||||
|
||||
@@ -12,6 +12,10 @@ PE = "1"
|
||||
|
||||
SRCREV = "fdf2ef5809ca875c454510610764d9125ef2ebbd"
|
||||
|
||||
# remove at next version upgrade or when output changes
|
||||
PR = "r1"
|
||||
HASHEQUIV_HASH_VERSION .= ".1"
|
||||
|
||||
SRC_URI = "git://github.com/lz4/lz4.git;branch=dev;protocol=https \
|
||||
file://run-ptest \
|
||||
file://CVE-2021-3520.patch \
|
||||
@@ -23,7 +27,7 @@ S = "${WORKDIR}/git"
|
||||
# Fixed in r118, which is larger than the current version.
|
||||
CVE_CHECK_WHITELIST += "CVE-2014-4715"
|
||||
|
||||
EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
|
||||
EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
|
||||
|
||||
do_install() {
|
||||
oe_runmake install
|
||||
|
||||
@@ -19,14 +19,13 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://no-path-adjust.patch \
|
||||
"
|
||||
|
||||
PV .= ".2048"
|
||||
SRCREV = "982ef16059bd163a77271107020defde0740bbd6"
|
||||
|
||||
# Remove when 8.3 is out
|
||||
UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
PV .= ".2130"
|
||||
SRCREV = "075ad7047457debfeef13442c01e74088b461092"
|
||||
|
||||
# Do not consider .z in x.y.z, as that is updated with every commit
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
|
||||
# Ignore that the upstream version .z in x.y.z is always newer
|
||||
UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -41,22 +40,18 @@ do_configure () {
|
||||
cd src
|
||||
rm -f auto/*
|
||||
touch auto/config.mk
|
||||
# git timestamps aren't reliable, so touch the shipped .po files so they aren't regenerated
|
||||
touch -c po/cs.cp1250.po po/ja.euc-jp.po po/ja.sjis.po po/ko.po po/pl.UTF-8.po po/pl.cp1250.po po/ru.cp1251.po po/sk.cp1250.po po/uk.cp1251.po po/zh_CN.po po/zh_CN.cp936.po po/zh_TW.po
|
||||
# ru.cp1251.po uses CP1251 rather than cp1251, fix that
|
||||
sed -i -e s/CP1251/cp1251/ po/ru.cp1251.po
|
||||
aclocal
|
||||
autoconf
|
||||
cd ..
|
||||
oe_runconf
|
||||
touch src/auto/configure
|
||||
touch src/auto/config.mk src/auto/config.h
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
# We do not support fully / correctly the following locales. Attempting
|
||||
# to use these with msgfmt in order to update the ".desktop" files exposes
|
||||
# this problem and leads to the compile failing.
|
||||
for LOCALE in cs fr ko pl sk zh_CN zh_TW;do
|
||||
echo -n > src/po/${LOCALE}.po
|
||||
done
|
||||
autotools_do_compile
|
||||
# need a native tool, not a target one
|
||||
${BUILD_CC} src/po/sjiscorr.c -o src/po/sjiscorr
|
||||
}
|
||||
|
||||
PACKAGECONFIG ??= "\
|
||||
|
||||
Reference in New Issue
Block a user