cifs-utils: fix CVE-2022-27239 CVE-2022-29869
PATCH 1/1 cifs-utils: fix CVE-2022-27239 CVE-2022-29869
From: Chee Yang Lee <[email protected]>
Signed-off-by Chee Yang Lee <[email protected]>
--- .../recipes-support/cifs/cifs-utils_6.14.bb | 5 +- .../cifs/files/CVE-2022-27239.patch | 40 ++++++++++++++++ .../cifs/files/CVE-2022-29869.patch | 48 +++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-support/cifs/files/CVE-2022-27239.patch create mode 100644 meta-networking/recipes-support/cifs/files/CVE-2022-29869.patch
meta-networking/recipes-support/cifs/cifs-utils_6.14.bb +4 -1
@@ -5,7 +5,10 @@ LICENSE = "GPL-3.0-only & LGPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRCREV = "8c06dce7d596e478c20bc54bdcec87ad97f80a1b" -SRC_URI = "git://git.samba.org/cifs-utils.git;branch=master" +SRC_URI = "git://git.samba.org/cifs-utils.git;branch=master \ + file://CVE-2022-27239.patch \ + file://CVE-2022-29869.patch \ +" S = "${WORKDIR}/git" DEPENDS += "libtalloc"
meta-networking/recipes-support/cifs/files/CVE-2022-27239.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 007c07fd91b6d42f8bd45187cf78ebb06801139d Mon Sep 17 00:00:00 2001 +From: Jeffrey Bencteux <[email protected]> +Date: Thu, 17 Mar 2022 12:58:52 -0400 +Subject: [PATCH] CVE-2022-27239: mount.cifs: fix length check for ip option + parsing + +Previous check was true whatever the length of the input string was, +leading to a buffer overflow in the subsequent strcpy call. + +Bug: https://bugzilla.samba.org/show_bug.cgi?id=15025 + +Signed-off-by: Jeffrey Bencteux <[email protected]> +Reviewed-by: David Disseldorp <[email protected]> + +Upstream-Status: Backport [ https://git.samba.org/?p=cifs-utils.git;a=commit;h=007c07fd91b6d42f8bd45187cf78ebb06801139d] +CVE: CVE-2022-27239 +Signed-off-by: Lee Chee Yang <[email protected]> +--- + mount.cifs.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/mount.cifs.c b/mount.cifs.c +index 84274c9..3a6b449 100644 +--- a/mount.cifs.c ++++ b/mount.cifs.c +@@ -926,9 +926,10 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info) + if (!value || !*value) { + fprintf(stderr, + "target ip address argument missing\n"); +- } else if (strnlen(value, MAX_ADDRESS_LEN) <= ++ } else if (strnlen(value, MAX_ADDRESS_LEN) < + MAX_ADDRESS_LEN) { +- strcpy(parsed_info->addrlist, value); ++ strlcpy(parsed_info->addrlist, value, ++ MAX_ADDRESS_LEN); + if (parsed_info->verboseflag) + fprintf(stderr, + "ip address %s override specified\n", +-- +2.34.1
meta-networking/recipes-support/cifs/files/CVE-2022-29869.patch new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
2.37.3