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

Bug#1007787: bullseye-pu: package adduser/3.118



Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu

[ Reason ]
Bug #940577 reports a command injection vulnerability into deluser which
can be exploited by an external entity that can can create strangely named
user accounts. This is a privilege escalation on systems that have their
account database externally managed, for example in LDAP.

This issue is present in adduser since nearly forever (2006) and has
just recently been fixed in unstable.

[ Impact ]
Possible privilege escalation.

[ Tests ]
Adduser in unstable has an autopkgtest covering the issue; adduser in
stable sadly not.

[ Risks ]
Due to changes in the syntax of the crontab executable, the entire code
is non-functional; the only function it provides is thus to offer the
command injection.

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

[ Changes ]
The suggested fix differs from the fix employed for unstable and just
removes the affected code:

diff --git a/deluser b/deluser
index b1bf56b..c27ec8d 100644
--- a/deluser
+++ b/deluser
@@ -348,13 +348,6 @@ if($action eq "deluser") {
       }
     }

-    if (system("crontab -l $user >/dev/null 2>&1") == 0) {
-      # crontab -l returns 1 if there is no crontab
-      my $crontab = &which('crontab');
-      &systemcall($crontab, "-r", $user);
-      s_print (gtx("Removing crontab ...\n"));
-    }
-
     s_printf (gtx("Removing user `%s' ...\n"),$user);
     my @members = get_group_members($maingroup);
     if (@members == 0) {

[ Other info ]
This is my first try to do a stable upload. Since adduser is a vital
package, but my time is rather limited at the moment, I would like to
know whether this fix is acceptable for stable before I prepare an
actual package. Also, the fix suggested for stable is not the same fix
that is in place in unstable and testing (that one also fixes the broken
functionality and adds more safety).

Greetings
Marc


Reply to: