[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1057327: marked as done (bookworm-pu: package amanda/3.5.1-11+deb12u1)



Your message dated Sat, 09 Dec 2023 10:20:37 +0000
with message-id <83d3a3621a56b9af1e20d36ee9d390a46ab64a8a.camel@adam-barratt.org.uk>
and subject line Closing requests for updates included in 12.3 point release
has caused the Debian Bug report #1057327,
regarding bookworm-pu: package amanda/3.5.1-11+deb12u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1057327: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057327
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: amanda@packages.debian.org
Control: affects -1 + src:amanda

This upload fixes CVE-2023-30577, a backup-user-to-root
vulnerability.

After fixing this CVE already for unstable (NMU pending, ETA Friday),
buster and stretch, I'd also like to fix it for bookworm
and bullseye.

The patch is taken from upstream [1] and has been merged already there.
Package test suite is still happy.

[1] https://github.com/zmanda/amanda/pull/228

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in (old)stable
  [ ] the issue is verified as fixed in unstable
      (as said, pending NMU)

I've uploaded the package already to the s-p-u queue.

-- 
Cheers,
tobi
diff -Nru amanda-3.5.1/debian/changelog amanda-3.5.1/debian/changelog
--- amanda-3.5.1/debian/changelog	2023-03-21 18:35:47.000000000 +0100
+++ amanda-3.5.1/debian/changelog	2023-12-03 14:17:07.000000000 +0100
@@ -1,3 +1,10 @@
+amanda (1:3.5.1-11+deb12u1) bookworm; urgency=high
+
+  * Non-maintainer upload by the Security Team.
+  * Apply upstream fix for CVE-2023-30577 (Closes: #1055253)
+
+ -- Tobias Frost <tobi@debian.org>  Sun, 03 Dec 2023 14:17:07 +0100
+
 amanda (1:3.5.1-11) unstable; urgency=medium
 
   * d/p/49-fix-CVE-2022-37705_part_2: 48-fix-CVE-2022-37705 broken one use
diff -Nru amanda-3.5.1/debian/patches/57-CVE-2023-30577.patch amanda-3.5.1/debian/patches/57-CVE-2023-30577.patch
--- amanda-3.5.1/debian/patches/57-CVE-2023-30577.patch	1970-01-01 01:00:00.000000000 +0100
+++ amanda-3.5.1/debian/patches/57-CVE-2023-30577.patch	2023-12-03 13:55:48.000000000 +0100
@@ -0,0 +1,83 @@
+Description: CVE-2023-30577 - Local privilege escalation.
+Origin: https://github.com/zmanda/amanda/pull/228
+Bug: https://github.com/zmanda/amanda/security/advisories/GHSA-crrw-v393-h5q3
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055253
+--- a/client-src/runtar.c
++++ b/client-src/runtar.c
+@@ -39,6 +39,11 @@
+ #include "amutil.h"
+ #include "conffile.h"
+ #include "client_util.h"
++#include <stdbool.h>
++
++static const char *whitelisted_args[] = {"--blocking-factor", "--file", "--directory", "--exclude", "--transform", "--listed-incremental", "--newer", "--exclude-from", "--files-from", NULL};
++
++bool check_whitelist(char* option);
+ 
+ int main(int argc, char **argv);
+ 
+@@ -49,6 +54,7 @@
+ {
+ #ifdef GNUTAR
+     int i;
++    char **j;
+     char *e;
+     char *dbf;
+     char *cmdline;
+@@ -182,20 +188,23 @@
+ 		g_str_has_prefix(argv[i],"--verbose")) {
+ 		/* Accept theses options */
+ 		good_option++;
+-	    } else if (g_str_has_prefix(argv[i],"--blocking-factor") ||
+-		g_str_has_prefix(argv[i],"--file") ||
+-		g_str_has_prefix(argv[i],"--directory") ||
+-		g_str_has_prefix(argv[i],"--exclude") ||
+-		g_str_has_prefix(argv[i],"--transform") ||
+-		g_str_has_prefix(argv[i],"--listed-incremental") ||
+-		g_str_has_prefix(argv[i],"--newer") ||
+-		g_str_has_prefix(argv[i],"--exclude-from") ||
+-		g_str_has_prefix(argv[i],"--files-from")) {
++	    } else if (check_whitelist(argv[i])) {
+ 		if (strchr(argv[i], '=')) {
+ 		    good_option++;
+ 		} else {
+ 		    /* Accept theses options with the following argument */
+ 		    good_option += 2;
++
++            /* Whitelisting only the allowed arguments*/
++            for(j=whitelisted_args; *j; j++) {
++                if (strcmp(argv[i], *j) == 0) {
++                    break;
++                }
++            }
++
++            if (!*j) {
++                good_option = 0; // not allowing arguments absent in the whitelist
++            }
+ 		}
+             } else if (argv[i][0] != '-') {
+ 		good_option++;
+@@ -239,3 +248,23 @@
+     return 1;
+ #endif
+ }
++
++bool
++check_whitelist(
++    gchar* option)
++{
++    bool result = TRUE;
++    char** i;
++
++    for(i=whitelisted_args; *i; i++) {
++        if (g_str_has_prefix(option, *i)) {
++            break;
++        }
++    }
++
++    if (!*i) {
++        result = FALSE; // not allowing arguments absent in the whitelist
++    }
++
++    return result;
++}
diff -Nru amanda-3.5.1/debian/patches/series amanda-3.5.1/debian/patches/series
--- amanda-3.5.1/debian/patches/series	2023-03-21 18:35:47.000000000 +0100
+++ amanda-3.5.1/debian/patches/series	2023-12-03 14:09:19.000000000 +0100
@@ -49,3 +49,4 @@
 50-fix-CVE-2022-37704
 52-fix-CVE-2022-37704_part_2
 56-fix-CVE-2022-37703
+57-CVE-2023-30577.patch

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Package: release.debian.org
Version: 12.3

Hi,

Each of the updates discussed in these requests was included in this
morning's 12.3 bookworm point release.

Regards,

Adam

--- End Message ---

Reply to: