Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sudo for openSUSE:Factory checked in 
at 2022-11-07 09:26:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sudo (Old)
 and      /work/SRC/openSUSE:Factory/.sudo.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sudo"

Mon Nov  7 09:26:04 2022 rev:138 rq: version:1.9.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/sudo/sudo.changes        2022-11-07 
09:20:12.644123706 +0100
+++ /work/SRC/openSUSE:Factory/.sudo.new.1597/sudo.changes      2022-11-07 
09:26:05.661526364 +0100
@@ -1,0 +2,9 @@
+Thu Nov  3 22:07:14 UTC 2022 - Jason Sikes <jsi...@suse.com>
+
+- Added sudo-CVE-2022-43995.patch
+  * CVE-2022-43995
+  * bsc#1204986
+  * Fixed a potential heap-based buffer over-read when entering a password
+    of seven characters or fewer and using the crypt() password backend.
+
+-------------------------------------------------------------------

New:
----
  sudo-CVE-2022-43995.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sudo.spec ++++++
--- /var/tmp/diff_new_pack.4kHKR4/_old  2022-11-07 09:26:06.169529466 +0100
+++ /var/tmp/diff_new_pack.4kHKR4/_new  2022-11-07 09:26:06.173529490 +0100
@@ -33,6 +33,7 @@
 Source7:        README_313276.test
 # PATCH-OPENSUSE: the "SUSE" branding of the default sudo config
 Patch0:         sudo-sudoers.patch
+Patch1:         sudo-CVE-2022-43995.patch
 BuildRequires:  audit-devel
 BuildRequires:  cyrus-sasl-devel
 BuildRequires:  groff


++++++ sudo-CVE-2022-43995.patch ++++++
>From bd209b9f16fcd1270c13db27ae3329c677d48050 Mon Sep 17 00:00:00 2001
From: "Todd C. Miller" <todd.mil...@sudo.ws>
Date: Fri, 28 Oct 2022 07:29:55 -0600
Subject: [PATCH] Fix CVE-2022-43995, potential heap overflow for passwords < 8
 characters. Starting with sudo 1.8.0 the plaintext password buffer is
 dynamically sized so it is not safe to assume that it is at least 9 bytes in
 size. Found by Hugo Lefeuvre (University of Manchester) with ConfFuzz.

---
 plugins/sudoers/auth/passwd.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/plugins/sudoers/auth/passwd.c b/plugins/sudoers/auth/passwd.c
index b2046eca2..0416861e9 100644
--- a/plugins/sudoers/auth/passwd.c
+++ b/plugins/sudoers/auth/passwd.c
@@ -63,7 +63,7 @@ sudo_passwd_init(struct passwd *pw, sudo_auth *auth)
 int
 sudo_passwd_verify(struct passwd *pw, char *pass, sudo_auth *auth, struct 
sudo_conv_callback *callback)
 {
-    char sav, *epass;
+    char des_pass[9], *epass;
     char *pw_epasswd = auth->data;
     size_t pw_len;
     int matched = 0;
@@ -75,12 +75,12 @@ sudo_passwd_verify(struct passwd *pw, char *pass, sudo_auth 
*auth, struct sudo_c
 
     /*
      * Truncate to 8 chars if standard DES since not all crypt()'s do this.
-     * If this turns out not to be safe we will have to use OS #ifdef's (sigh).
      */
-    sav = pass[8];
     pw_len = strlen(pw_epasswd);
-    if (pw_len == DESLEN || HAS_AGEINFO(pw_epasswd, pw_len))
-       pass[8] = '\0';
+    if (pw_len == DESLEN || HAS_AGEINFO(pw_epasswd, pw_len)) {
+       strlcpy(des_pass, pass, sizeof(des_pass));
+       pass = des_pass;
+    }
 
     /*
      * Normal UN*X password check.
@@ -88,7 +88,6 @@ sudo_passwd_verify(struct passwd *pw, char *pass, sudo_auth 
*auth, struct sudo_c
      * only compare the first DESLEN characters in that case.
      */
     epass = (char *) crypt(pass, pw_epasswd);
-    pass[8] = sav;
     if (epass != NULL) {
        if (HAS_AGEINFO(pw_epasswd, pw_len) && strlen(epass) == DESLEN)
            matched = !strncmp(pw_epasswd, epass, DESLEN);

Reply via email to