mirror of
https://git.yoctoproject.org/poky
synced 2026-02-22 01:19:41 +01:00
Compare commits
33 Commits
yocto-3.1.
...
dunfell-23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54d8a1f631 | ||
|
|
593cbdf6c3 | ||
|
|
4fd12fa20e | ||
|
|
b000e8b274 | ||
|
|
5fc659fd02 | ||
|
|
dee3046d2b | ||
|
|
6289654c30 | ||
|
|
9ba6ff6278 | ||
|
|
34ae492934 | ||
|
|
0e4ba103bb | ||
|
|
34a1dcf275 | ||
|
|
faec25f77c | ||
|
|
00aec91f57 | ||
|
|
6fc1eafd3b | ||
|
|
6c31f05df4 | ||
|
|
b110cd3d82 | ||
|
|
aa02dc871f | ||
|
|
c846f0d89c | ||
|
|
fa23359034 | ||
|
|
eb0915c699 | ||
|
|
5c5d9d5bcc | ||
|
|
1c77446c96 | ||
|
|
2c6b82aaf0 | ||
|
|
12fab85ba1 | ||
|
|
b22e4f002d | ||
|
|
a528dc22aa | ||
|
|
4bda99df75 | ||
|
|
70de5ee7d1 | ||
|
|
574b303503 | ||
|
|
bffa4f3051 | ||
|
|
9bf63ee197 | ||
|
|
3adc98348b | ||
|
|
8f7ce1acf7 |
@@ -206,6 +206,7 @@ class LayerIndexPlugin(ActionPlugin):
|
||||
"""
|
||||
args.show_only = True
|
||||
args.ignore = []
|
||||
args.shallow = True
|
||||
self.do_layerindex_fetch(args)
|
||||
|
||||
def register_commands(self, sp):
|
||||
|
||||
@@ -227,7 +227,7 @@ class XhrSetDefaultImageUrl(View):
|
||||
# same logical name
|
||||
# * Each project that uses a layer will have its own
|
||||
# LayerVersion and Project Layer for it
|
||||
# * During the Paroject delete process, when the last
|
||||
# * During the Project delete process, when the last
|
||||
# LayerVersion for a 'local_source_dir' layer is deleted
|
||||
# then the Layer record is deleted to remove orphans
|
||||
#
|
||||
@@ -457,15 +457,18 @@ class XhrLayer(View):
|
||||
'layerdetailurl':
|
||||
layer_dep.get_detailspage_url(project.pk)})
|
||||
|
||||
# Scan the layer's content and update components
|
||||
scan_layer_content(layer,layer_version)
|
||||
# Only scan_layer_content if layer is local
|
||||
if layer_data.get('local_source_dir', None):
|
||||
# Scan the layer's content and update components
|
||||
scan_layer_content(layer,layer_version)
|
||||
|
||||
except Layer_Version.DoesNotExist:
|
||||
return error_response("layer-dep-not-found")
|
||||
except Project.DoesNotExist:
|
||||
return error_response("project-not-found")
|
||||
except KeyError:
|
||||
return error_response("incorrect-parameters")
|
||||
except KeyError as e:
|
||||
_log("KeyError: %s" % e)
|
||||
return error_response(f"incorrect-parameters")
|
||||
|
||||
return JsonResponse({'error': "ok",
|
||||
'imported_layer': {
|
||||
|
||||
@@ -8652,6 +8652,8 @@ In order to run tests, you need to do the following:
|
||||
- Be sure to use an absolute path when calling this script
|
||||
with sudo.
|
||||
|
||||
- Ensure that your host has the package ``iptables`` installed.
|
||||
|
||||
- The package recipe ``qemu-helper-native`` is required to run
|
||||
this script. Build the package using the following command:
|
||||
::
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
DISTRO : "3.1.31"
|
||||
DISTRO : "3.1.32"
|
||||
DISTRO_NAME_NO_CAP : "dunfell"
|
||||
DISTRO_NAME : "Dunfell"
|
||||
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
|
||||
YOCTO_DOC_VERSION : "3.1.31"
|
||||
YOCTO_DOC_VERSION : "3.1.32"
|
||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.4"
|
||||
DISTRO_REL_TAG : "yocto-3.1.31"
|
||||
DOCCONF_VERSION : "3.1.31"
|
||||
DISTRO_REL_TAG : "yocto-3.1.32"
|
||||
DOCCONF_VERSION : "3.1.32"
|
||||
BITBAKE_SERIES : "1.46"
|
||||
POKYVERSION : "23.0.31"
|
||||
POKYVERSION : "23.0.32"
|
||||
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
|
||||
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
|
||||
YOCTO_AB_URL : "https://autobuilder.yoctoproject.org"
|
||||
|
||||
@@ -138,7 +138,7 @@ consists of the following pieces:
|
||||
piece of software. The test allows the packages to be be run within a
|
||||
target image.
|
||||
|
||||
- ``oe-selftest``: Tests combination BitBake invocations. These tests
|
||||
- ``oe-selftest``: Tests combinations of BitBake invocations. These tests
|
||||
operate outside the OpenEmbedded build system itself. The
|
||||
``oe-selftest`` can run all tests by default or can run selected
|
||||
tests or test suites.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "3.1.31"
|
||||
DISTRO_VERSION = "3.1.32"
|
||||
DISTRO_CODENAME = "dunfell"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
|
||||
|
||||
@@ -480,8 +480,10 @@ def OEOuthashBasic(path, sigfile, task, d):
|
||||
if "package_write_" in task or task == "package_qa":
|
||||
include_owners = False
|
||||
include_timestamps = False
|
||||
include_root = True
|
||||
if task == "package":
|
||||
include_timestamps = d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1'
|
||||
include_root = False
|
||||
extra_content = d.getVar('HASHEQUIV_HASH_VERSION')
|
||||
|
||||
try:
|
||||
@@ -592,7 +594,8 @@ def OEOuthashBasic(path, sigfile, task, d):
|
||||
update_hash("\n")
|
||||
|
||||
# Process this directory and all its child files
|
||||
process(root)
|
||||
if include_root or root != ".":
|
||||
process(root)
|
||||
for f in files:
|
||||
if f == 'fixmepath':
|
||||
continue
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From 7ef3787c84b6b524501211b11a26c742f829af1a Mon Sep 17 00:00:00 2001
|
||||
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||
Date: Mon, 18 Dec 2023 14:47:44 +0000
|
||||
Subject: [PATCH] upstream: ban user/hostnames with most shell metacharacters
|
||||
|
||||
This makes ssh(1) refuse user or host names provided on the
|
||||
commandline that contain most shell metacharacters.
|
||||
|
||||
Some programs that invoke ssh(1) using untrusted data do not filter
|
||||
metacharacters in arguments they supply. This could create
|
||||
interactions with user-specified ProxyCommand and other directives
|
||||
that allow shell injection attacks to occur.
|
||||
|
||||
It's a mistake to invoke ssh(1) with arbitrary untrusted arguments,
|
||||
but getting this stuff right can be tricky, so this should prevent
|
||||
most obvious ways of creating risky situations. It however is not
|
||||
and cannot be perfect: ssh(1) has no practical way of interpreting
|
||||
what shell quoting rules are in use and how they interact with the
|
||||
user's specified ProxyCommand.
|
||||
|
||||
To allow configurations that use strange user or hostnames to
|
||||
continue to work, this strictness is applied only to names coming
|
||||
from the commandline. Names specified using User or Hostname
|
||||
directives in ssh_config(5) are not affected.
|
||||
|
||||
feedback/ok millert@ markus@ dtucker@ deraadt@
|
||||
|
||||
OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9
|
||||
|
||||
CVE: CVE-2023-51385
|
||||
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a]
|
||||
Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
|
||||
Comment: Hunks refreshed to apply cleanly
|
||||
|
||||
---
|
||||
ssh.c | 41 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 40 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ssh.c b/ssh.c
|
||||
index 35c48e62d18..48d93ddf2a9 100644
|
||||
--- a/ssh.c
|
||||
+++ b/ssh.c
|
||||
@@ -583,6 +583,41 @@ set_addrinfo_port(struct addrinfo *addrs
|
||||
}
|
||||
}
|
||||
|
||||
+static int
|
||||
+valid_hostname(const char *s)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ if (*s == '-')
|
||||
+ return 0;
|
||||
+ for (i = 0; s[i] != 0; i++) {
|
||||
+ if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL ||
|
||||
+ isspace((u_char)s[i]) || iscntrl((u_char)s[i]))
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+valid_ruser(const char *s)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ if (*s == '-')
|
||||
+ return 0;
|
||||
+ for (i = 0; s[i] != 0; i++) {
|
||||
+ if (strchr("'`\";&<>|(){}", s[i]) != NULL)
|
||||
+ return 0;
|
||||
+ /* Disallow '-' after whitespace */
|
||||
+ if (isspace((u_char)s[i]) && s[i + 1] == '-')
|
||||
+ return 0;
|
||||
+ /* Disallow \ in last position */
|
||||
+ if (s[i] == '\\' && s[i + 1] == '\0')
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Main program for the ssh client.
|
||||
*/
|
||||
@@ -1069,6 +1104,10 @@ main(int ac, char **av)
|
||||
if (!host)
|
||||
usage();
|
||||
|
||||
+ if (!valid_hostname(host))
|
||||
+ fatal("hostname contains invalid characters");
|
||||
+ if (options.user != NULL && !valid_ruser(options.user))
|
||||
+ fatal("remote username contains invalid characters");
|
||||
host_arg = xstrdup(host);
|
||||
|
||||
/* Initialize the command to execute on remote host. */
|
||||
@@ -40,6 +40,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
|
||||
file://CVE-2023-38408-11.patch \
|
||||
file://CVE-2023-38408-12.patch \
|
||||
file://CVE-2023-48795.patch \
|
||||
file://CVE-2023-51385.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "3076e6413e8dbe56d33848c1054ac091"
|
||||
SRC_URI[sha256sum] = "43925151e6cf6cee1450190c0e9af4dc36b41c12737619edff8bcebdff64e671"
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "378b44705910e0b6f07b80ab185aae224448400c"
|
||||
SRCREV ?= "593cbdf6c3d340b5408e699bc33f5ac419297104"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dunfell \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
45
meta/recipes-core/ncurses/files/CVE-2023-29491.patch
Normal file
45
meta/recipes-core/ncurses/files/CVE-2023-29491.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
Backport of:
|
||||
|
||||
Author: Sven Joachim <svenjoac@gmx.de>
|
||||
Description: Change the --disable-root-environ configure option behavior
|
||||
By default, the --disable-root-environ option forbids program run by
|
||||
the superuser to load custom terminfo entries. This patch changes
|
||||
that to only restrict programs running with elevated privileges,
|
||||
matching the behavior of the --disable-setuid-environ option
|
||||
introduced in the 20230423 upstream patchlevel.
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034372#29
|
||||
Bug: https://lists.gnu.org/archive/html/bug-ncurses/2023-04/msg00018.html
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2023-05-01
|
||||
|
||||
Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ncurses/6.2-0ubuntu2.1/ncurses_6.2-0ubuntu2.1.debian.tar.xz]
|
||||
CVE: CVE-2023-29491
|
||||
Signed-off-by: Virendra Thakur <virendrak@kpit.com>
|
||||
|
||||
---
|
||||
ncurses/tinfo/access.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
--- a/ncurses/tinfo/access.c
|
||||
+++ b/ncurses/tinfo/access.c
|
||||
@@ -178,15 +178,16 @@ _nc_is_file_path(const char *path)
|
||||
NCURSES_EXPORT(int)
|
||||
_nc_env_access(void)
|
||||
{
|
||||
+ int result = TRUE;
|
||||
+
|
||||
#if HAVE_ISSETUGID
|
||||
if (issetugid())
|
||||
- return FALSE;
|
||||
+ result = FALSE;
|
||||
#elif HAVE_GETEUID && HAVE_GETEGID
|
||||
if (getuid() != geteuid()
|
||||
|| getgid() != getegid())
|
||||
- return FALSE;
|
||||
+ result = FALSE;
|
||||
#endif
|
||||
- /* ...finally, disallow root */
|
||||
- return (getuid() != ROOT_UID) && (geteuid() != ROOT_UID);
|
||||
+ return result;
|
||||
}
|
||||
#endif
|
||||
@@ -5,11 +5,12 @@ SRC_URI += "file://0001-tic-hang.patch \
|
||||
file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \
|
||||
file://CVE-2021-39537.patch \
|
||||
file://CVE-2022-29458.patch \
|
||||
file://CVE-2023-29491.patch \
|
||||
"
|
||||
# commit id corresponds to the revision in package version
|
||||
SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4"
|
||||
S = "${WORKDIR}/git"
|
||||
EXTRA_OECONF += "--with-abi-version=5"
|
||||
EXTRA_OECONF += "--with-abi-version=5 --disable-root-environ"
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
|
||||
|
||||
# This is needed when using patchlevel versions like 6.1+20181013
|
||||
|
||||
@@ -19,3 +19,6 @@ file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
|
||||
foreach(config ${toolchain_config_files})
|
||||
include(${config})
|
||||
endforeach()
|
||||
|
||||
unset(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||
unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||
|
||||
@@ -9,3 +9,6 @@ SRC_URI = ""
|
||||
|
||||
do_configure[depends] += "gcc-source-${PV}:do_preconfigure"
|
||||
do_populate_lic[depends] += "gcc-source-${PV}:do_unpack"
|
||||
|
||||
# patch is available via gcc-source recipe
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4039"
|
||||
|
||||
@@ -71,7 +71,8 @@ SRC_URI += "\
|
||||
file://CVE-2023-29402.patch \
|
||||
file://CVE-2023-29404.patch \
|
||||
file://CVE-2023-29400.patch \
|
||||
file://CVE-2023-29406.patch \
|
||||
file://CVE-2023-29406-1.patch \
|
||||
file://CVE-2023-29406-2.patch \
|
||||
file://CVE-2023-29409.patch \
|
||||
file://CVE-2022-41725-pre1.patch \
|
||||
file://CVE-2022-41725-pre2.patch \
|
||||
|
||||
114
meta/recipes-devtools/go/go-1.14/CVE-2023-29406-2.patch
Normal file
114
meta/recipes-devtools/go/go-1.14/CVE-2023-29406-2.patch
Normal file
@@ -0,0 +1,114 @@
|
||||
From c08a5fa413a34111c9a37fd9e545de27ab0978b1 Mon Sep 17 00:00:00 2001
|
||||
From: Damien Neil <dneil@google.com>
|
||||
Date: Wed, 19 Jul 2023 10:30:46 -0700
|
||||
Subject: [PATCH] [release-branch.go1.19] net/http: permit requests with
|
||||
invalid Host headers
|
||||
|
||||
Historically, the Transport has silently truncated invalid
|
||||
Host headers at the first '/' or ' ' character. CL 506996 changed
|
||||
this behavior to reject invalid Host headers entirely.
|
||||
Unfortunately, Docker appears to rely on the previous behavior.
|
||||
|
||||
When sending a HTTP/1 request with an invalid Host, send an empty
|
||||
Host header. This is safer than truncation: If you care about the
|
||||
Host, then you should get the one you set; if you don't care,
|
||||
then an empty Host should be fine.
|
||||
|
||||
Continue to fully validate Host headers sent to a proxy,
|
||||
since proxies generally can't productively forward requests
|
||||
without a Host.
|
||||
|
||||
For #60374
|
||||
Fixes #61431
|
||||
Fixes #61825
|
||||
|
||||
Change-Id: If170c7dd860aa20eb58fe32990fc93af832742b6
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/511155
|
||||
TryBot-Result: Gopher Robot <gobot@golang.org>
|
||||
Reviewed-by: Roland Shoemaker <roland@golang.org>
|
||||
Run-TryBot: Damien Neil <dneil@google.com>
|
||||
(cherry picked from commit b9153f6ef338baee5fe02a867c8fbc83a8b29dd1)
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/518855
|
||||
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Run-TryBot: Roland Shoemaker <roland@golang.org>
|
||||
Reviewed-by: Russ Cox <rsc@golang.org>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/c08a5fa413a34111c9a37fd9e545de27ab0978b1]
|
||||
CVE: CVE-2023-29406
|
||||
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
||||
---
|
||||
src/net/http/request.go | 23 ++++++++++++++++++++++-
|
||||
src/net/http/request_test.go | 17 ++++++++++++-----
|
||||
2 files changed, 34 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/net/http/request.go b/src/net/http/request.go
|
||||
index 3100037386..91cb8a66b9 100644
|
||||
--- a/src/net/http/request.go
|
||||
+++ b/src/net/http/request.go
|
||||
@@ -582,8 +582,29 @@ func (r *Request) write(w io.Writer, usingProxy bool, extraHeaders Header, waitF
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
+ // Validate that the Host header is a valid header in general,
|
||||
+ // but don't validate the host itself. This is sufficient to avoid
|
||||
+ // header or request smuggling via the Host field.
|
||||
+ // The server can (and will, if it's a net/http server) reject
|
||||
+ // the request if it doesn't consider the host valid.
|
||||
if !httpguts.ValidHostHeader(host) {
|
||||
- return errors.New("http: invalid Host header")
|
||||
+ // Historically, we would truncate the Host header after '/' or ' '.
|
||||
+ // Some users have relied on this truncation to convert a network
|
||||
+ // address such as Unix domain socket path into a valid, ignored
|
||||
+ // Host header (see https://go.dev/issue/61431).
|
||||
+ //
|
||||
+ // We don't preserve the truncation, because sending an altered
|
||||
+ // header field opens a smuggling vector. Instead, zero out the
|
||||
+ // Host header entirely if it isn't valid. (An empty Host is valid;
|
||||
+ // see RFC 9112 Section 3.2.)
|
||||
+ //
|
||||
+ // Return an error if we're sending to a proxy, since the proxy
|
||||
+ // probably can't do anything useful with an empty Host header.
|
||||
+ if !usingProxy {
|
||||
+ host = ""
|
||||
+ } else {
|
||||
+ return errors.New("http: invalid Host header")
|
||||
+ }
|
||||
}
|
||||
|
||||
// According to RFC 6874, an HTTP client, proxy, or other
|
||||
diff --git a/src/net/http/request_test.go b/src/net/http/request_test.go
|
||||
index fddc85d6a9..dd1e2dc2a1 100644
|
||||
--- a/src/net/http/request_test.go
|
||||
+++ b/src/net/http/request_test.go
|
||||
@@ -770,16 +770,23 @@ func TestRequestWriteBufferedWriter(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
-func TestRequestBadHost(t *testing.T) {
|
||||
+func TestRequestBadHostHeader(t *testing.T) {
|
||||
got := []string{}
|
||||
req, err := NewRequest("GET", "http://foo/after", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
- req.Host = "foo.com with spaces"
|
||||
- req.URL.Host = "foo.com with spaces"
|
||||
- if err := req.Write(logWrites{t, &got}); err == nil {
|
||||
- t.Errorf("Writing request with invalid Host: succeded, want error")
|
||||
+ req.Host = "foo.com\nnewline"
|
||||
+ req.URL.Host = "foo.com\nnewline"
|
||||
+ req.Write(logWrites{t, &got})
|
||||
+ want := []string{
|
||||
+ "GET /after HTTP/1.1\r\n",
|
||||
+ "Host: \r\n",
|
||||
+ "User-Agent: " + DefaultUserAgent + "\r\n",
|
||||
+ "\r\n",
|
||||
+ }
|
||||
+ if !reflect.DeepEqual(got, want) {
|
||||
+ t.Errorf("Writes = %q\n Want = %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From 8b45a3c4cab95382beea1ecdddeb2e4a9ed14aba Mon Sep 17 00:00:00 2001
|
||||
From: Jo-Philipp Wich <jo@mein.io>
|
||||
Date: Wed, 1 Apr 2020 21:47:40 +0200
|
||||
Subject: [PATCH 001/104] file_util.c: fix possible bad memory access in
|
||||
file_read_line_alloc()
|
||||
|
||||
In the case of a zero length string being returned by fgets(), the condition
|
||||
checking for a trailing new line would perform a bad memory access outside
|
||||
of `buf`. This might happen when line with a leading null byte is read.
|
||||
|
||||
Avoid this case by checking that the string has a length of at least one
|
||||
byte. Also change the unsigned int types to size_t to store length values
|
||||
while we're at it.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/ndmsystems/opkg/commit/8b45a3c4cab95382beea1ecdddeb2e4a9ed14aba]
|
||||
|
||||
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
||||
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
||||
Signed-off-by: virendra thakur <virendrak@kpit.com>
|
||||
---
|
||||
libopkg/file_util.c | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libopkg/file_util.c b/libopkg/file_util.c
|
||||
index fbed7b4..ee9f59d 100644
|
||||
--- a/libopkg/file_util.c
|
||||
+++ b/libopkg/file_util.c
|
||||
@@ -127,17 +127,14 @@ char *file_readlink_alloc(const char *file_name)
|
||||
*/
|
||||
char *file_read_line_alloc(FILE * fp)
|
||||
{
|
||||
+ size_t buf_len, line_size;
|
||||
char buf[BUFSIZ];
|
||||
- unsigned int buf_len;
|
||||
char *line = NULL;
|
||||
- unsigned int line_size = 0;
|
||||
int got_nl = 0;
|
||||
|
||||
- buf[0] = '\0';
|
||||
-
|
||||
while (fgets(buf, BUFSIZ, fp)) {
|
||||
buf_len = strlen(buf);
|
||||
- if (buf[buf_len - 1] == '\n') {
|
||||
+ if (buf_len > 0 && buf[buf_len - 1] == '\n') {
|
||||
buf_len--;
|
||||
buf[buf_len] = '\0';
|
||||
got_nl = 1;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -16,6 +16,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
|
||||
file://opkg.conf \
|
||||
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
|
||||
file://sourcedateepoch.patch \
|
||||
file://0001-file_util.c-fix-possible-bad-memory-access-in-file_r.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
|
||||
@@ -46,6 +46,10 @@ SRC_URI[perl-cross.sha256sum] = "edce0b0c2f725e2db3f203d6d8e9f3f7161256f5d159055
|
||||
|
||||
S = "${WORKDIR}/perl-${PV}"
|
||||
|
||||
# This is windows only issue.
|
||||
# https://ubuntu.com/security/CVE-2023-47039
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-47039"
|
||||
|
||||
inherit upstream-version-is-even update-alternatives
|
||||
|
||||
DEPENDS += "zlib virtual/crypt"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From fabef23bea6e9963c06e218586fda1a823e3c6bf Mon Sep 17 00:00:00 2001
|
||||
From: Wayne Davison <wayne@opencoder.net>
|
||||
Date: Mon, 8 Aug 2022 21:30:21 -0700
|
||||
Subject: [PATCH] Fix --relative when copying an absolute path.
|
||||
|
||||
CVE: CVE-2022-29154
|
||||
Upstream-Status: Backport [https://github.com/WayneD/rsync/commit/fabef23bea6e9963c06e218586fda1a823e3c6bf]
|
||||
Signed-off-by: Matthias Schmitz <matthias.schmitz@port4949.net>
|
||||
---
|
||||
exclude.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/exclude.c b/exclude.c
|
||||
index 2394023f..ba5ca5a3 100644
|
||||
--- a/exclude.c
|
||||
+++ b/exclude.c
|
||||
@@ -434,8 +434,10 @@ void add_implied_include(const char *arg)
|
||||
*p++ = *cp++;
|
||||
break;
|
||||
case '/':
|
||||
- if (p[-1] == '/') /* This is safe because of the initial slash. */
|
||||
+ if (p[-1] == '/') { /* This is safe because of the initial slash. */
|
||||
+ cp++;
|
||||
break;
|
||||
+ }
|
||||
if (relative_paths) {
|
||||
filter_rule const *ent;
|
||||
int found = 0;
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -17,6 +17,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
|
||||
file://CVE-2016-9842.patch \
|
||||
file://CVE-2016-9843.patch \
|
||||
file://CVE-2022-29154.patch \
|
||||
file://0001-Fix-relative-when-copying-an-absolute-path.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "1581a588fde9d89f6bc6201e8129afaf"
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
From 8c7bd787defa071c96289b7da9397f673fddb874 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Sharp <ken.sharp@artifex.com>
|
||||
Date: Wed, 20 May 2020 16:02:07 +0100
|
||||
Subject: [PATCH] txtwrite - address memory problems
|
||||
|
||||
Bug #702229 " txtwrite: use after free in 9.51 on some files (regression from 9.50)"
|
||||
Also bug #702346 and the earlier report #701877.
|
||||
|
||||
The problems occur because its possible for a single character code in
|
||||
a PDF file to map to more than a single Unicode code point. In the case
|
||||
of the file for 701877 the character code maps to 'f' and 'i' (it is an
|
||||
fi ligature).
|
||||
|
||||
The code should deal with this, but we need to ensure we are using the
|
||||
correct index. In addition, if we do get more Unicode code points than
|
||||
we expected, we need to set the widths of the 'extra' code points to
|
||||
zero (we only want to consider the width of the original character).
|
||||
|
||||
This does mean increasing the size of the Widths array to cater for
|
||||
the possibility of more entries on output than there were on input.
|
||||
|
||||
While working on it I noticed that the Unicode remapping on little-
|
||||
endian machines was reversing the order of the Unicode values, when
|
||||
there was more than a single code point returned, so fixed that at
|
||||
the same time.
|
||||
|
||||
Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;h=8c7bd787defa071c96289b7da9397f673fddb874]
|
||||
CVE: CVE-2020-36773
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
devices/vector/gdevtxtw.c | 26 ++++++++++++++++----------
|
||||
1 file changed, 16 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/devices/vector/gdevtxtw.c b/devices/vector/gdevtxtw.c
|
||||
index 87f9355..bddce5a 100644
|
||||
--- a/devices/vector/gdevtxtw.c
|
||||
+++ b/devices/vector/gdevtxtw.c
|
||||
@@ -1812,11 +1812,11 @@ static int get_unicode(textw_text_enum_t *penum, gs_font *font, gs_glyph glyph,
|
||||
#else
|
||||
b = (char *)Buffer;
|
||||
u = (char *)unicode;
|
||||
- while (l >= 0) {
|
||||
- *b++ = *(u + l);
|
||||
- l--;
|
||||
- }
|
||||
|
||||
+ for (l=0;l<length;l+=2, u+=2){
|
||||
+ *b++ = *(u+1);
|
||||
+ *b++ = *u;
|
||||
+ }
|
||||
#endif
|
||||
gs_free_object(penum->dev->memory, unicode, "free temporary unicode buffer");
|
||||
return length / sizeof(short);
|
||||
@@ -1963,7 +1963,7 @@ txtwrite_process_plain_text(gs_text_enum_t *pte)
|
||||
&penum->text_state->matrix, &wanted);
|
||||
pte->returned.total_width.x += wanted.x;
|
||||
pte->returned.total_width.y += wanted.y;
|
||||
- penum->Widths[pte->index - 1] = wanted.x;
|
||||
+ penum->Widths[penum->TextBufferIndex] = wanted.x;
|
||||
|
||||
if (pte->text.operation & TEXT_ADD_TO_ALL_WIDTHS) {
|
||||
gs_point tpt;
|
||||
@@ -1984,8 +1984,14 @@ txtwrite_process_plain_text(gs_text_enum_t *pte)
|
||||
pte->returned.total_width.x += dpt.x;
|
||||
pte->returned.total_width.y += dpt.y;
|
||||
|
||||
- penum->TextBufferIndex += get_unicode(penum, (gs_font *)pte->orig_font, glyph, ch, &penum->TextBuffer[penum->TextBufferIndex]);
|
||||
- penum->Widths[pte->index - 1] += dpt.x;
|
||||
+ penum->Widths[penum->TextBufferIndex] += dpt.x;
|
||||
+ code = get_unicode(penum, (gs_font *)pte->orig_font, glyph, ch, &penum->TextBuffer[penum->TextBufferIndex]);
|
||||
+ /* If a single text code returned multiple Unicode values, then we need to set the
|
||||
+ * 'extra' code points' widths to 0.
|
||||
+ */
|
||||
+ if (code > 1)
|
||||
+ memset(&penum->Widths[penum->TextBufferIndex + 1], 0x00, (code - 1) * sizeof(float));
|
||||
+ penum->TextBufferIndex += code;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -2123,7 +2129,7 @@ txt_add_fragment(gx_device_txtwrite_t *tdev, textw_text_enum_t *penum)
|
||||
if (!penum->text_state->Widths)
|
||||
return gs_note_error(gs_error_VMerror);
|
||||
memset(penum->text_state->Widths, 0x00, penum->TextBufferIndex * sizeof(float));
|
||||
- memcpy(penum->text_state->Widths, penum->Widths, penum->text.size * sizeof(float));
|
||||
+ memcpy(penum->text_state->Widths, penum->Widths, penum->TextBufferIndex * sizeof(float));
|
||||
|
||||
unsorted_entry->Unicode_Text = (unsigned short *)gs_malloc(tdev->memory->stable_memory,
|
||||
penum->TextBufferIndex, sizeof(unsigned short), "txtwrite alloc sorted text buffer");
|
||||
@@ -2136,7 +2142,7 @@ txt_add_fragment(gx_device_txtwrite_t *tdev, textw_text_enum_t *penum)
|
||||
if (!unsorted_entry->Widths)
|
||||
return gs_note_error(gs_error_VMerror);
|
||||
memset(unsorted_entry->Widths, 0x00, penum->TextBufferIndex * sizeof(float));
|
||||
- memcpy(unsorted_entry->Widths, penum->Widths, penum->text.size * sizeof(float));
|
||||
+ memcpy(unsorted_entry->Widths, penum->Widths, penum->TextBufferIndex * sizeof(float));
|
||||
|
||||
unsorted_entry->FontName = (char *)gs_malloc(tdev->memory->stable_memory,
|
||||
(strlen(penum->text_state->FontName) + 1), sizeof(unsigned char), "txtwrite alloc sorted text buffer");
|
||||
@@ -2192,7 +2198,7 @@ textw_text_process(gs_text_enum_t *pte)
|
||||
if (!penum->TextBuffer)
|
||||
return gs_note_error(gs_error_VMerror);
|
||||
penum->Widths = (float *)gs_malloc(tdev->memory->stable_memory,
|
||||
- pte->text.size, sizeof(float), "txtwrite temporary widths array");
|
||||
+ pte->text.size * 4, sizeof(float), "txtwrite temporary widths array");
|
||||
if (!penum->Widths)
|
||||
return gs_note_error(gs_error_VMerror);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -45,6 +45,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
|
||||
file://CVE-2023-36664-1.patch \
|
||||
file://CVE-2023-36664-2.patch \
|
||||
file://CVE-2023-43115.patch \
|
||||
file://CVE-2020-36773.patch \
|
||||
"
|
||||
|
||||
SRC_URI = "${SRC_URI_BASE} \
|
||||
|
||||
41
meta/recipes-extended/less/less/CVE-2022-48624.patch
Normal file
41
meta/recipes-extended/less/less/CVE-2022-48624.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From c6ac6de49698be84d264a0c4c0c40bb870b10144 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Nudelman <markn@greenwoodsoftware.com>
|
||||
Date: Sat, 25 Jun 2022 11:54:43 -0700
|
||||
Subject: [PATCH] Shell-quote filenames when invoking LESSCLOSE.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/gwsw/less/commit/c6ac6de49698be84d264a0c4c0c40bb870b10144]
|
||||
CVE: CVE-2022-48624
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
filename.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/filename.c b/filename.c
|
||||
index 5824e385..dff20c08 100644
|
||||
--- a/filename.c
|
||||
+++ b/filename.c
|
||||
@@ -972,6 +972,8 @@ close_altfile(altfilename, filename)
|
||||
{
|
||||
#if HAVE_POPEN
|
||||
char *lessclose;
|
||||
+ char *qfilename;
|
||||
+ char *qaltfilename;
|
||||
FILE *fd;
|
||||
char *cmd;
|
||||
int len;
|
||||
@@ -986,9 +988,13 @@ close_altfile(altfilename, filename)
|
||||
error("LESSCLOSE ignored; must contain no more than 2 %%s", NULL_PARG);
|
||||
return;
|
||||
}
|
||||
- len = (int) (strlen(lessclose) + strlen(filename) + strlen(altfilename) + 2);
|
||||
+ qfilename = shell_quote(filename);
|
||||
+ qaltfilename = shell_quote(altfilename);
|
||||
+ len = (int) (strlen(lessclose) + strlen(qfilename) + strlen(qaltfilename) + 2);
|
||||
cmd = (char *) ecalloc(len, sizeof(char));
|
||||
- SNPRINTF2(cmd, len, lessclose, filename, altfilename);
|
||||
+ SNPRINTF2(cmd, len, lessclose, qfilename, qaltfilename);
|
||||
+ free(qaltfilename);
|
||||
+ free(qfilename);
|
||||
fd = shellcmd(cmd);
|
||||
free(cmd);
|
||||
if (fd != NULL)
|
||||
@@ -26,6 +26,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
|
||||
DEPENDS = "ncurses"
|
||||
|
||||
SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
|
||||
file://CVE-2022-48624.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "4ad4408b06d7a6626a055cb453f36819"
|
||||
|
||||
59
meta/recipes-extended/pam/libpam/CVE-2024-22365.patch
Normal file
59
meta/recipes-extended/pam/libpam/CVE-2024-22365.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From 031bb5a5d0d950253b68138b498dc93be69a64cb Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Gerstner <matthias.gerstner@suse.de>
|
||||
Date: Wed, 27 Dec 2023 14:01:59 +0100
|
||||
Subject: [PATCH] pam_namespace: protect_dir(): use O_DIRECTORY to prevent
|
||||
local DoS situations
|
||||
|
||||
Without O_DIRECTORY the path crawling logic is subject to e.g. FIFOs
|
||||
being placed in user controlled directories, causing the PAM module to
|
||||
block indefinitely during `openat()`.
|
||||
|
||||
Pass O_DIRECTORY to cause the `openat()` to fail if the path does not
|
||||
refer to a directory.
|
||||
|
||||
With this the check whether the final path element is a directory
|
||||
becomes unnecessary, drop it.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/031bb5a5d0d950253b68138b498dc93be69a64cb]
|
||||
CVE: CVE-2024-22365
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
modules/pam_namespace/pam_namespace.c | 18 +-----------------
|
||||
1 file changed, 1 insertion(+), 17 deletions(-)
|
||||
|
||||
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
|
||||
index 2528cff86..f72d67189 100644
|
||||
--- a/modules/pam_namespace/pam_namespace.c
|
||||
+++ b/modules/pam_namespace/pam_namespace.c
|
||||
@@ -1201,7 +1201,7 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir,
|
||||
int dfd = AT_FDCWD;
|
||||
int dfd_next;
|
||||
int save_errno;
|
||||
- int flags = O_RDONLY;
|
||||
+ int flags = O_RDONLY | O_DIRECTORY;
|
||||
int rv = -1;
|
||||
struct stat st;
|
||||
|
||||
@@ -1255,22 +1255,6 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir,
|
||||
rv = openat(dfd, dir, flags);
|
||||
}
|
||||
|
||||
- if (rv != -1) {
|
||||
- if (fstat(rv, &st) != 0) {
|
||||
- save_errno = errno;
|
||||
- close(rv);
|
||||
- rv = -1;
|
||||
- errno = save_errno;
|
||||
- goto error;
|
||||
- }
|
||||
- if (!S_ISDIR(st.st_mode)) {
|
||||
- close(rv);
|
||||
- errno = ENOTDIR;
|
||||
- rv = -1;
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (flags & O_NOFOLLOW) {
|
||||
/* we are inside user-owned dir - protect */
|
||||
if (protect_mount(rv, p, idata) == -1) {
|
||||
@@ -24,6 +24,7 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux
|
||||
file://pam-security-abstract-securetty-handling.patch \
|
||||
file://pam-unix-nullok-secure.patch \
|
||||
file://crypt_configure.patch \
|
||||
file://CVE-2024-22365.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165"
|
||||
|
||||
@@ -6,7 +6,7 @@ SECTION = "base"
|
||||
LICENSE = "PD & BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
|
||||
|
||||
PV = "2023d"
|
||||
PV = "2024a"
|
||||
|
||||
SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
|
||||
http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
|
||||
@@ -14,5 +14,5 @@ SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz
|
||||
|
||||
UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
|
||||
|
||||
SRC_URI[tzcode.sha256sum] = "e9a5f9e118886d2de92b62bb05510a28cc6c058d791c93bd6b84d3292c3c161e"
|
||||
SRC_URI[tzdata.sha256sum] = "dbca21970b0a8b8c0ceceec1d7b91fa903be0f6eca5ae732b5329672232a08f3"
|
||||
SRC_URI[tzcode.sha256sum] = "80072894adff5a458f1d143e16e4ca1d8b2a122c9c5399da482cb68cba6a1ff8"
|
||||
SRC_URI[tzdata.sha256sum] = "0d0434459acbd2059a7a8da1f3304a84a86591f6ed69c6248fffa502b6edffe3"
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
From 9e2ecb2af8302dedc49cb6a63ebe063c58a9e7e3 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu, 14 Dec 2023 11:29:49 +1000
|
||||
Subject: [PATCH] dix: allocate enough space for logical button maps
|
||||
|
||||
Both DeviceFocusEvent and the XIQueryPointer reply contain a bit for
|
||||
each logical button currently down. Since buttons can be arbitrarily mapped
|
||||
to anything up to 255 make sure we have enough bits for the maximum mapping.
|
||||
|
||||
CVE-2023-6816, ZDI-CAN-22664, ZDI-CAN-22665
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/9e2ecb2af8302dedc49cb6a63ebe063c58a9e7e3]
|
||||
CVE: CVE-2023-6816
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
Xi/xiquerypointer.c | 3 +--
|
||||
dix/enterleave.c | 5 +++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c
|
||||
index 5b77b1a444..2b05ac5f39 100644
|
||||
--- a/Xi/xiquerypointer.c
|
||||
+++ b/Xi/xiquerypointer.c
|
||||
@@ -149,8 +149,7 @@ ProcXIQueryPointer(ClientPtr client)
|
||||
if (pDev->button) {
|
||||
int i;
|
||||
|
||||
- rep.buttons_len =
|
||||
- bytes_to_int32(bits_to_bytes(pDev->button->numButtons));
|
||||
+ rep.buttons_len = bytes_to_int32(bits_to_bytes(256)); /* button map up to 255 */
|
||||
rep.length += rep.buttons_len;
|
||||
buttons = calloc(rep.buttons_len, 4);
|
||||
if (!buttons)
|
||||
diff --git a/dix/enterleave.c b/dix/enterleave.c
|
||||
index 867ec74363..ded8679d76 100644
|
||||
--- a/dix/enterleave.c
|
||||
+++ b/dix/enterleave.c
|
||||
@@ -784,8 +784,9 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
|
||||
|
||||
mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER);
|
||||
|
||||
- /* XI 2 event */
|
||||
- btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0;
|
||||
+ /* XI 2 event contains the logical button map - maps are CARD8
|
||||
+ * so we need 256 bits for the possibly maximum mapping */
|
||||
+ btlen = (mouse->button) ? bits_to_bytes(256) : 0;
|
||||
btlen = bytes_to_int32(btlen);
|
||||
len = sizeof(xXIFocusInEvent) + btlen * 4;
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From ece23be888a93b741aa1209d1dbf64636109d6a5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Mon, 18 Dec 2023 14:27:50 +1000
|
||||
Subject: [PATCH] dix: Allocate sufficient xEvents for our DeviceStateNotify
|
||||
|
||||
If a device has both a button class and a key class and numButtons is
|
||||
zero, we can get an OOB write due to event under-allocation.
|
||||
|
||||
This function seems to assume a device has either keys or buttons, not
|
||||
both. It has two virtually identical code paths, both of which assume
|
||||
they're applying to the first event in the sequence.
|
||||
|
||||
A device with both a key and button class triggered a logic bug - only
|
||||
one xEvent was allocated but the deviceStateNotify pointer was pushed on
|
||||
once per type. So effectively this logic code:
|
||||
|
||||
int count = 1;
|
||||
if (button && nbuttons > 32) count++;
|
||||
if (key && nbuttons > 0) count++;
|
||||
if (key && nkeys > 32) count++; // this is basically always true
|
||||
// count is at 2 for our keys + zero button device
|
||||
|
||||
ev = alloc(count * sizeof(xEvent));
|
||||
FixDeviceStateNotify(ev);
|
||||
if (button)
|
||||
FixDeviceStateNotify(ev++);
|
||||
if (key)
|
||||
FixDeviceStateNotify(ev++); // santa drops into the wrong chimney here
|
||||
|
||||
If the device has more than 3 valuators, the OOB is pushed back - we're
|
||||
off by one so it will happen when the last deviceValuator event is
|
||||
written instead.
|
||||
|
||||
Fix this by allocating the maximum number of events we may allocate.
|
||||
Note that the current behavior is not protocol-correct anyway, this
|
||||
patch fixes only the allocation issue.
|
||||
|
||||
Note that this issue does not trigger if the device has at least one
|
||||
button. While the server does not prevent a button class with zero
|
||||
buttons, it is very unlikely.
|
||||
|
||||
CVE-2024-0229, ZDI-CAN-22678
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/ece23be888a93b741aa1209d1dbf64636109d6a5]
|
||||
CVE: CVE-2024-0229
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
dix/enterleave.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dix/enterleave.c b/dix/enterleave.c
|
||||
index ded8679d76..17964b00a4 100644
|
||||
--- a/dix/enterleave.c
|
||||
+++ b/dix/enterleave.c
|
||||
@@ -675,7 +675,8 @@ static void
|
||||
DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
|
||||
{
|
||||
int evcount = 1;
|
||||
- deviceStateNotify *ev, *sev;
|
||||
+ deviceStateNotify sev[6 + (MAX_VALUATORS + 2)/3];
|
||||
+ deviceStateNotify *ev;
|
||||
deviceKeyStateNotify *kev;
|
||||
deviceButtonStateNotify *bev;
|
||||
|
||||
@@ -714,7 +715,7 @@ DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
|
||||
}
|
||||
}
|
||||
|
||||
- sev = ev = xallocarray(evcount, sizeof(xEvent));
|
||||
+ ev = sev;
|
||||
FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
|
||||
|
||||
if (b != NULL) {
|
||||
@@ -770,7 +771,6 @@ DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
|
||||
|
||||
DeliverEventsToWindow(dev, win, (xEvent *) sev, evcount,
|
||||
DeviceStateNotifyMask, NullGrab);
|
||||
- free(sev);
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
From 219c54b8a3337456ce5270ded6a67bcde53553d5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Mon, 18 Dec 2023 12:26:20 +1000
|
||||
Subject: [PATCH] dix: fix DeviceStateNotify event calculation
|
||||
|
||||
The previous code only made sense if one considers buttons and keys to
|
||||
be mutually exclusive on a device. That is not necessarily true, causing
|
||||
a number of issues.
|
||||
|
||||
This function allocates and fills in the number of xEvents we need to
|
||||
send the device state down the wire. This is split across multiple
|
||||
32-byte devices including one deviceStateNotify event and optional
|
||||
deviceKeyStateNotify, deviceButtonStateNotify and (possibly multiple)
|
||||
deviceValuator events.
|
||||
|
||||
The previous behavior would instead compose a sequence
|
||||
of [state, buttonstate, state, keystate, valuator...]. This is not
|
||||
protocol correct, and on top of that made the code extremely convoluted.
|
||||
|
||||
Fix this by streamlining: add both button and key into the deviceStateNotify
|
||||
and then append the key state and button state, followed by the
|
||||
valuators. Finally, the deviceValuator events contain up to 6 valuators
|
||||
per event but we only ever sent through 3 at a time. Let's double that
|
||||
troughput.
|
||||
|
||||
CVE-2024-0229, ZDI-CAN-22678
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/219c54b8a3337456ce5270ded6a67bcde53553d5]
|
||||
CVE: CVE-2024-0229
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
dix/enterleave.c | 121 ++++++++++++++++++++---------------------------
|
||||
1 file changed, 52 insertions(+), 69 deletions(-)
|
||||
|
||||
diff --git a/dix/enterleave.c b/dix/enterleave.c
|
||||
index 17964b00a4..7b7ba1098b 100644
|
||||
--- a/dix/enterleave.c
|
||||
+++ b/dix/enterleave.c
|
||||
@@ -615,9 +615,15 @@ FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
|
||||
|
||||
ev->type = DeviceValuator;
|
||||
ev->deviceid = dev->id;
|
||||
- ev->num_valuators = nval < 3 ? nval : 3;
|
||||
+ ev->num_valuators = nval < 6 ? nval : 6;
|
||||
ev->first_valuator = first;
|
||||
switch (ev->num_valuators) {
|
||||
+ case 6:
|
||||
+ ev->valuator2 = v->axisVal[first + 5];
|
||||
+ case 5:
|
||||
+ ev->valuator2 = v->axisVal[first + 4];
|
||||
+ case 4:
|
||||
+ ev->valuator2 = v->axisVal[first + 3];
|
||||
case 3:
|
||||
ev->valuator2 = v->axisVal[first + 2];
|
||||
case 2:
|
||||
@@ -626,7 +632,6 @@ FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
|
||||
ev->valuator0 = v->axisVal[first];
|
||||
break;
|
||||
}
|
||||
- first += ev->num_valuators;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -646,7 +651,7 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
|
||||
ev->num_buttons = b->numButtons;
|
||||
memcpy((char *) ev->buttons, (char *) b->down, 4);
|
||||
}
|
||||
- else if (k) {
|
||||
+ if (k) {
|
||||
ev->classes_reported |= (1 << KeyClass);
|
||||
ev->num_keys = k->xkbInfo->desc->max_key_code -
|
||||
k->xkbInfo->desc->min_key_code;
|
||||
@@ -670,15 +675,26 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
+/**
|
||||
+ * The device state notify event is split across multiple 32-byte events.
|
||||
+ * The first one contains the first 32 button state bits, the first 32
|
||||
+ * key state bits, and the first 3 valuator values.
|
||||
+ *
|
||||
+ * If a device has more than that, the server sends out:
|
||||
+ * - one deviceButtonStateNotify for buttons 32 and above
|
||||
+ * - one deviceKeyStateNotify for keys 32 and above
|
||||
+ * - one deviceValuator event per 6 valuators above valuator 4
|
||||
+ *
|
||||
+ * All events but the last one have the deviceid binary ORed with MORE_EVENTS,
|
||||
+ */
|
||||
static void
|
||||
DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
|
||||
{
|
||||
+ /* deviceStateNotify, deviceKeyStateNotify, deviceButtonStateNotify
|
||||
+ * and one deviceValuator for each 6 valuators */
|
||||
+ deviceStateNotify sev[3 + (MAX_VALUATORS + 6)/6];
|
||||
int evcount = 1;
|
||||
- deviceStateNotify sev[6 + (MAX_VALUATORS + 2)/3];
|
||||
- deviceStateNotify *ev;
|
||||
- deviceKeyStateNotify *kev;
|
||||
- deviceButtonStateNotify *bev;
|
||||
+ deviceStateNotify *ev = sev;
|
||||
|
||||
KeyClassPtr k;
|
||||
ButtonClassPtr b;
|
||||
@@ -691,82 +707,49 @@ DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
|
||||
|
||||
if ((b = dev->button) != NULL) {
|
||||
nbuttons = b->numButtons;
|
||||
- if (nbuttons > 32)
|
||||
+ if (nbuttons > 32) /* first 32 are encoded in deviceStateNotify */
|
||||
evcount++;
|
||||
}
|
||||
if ((k = dev->key) != NULL) {
|
||||
nkeys = k->xkbInfo->desc->max_key_code - k->xkbInfo->desc->min_key_code;
|
||||
- if (nkeys > 32)
|
||||
+ if (nkeys > 32) /* first 32 are encoded in deviceStateNotify */
|
||||
evcount++;
|
||||
- if (nbuttons > 0) {
|
||||
- evcount++;
|
||||
- }
|
||||
}
|
||||
if ((v = dev->valuator) != NULL) {
|
||||
nval = v->numAxes;
|
||||
-
|
||||
- if (nval > 3)
|
||||
- evcount++;
|
||||
- if (nval > 6) {
|
||||
- if (!(k && b))
|
||||
- evcount++;
|
||||
- if (nval > 9)
|
||||
- evcount += ((nval - 7) / 3);
|
||||
- }
|
||||
+ /* first three are encoded in deviceStateNotify, then
|
||||
+ * it's 6 per deviceValuator event */
|
||||
+ evcount += ((nval - 3) + 6)/6;
|
||||
}
|
||||
|
||||
- ev = sev;
|
||||
- FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
|
||||
-
|
||||
- if (b != NULL) {
|
||||
- FixDeviceStateNotify(dev, ev++, NULL, b, v, first);
|
||||
- first += 3;
|
||||
- nval -= 3;
|
||||
- if (nbuttons > 32) {
|
||||
- (ev - 1)->deviceid |= MORE_EVENTS;
|
||||
- bev = (deviceButtonStateNotify *) ev++;
|
||||
- bev->type = DeviceButtonStateNotify;
|
||||
- bev->deviceid = dev->id;
|
||||
- memcpy((char *) &bev->buttons[4], (char *) &b->down[4],
|
||||
- DOWN_LENGTH - 4);
|
||||
- }
|
||||
- if (nval > 0) {
|
||||
- (ev - 1)->deviceid |= MORE_EVENTS;
|
||||
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
|
||||
- first += 3;
|
||||
- nval -= 3;
|
||||
- }
|
||||
+ BUG_RETURN(evcount <= ARRAY_SIZE(sev));
|
||||
+
|
||||
+ FixDeviceStateNotify(dev, ev, k, b, v, first);
|
||||
+
|
||||
+ if (b != NULL && nbuttons > 32) {
|
||||
+ deviceButtonStateNotify *bev = (deviceButtonStateNotify *) ++ev;
|
||||
+ (ev - 1)->deviceid |= MORE_EVENTS;
|
||||
+ bev->type = DeviceButtonStateNotify;
|
||||
+ bev->deviceid = dev->id;
|
||||
+ memcpy((char *) &bev->buttons[4], (char *) &b->down[4],
|
||||
+ DOWN_LENGTH - 4);
|
||||
}
|
||||
|
||||
- if (k != NULL) {
|
||||
- FixDeviceStateNotify(dev, ev++, k, NULL, v, first);
|
||||
- first += 3;
|
||||
- nval -= 3;
|
||||
- if (nkeys > 32) {
|
||||
- (ev - 1)->deviceid |= MORE_EVENTS;
|
||||
- kev = (deviceKeyStateNotify *) ev++;
|
||||
- kev->type = DeviceKeyStateNotify;
|
||||
- kev->deviceid = dev->id;
|
||||
- memmove((char *) &kev->keys[0], (char *) &k->down[4], 28);
|
||||
- }
|
||||
- if (nval > 0) {
|
||||
- (ev - 1)->deviceid |= MORE_EVENTS;
|
||||
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
|
||||
- first += 3;
|
||||
- nval -= 3;
|
||||
- }
|
||||
+ if (k != NULL && nkeys > 32) {
|
||||
+ deviceKeyStateNotify *kev = (deviceKeyStateNotify *) ++ev;
|
||||
+ (ev - 1)->deviceid |= MORE_EVENTS;
|
||||
+ kev->type = DeviceKeyStateNotify;
|
||||
+ kev->deviceid = dev->id;
|
||||
+ memmove((char *) &kev->keys[0], (char *) &k->down[4], 28);
|
||||
}
|
||||
|
||||
+ first = 3;
|
||||
+ nval -= 3;
|
||||
while (nval > 0) {
|
||||
- FixDeviceStateNotify(dev, ev++, NULL, NULL, v, first);
|
||||
- first += 3;
|
||||
- nval -= 3;
|
||||
- if (nval > 0) {
|
||||
- (ev - 1)->deviceid |= MORE_EVENTS;
|
||||
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
|
||||
- first += 3;
|
||||
- nval -= 3;
|
||||
- }
|
||||
+ ev->deviceid |= MORE_EVENTS;
|
||||
+ FixDeviceValuator(dev, (deviceValuator *) ++ev, v, first);
|
||||
+ first += 6;
|
||||
+ nval -= 6;
|
||||
}
|
||||
|
||||
DeliverEventsToWindow(dev, win, (xEvent *) sev, evcount,
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From df3c65706eb169d5938df0052059f3e0d5981b74 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu, 21 Dec 2023 13:48:10 +1000
|
||||
Subject: [PATCH] Xi: when creating a new ButtonClass, set the number of
|
||||
buttons
|
||||
|
||||
There's a racy sequence where a master device may copy the button class
|
||||
from the slave, without ever initializing numButtons. This leads to a
|
||||
device with zero buttons but a button class which is invalid.
|
||||
|
||||
Let's copy the numButtons value from the source - by definition if we
|
||||
don't have a button class yet we do not have any other slave devices
|
||||
with more than this number of buttons anyway.
|
||||
|
||||
CVE-2024-0229, ZDI-CAN-22678
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/df3c65706eb169d5938df0052059f3e0d5981b74]
|
||||
CVE: CVE-2024-0229
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
Xi/exevents.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Xi/exevents.c b/Xi/exevents.c
|
||||
index 54ea11a938..e161714682 100644
|
||||
--- a/Xi/exevents.c
|
||||
+++ b/Xi/exevents.c
|
||||
@@ -605,6 +605,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
|
||||
to->button = calloc(1, sizeof(ButtonClassRec));
|
||||
if (!to->button)
|
||||
FatalError("[Xi] no memory for class shift.\n");
|
||||
+ to->button->numButtons = from->button->numButtons;
|
||||
}
|
||||
else
|
||||
classes->button = NULL;
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 37539cb0bfe4ed96d4499bf371e6b1a474a740fe Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu, 21 Dec 2023 14:10:11 +1000
|
||||
Subject: [PATCH] Xi: require a pointer and keyboard device for
|
||||
XIAttachToMaster
|
||||
|
||||
If we remove a master device and specify which other master devices
|
||||
attached slaves should be returned to, enforce that those two are
|
||||
indeeed a pointer and a keyboard.
|
||||
|
||||
Otherwise we can try to attach the keyboards to pointers and vice versa,
|
||||
leading to possible crashes later.
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/37539cb0bfe4ed96d4499bf371e6b1a474a740fe]
|
||||
CVE: CVE-2024-0229
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
Xi/xichangehierarchy.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
|
||||
index 504defe566..d2d985848d 100644
|
||||
--- a/Xi/xichangehierarchy.c
|
||||
+++ b/Xi/xichangehierarchy.c
|
||||
@@ -270,7 +270,7 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
|
||||
- if (!IsMaster(newptr)) {
|
||||
+ if (!IsMaster(newptr) || !IsPointerDevice(newptr)) {
|
||||
client->errorValue = r->return_pointer;
|
||||
rc = BadDevice;
|
||||
goto unwind;
|
||||
@@ -281,7 +281,7 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
|
||||
- if (!IsMaster(newkeybd)) {
|
||||
+ if (!IsMaster(newkeybd) || !IsKeyboardDevice(newkeybd)) {
|
||||
client->errorValue = r->return_keyboard;
|
||||
rc = BadDevice;
|
||||
goto unwind;
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
From e5e8586a12a3ec915673edffa10dc8fe5e15dac3 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Wed, 6 Dec 2023 12:09:41 +0100
|
||||
Subject: [PATCH] glx: Call XACE hooks on the GLX buffer
|
||||
|
||||
The XSELINUX code will label resources at creation by checking the
|
||||
access mode. When the access mode is DixCreateAccess, it will call the
|
||||
function to label the new resource SELinuxLabelResource().
|
||||
|
||||
However, GLX buffers do not go through the XACE hooks when created,
|
||||
hence leaving the resource actually unlabeled.
|
||||
|
||||
When, later, the client tries to create another resource using that
|
||||
drawable (like a GC for example), the XSELINUX code would try to use
|
||||
the security ID of that object which has never been labeled, get a NULL
|
||||
pointer and crash when checking whether the requested permissions are
|
||||
granted for subject security ID.
|
||||
|
||||
To avoid the issue, make sure to call the XACE hooks when creating the
|
||||
GLX buffers.
|
||||
|
||||
Credit goes to Donn Seeley <donn@xmission.com> for providing the patch.
|
||||
|
||||
CVE-2024-0408
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/e5e8586a12a3ec915673edffa10dc8fe5e15dac3]
|
||||
CVE: CVE-2024-0408
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
glx/glxcmds.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
|
||||
index fc26a2e345..1e46d0c723 100644
|
||||
--- a/glx/glxcmds.c
|
||||
+++ b/glx/glxcmds.c
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "indirect_util.h"
|
||||
#include "protocol-versions.h"
|
||||
#include "glxvndabi.h"
|
||||
+#include "xace.h"
|
||||
|
||||
static char GLXServerVendorName[] = "SGI";
|
||||
|
||||
@@ -1392,6 +1393,13 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
|
||||
if (!pPixmap)
|
||||
return BadAlloc;
|
||||
|
||||
+ err = XaceHook(XACE_RESOURCE_ACCESS, client, glxDrawableId, RT_PIXMAP,
|
||||
+ pPixmap, RT_NONE, NULL, DixCreateAccess);
|
||||
+ if (err != Success) {
|
||||
+ (*pGlxScreen->pScreen->DestroyPixmap) (pPixmap);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
/* Assign the pixmap the same id as the pbuffer and add it as a
|
||||
* resource so it and the DRI2 drawable will be reclaimed when the
|
||||
* pbuffer is destroyed. */
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Wed, 6 Dec 2023 11:51:56 +0100
|
||||
Subject: [PATCH] ephyr,xwayland: Use the proper private key for cursor
|
||||
|
||||
The cursor in DIX is actually split in two parts, the cursor itself and
|
||||
the cursor bits, each with their own devPrivates.
|
||||
|
||||
The cursor itself includes the cursor bits, meaning that the cursor bits
|
||||
devPrivates in within structure of the cursor.
|
||||
|
||||
Both Xephyr and Xwayland were using the private key for the cursor bits
|
||||
to store the data for the cursor, and when using XSELINUX which comes
|
||||
with its own special devPrivates, the data stored in that cursor bits'
|
||||
devPrivates would interfere with the XSELINUX devPrivates data and the
|
||||
SELINUX security ID would point to some other unrelated data, causing a
|
||||
crash in the XSELINUX code when trying to (re)use the security ID.
|
||||
|
||||
CVE-2024-0409
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7]
|
||||
CVE: CVE-2024-0409
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
hw/kdrive/ephyr/ephyrcursor.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/kdrive/ephyr/ephyrcursor.c b/hw/kdrive/ephyr/ephyrcursor.c
|
||||
index f991899..3f192d0 100644
|
||||
--- a/hw/kdrive/ephyr/ephyrcursor.c
|
||||
+++ b/hw/kdrive/ephyr/ephyrcursor.c
|
||||
@@ -246,7 +246,7 @@ miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
|
||||
Bool
|
||||
ephyrCursorInit(ScreenPtr screen)
|
||||
{
|
||||
- if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR_BITS,
|
||||
+ if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR,
|
||||
sizeof(ephyrCursorRec)))
|
||||
return FALSE;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
From 4a5e9b1895627d40d26045bd0b7ef3dce503cbd1 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu, 4 Jan 2024 10:01:24 +1000
|
||||
Subject: [PATCH] Xi: flush hierarchy events after adding/removing master
|
||||
devices
|
||||
|
||||
The `XISendDeviceHierarchyEvent()` function allocates space to store up
|
||||
to `MAXDEVICES` (256) `xXIHierarchyInfo` structures in `info`.
|
||||
|
||||
If a device with a given ID was removed and a new device with the same
|
||||
ID added both in the same operation, the single device ID will lead to
|
||||
two info structures being written to `info`.
|
||||
|
||||
Since this case can occur for every device ID at once, a total of two
|
||||
times `MAXDEVICES` info structures might be written to the allocation.
|
||||
|
||||
To avoid it, once one add/remove master is processed, send out the
|
||||
device hierarchy event for the current state and continue. That event
|
||||
thus only ever has exactly one of either added/removed in it (and
|
||||
optionally slave attached/detached).
|
||||
|
||||
CVE-2024-21885, ZDI-CAN-22744
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/4a5e9b1895627d40d26045bd0b7ef3dce503cbd1]
|
||||
CVE: CVE-2024-21885
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
Xi/xichangehierarchy.c | 27 ++++++++++++++++++++++-----
|
||||
1 file changed, 22 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
|
||||
index d2d985848d..72d00451e3 100644
|
||||
--- a/Xi/xichangehierarchy.c
|
||||
+++ b/Xi/xichangehierarchy.c
|
||||
@@ -416,6 +416,11 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
size_t len; /* length of data remaining in request */
|
||||
int rc = Success;
|
||||
int flags[MAXDEVICES] = { 0 };
|
||||
+ enum {
|
||||
+ NO_CHANGE,
|
||||
+ FLUSH,
|
||||
+ CHANGED,
|
||||
+ } changes = NO_CHANGE;
|
||||
|
||||
REQUEST(xXIChangeHierarchyReq);
|
||||
REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq);
|
||||
@@ -465,8 +470,9 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
rc = add_master(client, c, flags);
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
- }
|
||||
+ changes = FLUSH;
|
||||
break;
|
||||
+ }
|
||||
case XIRemoveMaster:
|
||||
{
|
||||
xXIRemoveMasterInfo *r = (xXIRemoveMasterInfo *) any;
|
||||
@@ -475,8 +481,9 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
rc = remove_master(client, r, flags);
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
- }
|
||||
+ changes = FLUSH;
|
||||
break;
|
||||
+ }
|
||||
case XIDetachSlave:
|
||||
{
|
||||
xXIDetachSlaveInfo *c = (xXIDetachSlaveInfo *) any;
|
||||
@@ -485,8 +492,9 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
rc = detach_slave(client, c, flags);
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
- }
|
||||
+ changes = CHANGED;
|
||||
break;
|
||||
+ }
|
||||
case XIAttachSlave:
|
||||
{
|
||||
xXIAttachSlaveInfo *c = (xXIAttachSlaveInfo *) any;
|
||||
@@ -495,16 +503,25 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
rc = attach_slave(client, c, flags);
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
+ changes = CHANGED;
|
||||
+ break;
|
||||
}
|
||||
+ default:
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (changes == FLUSH) {
|
||||
+ XISendDeviceHierarchyEvent(flags);
|
||||
+ memset(flags, 0, sizeof(flags));
|
||||
+ changes = NO_CHANGE;
|
||||
+ }
|
||||
+
|
||||
len -= any->length * 4;
|
||||
any = (xXIAnyHierarchyChangeInfo *) ((char *) any + any->length * 4);
|
||||
}
|
||||
|
||||
unwind:
|
||||
-
|
||||
- XISendDeviceHierarchyEvent(flags);
|
||||
+ if (changes != NO_CHANGE)
|
||||
+ XISendDeviceHierarchyEvent(flags);
|
||||
return rc;
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
From bc1fdbe46559dd947674375946bbef54dd0ce36b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
|
||||
Date: Fri, 22 Dec 2023 18:28:31 +0100
|
||||
Subject: [PATCH] Xi: do not keep linked list pointer during recursion
|
||||
|
||||
The `DisableDevice()` function is called whenever an enabled device
|
||||
is disabled and it moves the device from the `inputInfo.devices` linked
|
||||
list to the `inputInfo.off_devices` linked list.
|
||||
|
||||
However, its link/unlink operation has an issue during the recursive
|
||||
call to `DisableDevice()` due to the `prev` pointer pointing to a
|
||||
removed device.
|
||||
|
||||
This issue leads to a length mismatch between the total number of
|
||||
devices and the number of device in the list, leading to a heap
|
||||
overflow and, possibly, to local privilege escalation.
|
||||
|
||||
Simplify the code that checked whether the device passed to
|
||||
`DisableDevice()` was in `inputInfo.devices` or not and find the
|
||||
previous device after the recursion.
|
||||
|
||||
CVE-2024-21886, ZDI-CAN-22840
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/bc1fdbe46559dd947674375946bbef54dd0ce36b]
|
||||
CVE: CVE-2024-21886
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
dix/devices.c | 15 ++++++++++++---
|
||||
1 file changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dix/devices.c b/dix/devices.c
|
||||
index dca98c8d1b..389d28a23c 100644
|
||||
--- a/dix/devices.c
|
||||
+++ b/dix/devices.c
|
||||
@@ -453,14 +453,20 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||
{
|
||||
DeviceIntPtr *prev, other;
|
||||
BOOL enabled;
|
||||
+ BOOL dev_in_devices_list = FALSE;
|
||||
int flags[MAXDEVICES] = { 0 };
|
||||
|
||||
if (!dev->enabled)
|
||||
return TRUE;
|
||||
|
||||
- for (prev = &inputInfo.devices;
|
||||
- *prev && (*prev != dev); prev = &(*prev)->next);
|
||||
- if (*prev != dev)
|
||||
+ for (other = inputInfo.devices; other; other = other->next) {
|
||||
+ if (other == dev) {
|
||||
+ dev_in_devices_list = TRUE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!dev_in_devices_list)
|
||||
return FALSE;
|
||||
|
||||
TouchEndPhysicallyActiveTouches(dev);
|
||||
@@ -511,6 +517,9 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||
LeaveWindow(dev);
|
||||
SetFocusOut(dev);
|
||||
|
||||
+ for (prev = &inputInfo.devices;
|
||||
+ *prev && (*prev != dev); prev = &(*prev)->next);
|
||||
+
|
||||
*prev = dev->next;
|
||||
dev->next = inputInfo.off_devices;
|
||||
inputInfo.off_devices = dev;
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 26769aa71fcbe0a8403b7fb13b7c9010cc07c3a8 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Fri, 5 Jan 2024 09:40:27 +1000
|
||||
Subject: [PATCH] dix: when disabling a master, float disabled slaved devices
|
||||
too
|
||||
|
||||
Disabling a master device floats all slave devices but we didn't do this
|
||||
to already-disabled slave devices. As a result those devices kept their
|
||||
reference to the master device resulting in access to already freed
|
||||
memory if the master device was removed before the corresponding slave
|
||||
device.
|
||||
|
||||
And to match this behavior, also forcibly reset that pointer during
|
||||
CloseDownDevices().
|
||||
|
||||
Related to CVE-2024-21886, ZDI-CAN-22840
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/26769aa71fcbe0a8403b7fb13b7c9010cc07c3a8]
|
||||
CVE: CVE-2024-21886
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
dix/devices.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/dix/devices.c b/dix/devices.c
|
||||
index 389d28a23c..84a6406d13 100644
|
||||
--- a/dix/devices.c
|
||||
+++ b/dix/devices.c
|
||||
@@ -483,6 +483,13 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||
flags[other->id] |= XISlaveDetached;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ for (other = inputInfo.off_devices; other; other = other->next) {
|
||||
+ if (!IsMaster(other) && GetMaster(other, MASTER_ATTACHED) == dev) {
|
||||
+ AttachDevice(NULL, other, NULL);
|
||||
+ flags[other->id] |= XISlaveDetached;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else {
|
||||
for (other = inputInfo.devices; other; other = other->next) {
|
||||
@@ -1088,6 +1095,11 @@ CloseDownDevices(void)
|
||||
dev->master = NULL;
|
||||
}
|
||||
|
||||
+ for (dev = inputInfo.off_devices; dev; dev = dev->next) {
|
||||
+ if (!IsMaster(dev) && !IsFloating(dev))
|
||||
+ dev->master = NULL;
|
||||
+ }
|
||||
+
|
||||
CloseDeviceList(&inputInfo.devices);
|
||||
CloseDeviceList(&inputInfo.off_devices);
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -20,6 +20,16 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
|
||||
file://CVE-2023-5380.patch \
|
||||
file://CVE-2023-6377.patch \
|
||||
file://CVE-2023-6478.patch \
|
||||
file://CVE-2023-6816.patch \
|
||||
file://CVE-2024-0229-1.patch \
|
||||
file://CVE-2024-0229-2.patch \
|
||||
file://CVE-2024-0229-3.patch \
|
||||
file://CVE-2024-0229-4.patch \
|
||||
file://CVE-2024-21885.patch \
|
||||
file://CVE-2024-21886-1.patch \
|
||||
file://CVE-2024-21886-2.patch \
|
||||
file://CVE-2024-0408.patch \
|
||||
file://CVE-2024-0409.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "453fc86aac8c629b3a5b77e8dcca30bf"
|
||||
SRC_URI[sha256sum] = "54b199c9280ff8bf0f73a54a759645bd0eeeda7255d1c99310d5b7595f3ac066"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
# Auto-generated CVE metadata, DO NOT EDIT BY HAND.
|
||||
# Generated at 2023-12-05 04:45:42.561193 for version 5.4.262
|
||||
# Generated at 2024-02-21 03:40:25.997343 for version 5.4.268
|
||||
|
||||
python check_kernel_cve_status_version() {
|
||||
this_version = "5.4.262"
|
||||
this_version = "5.4.268"
|
||||
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))
|
||||
@@ -5281,6 +5281,12 @@ CVE_CHECK_WHITELIST += "CVE-2021-3348"
|
||||
# cpe-stable-backport: Backported in 5.4.139
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-33624"
|
||||
|
||||
# fixed-version: Fixed after version 5.4rc1
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-33630"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.240
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-33631"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.205
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-33655"
|
||||
|
||||
@@ -5810,7 +5816,8 @@ CVE_CHECK_WHITELIST += "CVE-2022-1419"
|
||||
# cpe-stable-backport: Backported in 5.4.208
|
||||
CVE_CHECK_WHITELIST += "CVE-2022-1462"
|
||||
|
||||
# CVE-2022-1508 needs backporting (fixed from 5.15rc1)
|
||||
# fixed-version: only affects 5.11rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2022-1508"
|
||||
|
||||
# fixed-version: only affects 5.7rc5 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2022-1516"
|
||||
@@ -6356,7 +6363,7 @@ CVE_CHECK_WHITELIST += "CVE-2022-3635"
|
||||
# fixed-version: only affects 5.19 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2022-3640"
|
||||
|
||||
# CVE-2022-36402 has no known resolution
|
||||
# CVE-2022-36402 needs backporting (fixed from 6.5)
|
||||
|
||||
# CVE-2022-3642 has no known resolution
|
||||
|
||||
@@ -6585,6 +6592,9 @@ CVE_CHECK_WHITELIST += "CVE-2022-48425"
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2022-48502"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.196
|
||||
CVE_CHECK_WHITELIST += "CVE-2022-48619"
|
||||
|
||||
# fixed-version: Fixed after version 5.0rc1
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-0030"
|
||||
|
||||
@@ -6702,6 +6712,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-1382"
|
||||
# cpe-stable-backport: Backported in 5.4.92
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-1390"
|
||||
|
||||
# CVE-2023-1476 has no known resolution
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.232
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-1513"
|
||||
|
||||
@@ -6873,7 +6885,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-23559"
|
||||
# fixed-version: only affects 5.10rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-23586"
|
||||
|
||||
# CVE-2023-2430 needs backporting (fixed from 6.2rc5)
|
||||
# fixed-version: only affects 5.18rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-2430"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.240
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-2483"
|
||||
@@ -7303,7 +7316,8 @@ CVE_CHECK_WHITELIST += "CVE-2023-45871"
|
||||
# fixed-version: only affects 6.5rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-45898"
|
||||
|
||||
# CVE-2023-4610 needs backporting (fixed from 6.4)
|
||||
# fixed-version: only affects 6.4rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4610"
|
||||
|
||||
# fixed-version: only affects 6.4rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4611"
|
||||
@@ -7313,32 +7327,62 @@ CVE_CHECK_WHITELIST += "CVE-2023-4611"
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4623"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.259
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-46343"
|
||||
|
||||
# fixed-version: only affects 5.10rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-46813"
|
||||
|
||||
# CVE-2023-46862 needs backporting (fixed from 6.6)
|
||||
# cpe-stable-backport: Backported in 5.4.268
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-46838"
|
||||
|
||||
# fixed-version: only affects 5.10rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-46862"
|
||||
|
||||
# CVE-2023-47233 has no known resolution
|
||||
|
||||
# CVE-2023-4732 needs backporting (fixed from 5.14rc1)
|
||||
# fixed-version: only affects 5.7rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4732"
|
||||
|
||||
# CVE-2023-4881 needs backporting (fixed from 6.6rc1)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.257
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-4921"
|
||||
|
||||
# CVE-2023-50431 needs backporting (fixed from 6.8rc1)
|
||||
|
||||
# fixed-version: only affects 6.0rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5090"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.255
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-51042"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.251
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-51043"
|
||||
|
||||
# fixed-version: only affects 5.13rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5158"
|
||||
|
||||
# CVE-2023-51779 needs backporting (fixed from 6.7rc7)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.260
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5178"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.265
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-51780"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.265
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-51781"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.265
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-51782"
|
||||
|
||||
# fixed-version: only affects 5.9rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5197"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.267
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-52340"
|
||||
|
||||
# fixed-version: only affects 6.1rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5345"
|
||||
|
||||
@@ -7348,17 +7392,150 @@ 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)
|
||||
# fixed-version: only affects 6.2rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-5972"
|
||||
|
||||
# CVE-2023-6039 needs backporting (fixed from 6.5rc5)
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6039"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.267
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6040"
|
||||
|
||||
# fixed-version: only affects 6.6rc3 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6111"
|
||||
|
||||
# CVE-2023-6121 needs backporting (fixed from 6.7rc3)
|
||||
# cpe-stable-backport: Backported in 5.4.263
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6121"
|
||||
|
||||
# fixed-version: only affects 5.7rc7 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6176"
|
||||
|
||||
# fixed-version: only affects 6.6rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6200"
|
||||
|
||||
# CVE-2023-6238 has no known resolution
|
||||
|
||||
# CVE-2023-6240 has no known resolution
|
||||
|
||||
# CVE-2023-6270 has no known resolution
|
||||
|
||||
# CVE-2023-6356 has no known resolution
|
||||
|
||||
# fixed-version: only affects 6.1rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6531"
|
||||
|
||||
# CVE-2023-6535 has no known resolution
|
||||
|
||||
# CVE-2023-6536 has no known resolution
|
||||
|
||||
# CVE-2023-6546 needs backporting (fixed from 6.5rc7)
|
||||
|
||||
# CVE-2023-6560 needs backporting (fixed from 6.7rc4)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.266
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6606"
|
||||
|
||||
# CVE-2023-6610 needs backporting (fixed from 6.7rc7)
|
||||
|
||||
# fixed-version: only affects 5.11rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6622"
|
||||
|
||||
# fixed-version: only affects 6.7rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6679"
|
||||
|
||||
# fixed-version: only affects 5.6rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6817"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.268
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6915"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.264
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6931"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.263
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-6932"
|
||||
|
||||
# CVE-2023-7042 has no known resolution
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.235
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-7192"
|
||||
|
||||
# fixed-version: only affects 6.5rc6 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0193"
|
||||
|
||||
# CVE-2024-0340 needs backporting (fixed from 6.4rc6)
|
||||
|
||||
# fixed-version: only affects 6.2rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0443"
|
||||
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0562"
|
||||
|
||||
# CVE-2024-0564 has no known resolution
|
||||
|
||||
# CVE-2024-0565 needs backporting (fixed from 6.7rc6)
|
||||
|
||||
# fixed-version: only affects 6.4rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0582"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.263
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0584"
|
||||
|
||||
# CVE-2024-0607 needs backporting (fixed from 6.7rc2)
|
||||
|
||||
# fixed-version: only affects 5.13rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0639"
|
||||
|
||||
# fixed-version: only affects 5.5rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0641"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.267
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0646"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.4.243
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-0775"
|
||||
|
||||
# CVE-2024-0841 has no known resolution
|
||||
|
||||
# fixed-version: only affects 5.13rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-1085"
|
||||
|
||||
# CVE-2024-1086 needs backporting (fixed from 6.8rc2)
|
||||
|
||||
# CVE-2024-1312 needs backporting (fixed from 6.5rc4)
|
||||
|
||||
# CVE-2024-21803 has no known resolution
|
||||
|
||||
# CVE-2024-22099 has no known resolution
|
||||
|
||||
# CVE-2024-22386 has no known resolution
|
||||
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_WHITELIST += "CVE-2024-22705"
|
||||
|
||||
# CVE-2024-23196 has no known resolution
|
||||
|
||||
# CVE-2024-23307 has no known resolution
|
||||
|
||||
# CVE-2024-23848 has no known resolution
|
||||
|
||||
# CVE-2024-23849 needs backporting (fixed from 6.8rc2)
|
||||
|
||||
# CVE-2024-23850 has no known resolution
|
||||
|
||||
# CVE-2024-23851 has no known resolution
|
||||
|
||||
# CVE-2024-24855 has no known resolution
|
||||
|
||||
# CVE-2024-24857 has no known resolution
|
||||
|
||||
# CVE-2024-24858 has no known resolution
|
||||
|
||||
# CVE-2024-24859 has no known resolution
|
||||
|
||||
# CVE-2024-24860 has no known resolution
|
||||
|
||||
# CVE-2024-24861 has no known resolution
|
||||
|
||||
# CVE-2024-24864 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 ?= "43d5f7eb85acc21ec87ec45b2cae127dad8bf7a4"
|
||||
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
|
||||
SRCREV_machine ?= "1a529c784c773e07e2e7a743cf92d99d5f64b175"
|
||||
SRCREV_meta ?= "c841eec84cf56e6b837f12a359c35c5dfb26da5f"
|
||||
|
||||
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.262"
|
||||
LINUX_VERSION ?= "5.4.268"
|
||||
|
||||
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.262"
|
||||
LINUX_VERSION ?= "5.4.268"
|
||||
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 ?= "7c33fa232f43e9059395bd30e23ef3c16359ba11"
|
||||
SRCREV_machine ?= "42abef1facd8bc8d1f51470493f08d87d0862f8e"
|
||||
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
|
||||
SRCREV_machine_qemuarm ?= "19870769466f545dbfacc448a212acb0dd1324a4"
|
||||
SRCREV_machine ?= "b0ebc762e3ecbc4f0338456767a5901fce805155"
|
||||
SRCREV_meta ?= "c841eec84cf56e6b837f12a359c35c5dfb26da5f"
|
||||
|
||||
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 ?= "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"
|
||||
SRCREV_machine_qemuarm ?= "a1fa03030adf951abcd2fc5c44f6133352e452da"
|
||||
SRCREV_machine_qemuarm64 ?= "31006b756f0b4b686b0fe4fad0f122ad427756de"
|
||||
SRCREV_machine_qemumips ?= "199be2c0b3869c13ea32737a316e51eca1a3cd6f"
|
||||
SRCREV_machine_qemuppc ?= "f1575e20066e5f61c363e7fccdcdf8b8ae23a8f3"
|
||||
SRCREV_machine_qemuriscv64 ?= "698e12267b8f334a5f6a2024e4b9b1f8a95a05ac"
|
||||
SRCREV_machine_qemux86 ?= "698e12267b8f334a5f6a2024e4b9b1f8a95a05ac"
|
||||
SRCREV_machine_qemux86-64 ?= "698e12267b8f334a5f6a2024e4b9b1f8a95a05ac"
|
||||
SRCREV_machine_qemumips64 ?= "a9c1d19cd3d1d0df846cd419cd75cf59995f89eb"
|
||||
SRCREV_machine ?= "698e12267b8f334a5f6a2024e4b9b1f8a95a05ac"
|
||||
SRCREV_meta ?= "c841eec84cf56e6b837f12a359c35c5dfb26da5f"
|
||||
|
||||
# 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.262"
|
||||
LINUX_VERSION ?= "5.4.268"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From f199d1982ef8a6c6d5c06c082d057b8793bcc6aa Mon Sep 17 00:00:00 2001
|
||||
From: Serhei Makarov <serhei@serhei.io>
|
||||
Date: Fri, 21 Jan 2022 18:21:46 -0500
|
||||
Subject: [PATCH] gcc12 c++ compatibility re-tweak for rhel6: use function
|
||||
pointer instead of lambdas instead of ptr_fun<>
|
||||
|
||||
Saving 2 lines in ltrim/rtrim is probably not a good reason to drop
|
||||
compatibility with the RHEL6 system compiler. Actually declaring a
|
||||
named function and passing the function pointer is compatible with
|
||||
everything.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=f199d1982ef8a6c6d5c06c082d057b8793bcc6aa]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
util.cxx | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/util.cxx
|
||||
+++ b/util.cxx
|
||||
@@ -1757,21 +1757,24 @@ flush_to_stream (const string &fname, os
|
||||
return 1; // Failure
|
||||
}
|
||||
|
||||
+int
|
||||
+not_isspace(unsigned char c)
|
||||
+{
|
||||
+ return !std::isspace(c);
|
||||
+}
|
||||
+
|
||||
// trim from start (in place)
|
||||
void
|
||||
ltrim(std::string &s)
|
||||
{
|
||||
- s.erase(s.begin(),
|
||||
- std::find_if(s.begin(), s.end(),
|
||||
- std::not1(std::ptr_fun<int, int>(std::isspace))));
|
||||
+ s.erase(s.begin(), std::find_if(s.begin(), s.end(), not_isspace));
|
||||
}
|
||||
|
||||
// trim from end (in place)
|
||||
void
|
||||
rtrim(std::string &s)
|
||||
{
|
||||
- s.erase(std::find_if(s.rbegin(), s.rend(),
|
||||
- std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
||||
+ s.erase(std::find_if(s.rbegin(), s.rend(), not_isspace).base(), s.end());
|
||||
}
|
||||
|
||||
// trim from both ends (in place)
|
||||
@@ -6,7 +6,9 @@ HOMEPAGE = "https://sourceware.org/systemtap/"
|
||||
|
||||
require systemtap_git.inc
|
||||
|
||||
SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch"
|
||||
SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch \
|
||||
file://0001-gcc12-c-compatibility-re-tweak-for-rhel6-use-functio.patch \
|
||||
"
|
||||
|
||||
DEPENDS = "elfutils"
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ CVE_CHECK_WHITELIST = "CVE-2021-22922 CVE-2021-22923 CVE-2021-22926 CVE-2021-229
|
||||
# This CVE issue affects Windows only Hence whitelisting this CVE
|
||||
CVE_CHECK_WHITELIST += "CVE-2021-22897"
|
||||
|
||||
# This CVE reports that apple had to upgrade curl because of other already reported CVEs
|
||||
CVE_CHECK_WHITELIST += "CVE-2023-42915"
|
||||
|
||||
inherit autotools pkgconfig binconfig multilib_header
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib"
|
||||
|
||||
206
meta/recipes-support/gnutls/gnutls/CVE-2023-5981.patch
Normal file
206
meta/recipes-support/gnutls/gnutls/CVE-2023-5981.patch
Normal file
@@ -0,0 +1,206 @@
|
||||
Backport of:
|
||||
|
||||
From 29d6298d0b04cfff970b993915db71ba3f580b6d Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@gnu.org>
|
||||
Date: Mon, 23 Oct 2023 09:26:57 +0900
|
||||
Subject: [PATCH] auth/rsa_psk: side-step potential side-channel
|
||||
|
||||
This removes branching that depends on secret data, porting changes
|
||||
for regular RSA key exchange from
|
||||
4804febddc2ed958e5ae774de2a8f85edeeff538 and
|
||||
80a6ce8ddb02477cd724cd5b2944791aaddb702a. This also removes the
|
||||
allow_wrong_pms as it was used sorely to control debug output
|
||||
depending on the branching.
|
||||
|
||||
Signed-off-by: Daiki Ueno <ueno@gnu.org>
|
||||
|
||||
Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gnutls28/3.6.13-2ubuntu1.9/gnutls28_3.6.13-2ubuntu1.9.debian.tar.xz
|
||||
Upstream-Commit: https://gitlab.com/gnutls/gnutls/-/commit/29d6298d0b04cfff970b993915db71ba3f580b6d]
|
||||
CVE: CVE-2023-5981
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
lib/auth/rsa.c | 2 +-
|
||||
lib/auth/rsa_psk.c | 90 ++++++++++++++++++----------------------------
|
||||
lib/gnutls_int.h | 4 ---
|
||||
lib/priority.c | 1 -
|
||||
4 files changed, 35 insertions(+), 62 deletions(-)
|
||||
|
||||
--- a/lib/auth/rsa.c
|
||||
+++ b/lib/auth/rsa.c
|
||||
@@ -207,7 +207,7 @@ proc_rsa_client_kx(gnutls_session_t sess
|
||||
session->key.key.size);
|
||||
/* After this point, any conditional on failure that cause differences
|
||||
* in execution may create a timing or cache access pattern side
|
||||
- * channel that can be used as an oracle, so treat very carefully */
|
||||
+ * channel that can be used as an oracle, so tread carefully */
|
||||
|
||||
/* Error handling logic:
|
||||
* In case decryption fails then don't inform the peer. Just use the
|
||||
--- a/lib/auth/rsa_psk.c
|
||||
+++ b/lib/auth/rsa_psk.c
|
||||
@@ -264,14 +264,13 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_se
|
||||
{
|
||||
gnutls_datum_t username;
|
||||
psk_auth_info_t info;
|
||||
- gnutls_datum_t plaintext;
|
||||
gnutls_datum_t ciphertext;
|
||||
gnutls_datum_t pwd_psk = { NULL, 0 };
|
||||
int ret, dsize;
|
||||
- int randomize_key = 0;
|
||||
ssize_t data_size = _data_size;
|
||||
gnutls_psk_server_credentials_t cred;
|
||||
gnutls_datum_t premaster_secret = { NULL, 0 };
|
||||
+ volatile uint8_t ver_maj, ver_min;
|
||||
|
||||
cred = (gnutls_psk_server_credentials_t)
|
||||
_gnutls_get_cred(session, GNUTLS_CRD_PSK);
|
||||
@@ -327,71 +326,47 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_se
|
||||
}
|
||||
ciphertext.size = dsize;
|
||||
|
||||
- ret =
|
||||
- gnutls_privkey_decrypt_data(session->internals.selected_key, 0,
|
||||
- &ciphertext, &plaintext);
|
||||
- if (ret < 0 || plaintext.size != GNUTLS_MASTER_SIZE) {
|
||||
- /* In case decryption fails then don't inform
|
||||
- * the peer. Just use a random key. (in order to avoid
|
||||
- * attack against pkcs-1 formatting).
|
||||
- */
|
||||
- gnutls_assert();
|
||||
- _gnutls_debug_log
|
||||
- ("auth_rsa_psk: Possible PKCS #1 format attack\n");
|
||||
- if (ret >= 0) {
|
||||
- gnutls_free(plaintext.data);
|
||||
- }
|
||||
- randomize_key = 1;
|
||||
- } else {
|
||||
- /* If the secret was properly formatted, then
|
||||
- * check the version number.
|
||||
- */
|
||||
- if (_gnutls_get_adv_version_major(session) !=
|
||||
- plaintext.data[0]
|
||||
- || (session->internals.allow_wrong_pms == 0
|
||||
- && _gnutls_get_adv_version_minor(session) !=
|
||||
- plaintext.data[1])) {
|
||||
- /* No error is returned here, if the version number check
|
||||
- * fails. We proceed normally.
|
||||
- * That is to defend against the attack described in the paper
|
||||
- * "Attacking RSA-based sessions in SSL/TLS" by Vlastimil Klima,
|
||||
- * Ondej Pokorny and Tomas Rosa.
|
||||
- */
|
||||
- gnutls_assert();
|
||||
- _gnutls_debug_log
|
||||
- ("auth_rsa: Possible PKCS #1 version check format attack\n");
|
||||
- }
|
||||
- }
|
||||
+ ver_maj = _gnutls_get_adv_version_major(session);
|
||||
+ ver_min = _gnutls_get_adv_version_minor(session);
|
||||
|
||||
+ premaster_secret.data = gnutls_malloc(GNUTLS_MASTER_SIZE);
|
||||
+ if (premaster_secret.data == NULL) {
|
||||
+ gnutls_assert();
|
||||
+ return GNUTLS_E_MEMORY_ERROR;
|
||||
+ }
|
||||
+ premaster_secret.size = GNUTLS_MASTER_SIZE;
|
||||
|
||||
- if (randomize_key != 0) {
|
||||
- premaster_secret.size = GNUTLS_MASTER_SIZE;
|
||||
- premaster_secret.data =
|
||||
- gnutls_malloc(premaster_secret.size);
|
||||
- if (premaster_secret.data == NULL) {
|
||||
- gnutls_assert();
|
||||
- return GNUTLS_E_MEMORY_ERROR;
|
||||
- }
|
||||
-
|
||||
- /* we do not need strong random numbers here.
|
||||
- */
|
||||
- ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
|
||||
- premaster_secret.size);
|
||||
- if (ret < 0) {
|
||||
- gnutls_assert();
|
||||
- goto cleanup;
|
||||
- }
|
||||
- } else {
|
||||
- premaster_secret.data = plaintext.data;
|
||||
- premaster_secret.size = plaintext.size;
|
||||
+ /* Fallback value when decryption fails. Needs to be unpredictable. */
|
||||
+ ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
|
||||
+ premaster_secret.size);
|
||||
+ if (ret < 0) {
|
||||
+ gnutls_assert();
|
||||
+ goto cleanup;
|
||||
}
|
||||
|
||||
+ gnutls_privkey_decrypt_data2(session->internals.selected_key, 0,
|
||||
+ &ciphertext, premaster_secret.data,
|
||||
+ premaster_secret.size);
|
||||
+ /* After this point, any conditional on failure that cause differences
|
||||
+ * in execution may create a timing or cache access pattern side
|
||||
+ * channel that can be used as an oracle, so tread carefully */
|
||||
+
|
||||
+ /* Error handling logic:
|
||||
+ * In case decryption fails then don't inform the peer. Just use the
|
||||
+ * random key previously generated. (in order to avoid attack against
|
||||
+ * pkcs-1 formatting).
|
||||
+ *
|
||||
+ * If we get version mismatches no error is returned either. We
|
||||
+ * proceed normally. This is to defend against the attack described
|
||||
+ * in the paper "Attacking RSA-based sessions in SSL/TLS" by
|
||||
+ * Vlastimil Klima, Ondej Pokorny and Tomas Rosa.
|
||||
+ */
|
||||
+
|
||||
/* This is here to avoid the version check attack
|
||||
* discussed above.
|
||||
*/
|
||||
-
|
||||
- premaster_secret.data[0] = _gnutls_get_adv_version_major(session);
|
||||
- premaster_secret.data[1] = _gnutls_get_adv_version_minor(session);
|
||||
+ premaster_secret.data[0] = ver_maj;
|
||||
+ premaster_secret.data[1] = ver_min;
|
||||
|
||||
/* find the key of this username
|
||||
*/
|
||||
--- a/lib/gnutls_int.h
|
||||
+++ b/lib/gnutls_int.h
|
||||
@@ -989,7 +989,6 @@ struct gnutls_priority_st {
|
||||
bool _no_etm;
|
||||
bool _no_ext_master_secret;
|
||||
bool _allow_key_usage_violation;
|
||||
- bool _allow_wrong_pms;
|
||||
bool _dumbfw;
|
||||
unsigned int _dh_prime_bits; /* old (deprecated) variable */
|
||||
|
||||
@@ -1007,7 +1006,6 @@ struct gnutls_priority_st {
|
||||
(x)->no_etm = 1; \
|
||||
(x)->no_ext_master_secret = 1; \
|
||||
(x)->allow_key_usage_violation = 1; \
|
||||
- (x)->allow_wrong_pms = 1; \
|
||||
(x)->dumbfw = 1
|
||||
|
||||
#define ENABLE_PRIO_COMPAT(x) \
|
||||
@@ -1016,7 +1014,6 @@ struct gnutls_priority_st {
|
||||
(x)->_no_etm = 1; \
|
||||
(x)->_no_ext_master_secret = 1; \
|
||||
(x)->_allow_key_usage_violation = 1; \
|
||||
- (x)->_allow_wrong_pms = 1; \
|
||||
(x)->_dumbfw = 1
|
||||
|
||||
/* DH and RSA parameters types.
|
||||
@@ -1141,7 +1138,6 @@ typedef struct {
|
||||
bool no_etm;
|
||||
bool no_ext_master_secret;
|
||||
bool allow_key_usage_violation;
|
||||
- bool allow_wrong_pms;
|
||||
bool dumbfw;
|
||||
|
||||
/* old (deprecated) variable. This is used for both srp_prime_bits
|
||||
--- a/lib/priority.c
|
||||
+++ b/lib/priority.c
|
||||
@@ -681,7 +681,6 @@ gnutls_priority_set(gnutls_session_t ses
|
||||
COPY_TO_INTERNALS(no_etm);
|
||||
COPY_TO_INTERNALS(no_ext_master_secret);
|
||||
COPY_TO_INTERNALS(allow_key_usage_violation);
|
||||
- COPY_TO_INTERNALS(allow_wrong_pms);
|
||||
COPY_TO_INTERNALS(dumbfw);
|
||||
COPY_TO_INTERNALS(dh_prime_bits);
|
||||
|
||||
125
meta/recipes-support/gnutls/gnutls/CVE-2024-0553.patch
Normal file
125
meta/recipes-support/gnutls/gnutls/CVE-2024-0553.patch
Normal file
@@ -0,0 +1,125 @@
|
||||
From 40dbbd8de499668590e8af51a15799fbc430595e Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@gnu.org>
|
||||
Date: Wed, 10 Jan 2024 19:13:17 +0900
|
||||
Subject: [PATCH] rsa-psk: minimize branching after decryption
|
||||
|
||||
This moves any non-trivial code between gnutls_privkey_decrypt_data2
|
||||
and the function return in _gnutls_proc_rsa_psk_client_kx up until the
|
||||
decryption. This also avoids an extra memcpy to session->key.key.
|
||||
|
||||
Signed-off-by: Daiki Ueno <ueno@gnu.org>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.com/gnutls/gnutls/-/commit/40dbbd8de499668590e8af51a15799fbc430595e]
|
||||
CVE: CVE-2024-0553
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
lib/auth/rsa_psk.c | 68 ++++++++++++++++++++++++----------------------
|
||||
1 file changed, 35 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/lib/auth/rsa_psk.c b/lib/auth/rsa_psk.c
|
||||
index 93c2dc9..c6cfb92 100644
|
||||
--- a/lib/auth/rsa_psk.c
|
||||
+++ b/lib/auth/rsa_psk.c
|
||||
@@ -269,7 +269,6 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
int ret, dsize;
|
||||
ssize_t data_size = _data_size;
|
||||
gnutls_psk_server_credentials_t cred;
|
||||
- gnutls_datum_t premaster_secret = { NULL, 0 };
|
||||
volatile uint8_t ver_maj, ver_min;
|
||||
|
||||
cred = (gnutls_psk_server_credentials_t)
|
||||
@@ -329,24 +328,48 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
ver_maj = _gnutls_get_adv_version_major(session);
|
||||
ver_min = _gnutls_get_adv_version_minor(session);
|
||||
|
||||
- premaster_secret.data = gnutls_malloc(GNUTLS_MASTER_SIZE);
|
||||
- if (premaster_secret.data == NULL) {
|
||||
+ /* Find the key of this username. A random value will be
|
||||
+ * filled in if the key is not found.
|
||||
+ */
|
||||
+ ret = _gnutls_psk_pwd_find_entry(session, info->username,
|
||||
+ strlen(info->username), &pwd_psk);
|
||||
+ if (ret < 0)
|
||||
+ return gnutls_assert_val(ret);
|
||||
+
|
||||
+ /* Allocate memory for premaster secret, and fill in the
|
||||
+ * fields except the decryption result.
|
||||
+ */
|
||||
+ session->key.key.size = 2 + GNUTLS_MASTER_SIZE + 2 + pwd_psk.size;
|
||||
+ session->key.key.data = gnutls_malloc(session->key.key.size);
|
||||
+ if (session->key.key.data == NULL) {
|
||||
gnutls_assert();
|
||||
+ _gnutls_free_key_datum(&pwd_psk);
|
||||
+ /* No need to zeroize, as the secret is not copied in yet */
|
||||
+ _gnutls_free_datum(&session->key.key);
|
||||
return GNUTLS_E_MEMORY_ERROR;
|
||||
}
|
||||
- premaster_secret.size = GNUTLS_MASTER_SIZE;
|
||||
|
||||
/* Fallback value when decryption fails. Needs to be unpredictable. */
|
||||
- ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
|
||||
- premaster_secret.size);
|
||||
+ ret = gnutls_rnd(GNUTLS_RND_NONCE, session->key.key.data + 2,
|
||||
+ GNUTLS_MASTER_SIZE);
|
||||
if (ret < 0) {
|
||||
gnutls_assert();
|
||||
- goto cleanup;
|
||||
+ _gnutls_free_key_datum(&pwd_psk);
|
||||
+ /* No need to zeroize, as the secret is not copied in yet */
|
||||
+ _gnutls_free_datum(&session->key.key);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
+ _gnutls_write_uint16(GNUTLS_MASTER_SIZE, session->key.key.data);
|
||||
+ _gnutls_write_uint16(pwd_psk.size,
|
||||
+ &session->key.key.data[2 + GNUTLS_MASTER_SIZE]);
|
||||
+ memcpy(&session->key.key.data[2 + GNUTLS_MASTER_SIZE + 2], pwd_psk.data,
|
||||
+ pwd_psk.size);
|
||||
+ _gnutls_free_key_datum(&pwd_psk);
|
||||
+
|
||||
gnutls_privkey_decrypt_data2(session->internals.selected_key, 0,
|
||||
- &ciphertext, premaster_secret.data,
|
||||
- premaster_secret.size);
|
||||
+ &ciphertext, session->key.key.data + 2,
|
||||
+ GNUTLS_MASTER_SIZE);
|
||||
/* After this point, any conditional on failure that cause differences
|
||||
* in execution may create a timing or cache access pattern side
|
||||
* channel that can be used as an oracle, so tread carefully */
|
||||
@@ -365,31 +388,10 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_session_t session, uint8_t * data,
|
||||
/* This is here to avoid the version check attack
|
||||
* discussed above.
|
||||
*/
|
||||
- premaster_secret.data[0] = ver_maj;
|
||||
- premaster_secret.data[1] = ver_min;
|
||||
+ session->key.key.data[2] = ver_maj;
|
||||
+ session->key.key.data[3] = ver_min;
|
||||
|
||||
- /* find the key of this username
|
||||
- */
|
||||
- ret =
|
||||
- _gnutls_psk_pwd_find_entry(session, info->username, strlen(info->username), &pwd_psk);
|
||||
- if (ret < 0) {
|
||||
- gnutls_assert();
|
||||
- goto cleanup;
|
||||
- }
|
||||
-
|
||||
- ret =
|
||||
- set_rsa_psk_session_key(session, &pwd_psk, &premaster_secret);
|
||||
- if (ret < 0) {
|
||||
- gnutls_assert();
|
||||
- goto cleanup;
|
||||
- }
|
||||
-
|
||||
- ret = 0;
|
||||
- cleanup:
|
||||
- _gnutls_free_key_datum(&pwd_psk);
|
||||
- _gnutls_free_temp_key_datum(&premaster_secret);
|
||||
-
|
||||
- return ret;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -28,6 +28,8 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar
|
||||
file://CVE-2022-2509.patch \
|
||||
file://CVE-2021-4209.patch \
|
||||
file://CVE-2023-0361.patch \
|
||||
file://CVE-2023-5981.patch \
|
||||
file://CVE-2024-0553.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "5630751adec7025b8ef955af4d141d00d252a985769f51b4059e5affa3d39d63"
|
||||
|
||||
46
meta/recipes-support/sqlite/files/CVE-2023-7104.patch
Normal file
46
meta/recipes-support/sqlite/files/CVE-2023-7104.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From eab426c5fba69d2c77023939f72b4ad446834e3c Mon Sep 17 00:00:00 2001
|
||||
From: dan <Dan Kennedy>
|
||||
Date: Thu, 7 Sep 2023 13:53:09 +0000
|
||||
Subject: [PATCH] Fix a buffer overread in the sessions extension that could occur when processing a corrupt changeset.
|
||||
|
||||
Upstream-Status: Backport [https://sqlite.org/src/info/0e4e7a05c4204b47]
|
||||
CVE: CVE-2023-7104
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
sqlite3.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/sqlite3.c b/sqlite3.c
|
||||
index 972ef18..c645ac8 100644
|
||||
--- a/sqlite3.c
|
||||
+++ b/sqlite3.c
|
||||
@@ -203301,15 +203301,19 @@ static int sessionReadRecord(
|
||||
}
|
||||
}
|
||||
if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
|
||||
- sqlite3_int64 v = sessionGetI64(aVal);
|
||||
- if( eType==SQLITE_INTEGER ){
|
||||
- sqlite3VdbeMemSetInt64(apOut[i], v);
|
||||
+ if( (pIn->nData-pIn->iNext)<8 ){
|
||||
+ rc = SQLITE_CORRUPT_BKPT;
|
||||
}else{
|
||||
- double d;
|
||||
- memcpy(&d, &v, 8);
|
||||
- sqlite3VdbeMemSetDouble(apOut[i], d);
|
||||
+ sqlite3_int64 v = sessionGetI64(aVal);
|
||||
+ if( eType==SQLITE_INTEGER ){
|
||||
+ sqlite3VdbeMemSetInt64(apOut[i], v);
|
||||
+ }else{
|
||||
+ double d;
|
||||
+ memcpy(&d, &v, 8);
|
||||
+ sqlite3VdbeMemSetDouble(apOut[i], d);
|
||||
+ }
|
||||
+ pIn->iNext += 8;
|
||||
}
|
||||
- pIn->iNext += 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -17,6 +17,7 @@ SRC_URI = "http://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_PV}.tar.gz \
|
||||
file://CVE-2020-35525.patch \
|
||||
file://CVE-2020-35527.patch \
|
||||
file://CVE-2021-20223.patch \
|
||||
file://CVE-2023-7104.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "2d0a553534c521504e3ac3ad3b90f125"
|
||||
SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae"
|
||||
|
||||
@@ -19,8 +19,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://no-path-adjust.patch \
|
||||
"
|
||||
|
||||
PV .= ".2130"
|
||||
SRCREV = "075ad7047457debfeef13442c01e74088b461092"
|
||||
PV .= ".2190"
|
||||
SRCREV = "6a950da86d7a6eb09d5ebeab17657986420d07ac"
|
||||
|
||||
# Do not consider .z in x.y.z, as that is updated with every commit
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
|
||||
|
||||
Reference in New Issue
Block a user