what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

MIT krb5 Security Advisory 2011-005

MIT krb5 Security Advisory 2011-005
Posted Jul 7, 2011
Site web.mit.edu

MIT krb5 Security Advisory 2011-005 - A remote client of the GSS-API FTP daemon in the krb5-appl distribution can access files using the effective group ID that the FTP daemon process had when it started.

tags | advisory, remote
advisories | CVE-2011-1526
SHA-256 | 1fe339215ceaa9f7616aea04e0760e9c50130ea0ca8add4046b96df17325d31e

MIT krb5 Security Advisory 2011-005

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

MITKRB5-SA-2011-005

MIT krb5 Security Advisory 2011-005
Original release: 2011-07-05

Topic: FTP daemon fails to set effective group ID

CVE-2011-1526

CVSSv2 Vector: AV:N/AC:L/Au:S/C:P/I:P/A:P/E:H/RL:O/RC:C

CVSSv2 Base Score: 6.5

Access Vector: Network
Access Complexity: Low
Authentication: Single
Confidentiality Impact: Partial
Integrity Impact: Partial
Availability Impact: Partial

CVSSv2 Temporal Score: 5.7

Exploitability: High
Remediation Level: Official Fix
Report Confidence: Confirmed

SUMMARY
=======

A remote client of the GSS-API FTP daemon in the krb5-appl
distribution can access files using the effective group ID that the
FTP daemon process had when it started.

IMPACT
======

An authenticated remote user can gain unauthorized read or write
access to files whose group owner is the initial effective group ID of
the FTP daemon process. This is often GID 0 ("root" or "wheel").

The severity of the consequences depends heavily on the details of an
individual system's configuration. Prudent system administration
practices concerning file permissions will largely prevent any
malicious damage from this vulnerability.

No exploit code is necessary; any user able to log into the FTP server
will gain unauthorized access.

AFFECTED SOFTWARE
=================

* The GSS-API FTP daemon in all krb5-appl releases, up to and
including krb5-appl-1.0.1, is vulnerable.

FIXES
=====

* An upcoming release of krb5-appl will contain a fix.

* Apply the following patch. You will need to run ./autogen.sh to
rebuild the configure script, and you should rebuild from a clean
source tree to ensure that the correct macro definitions are
compiled.

diff --git a/configure.ac b/configure.ac
index 86e23f1..2fe68ad 100644
- --- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,7 @@ AC_CHECK_FUNCS(_getpty cgetent getcwd getenv gettosbyname getusershell getutmp)
AC_CHECK_FUNCS(getutmpx grantpt inet_aton initgroups isatty killpg killpg)
AC_CHECK_FUNCS(line_push ptsname revoke rmufile rresvport_af)
AC_CHECK_FUNCS(seteuid setlogin setpgid setpriority setresuid setreuid)
+AC_CHECK_FUNCS(setegid setregid setresgid)
AC_CHECK_FUNCS(setutent setutsent setutxent strsave tcgetpgrp tcsetpgrp)
AC_CHECK_FUNCS(ttyname unsetenv updwtmp updwtmpx utimes utmpname utmpxname)
AC_CHECK_FUNCS(vhangup vsnprintf waitpid)
diff --git a/gssftp/ftpd/ftpd.c b/gssftp/ftpd/ftpd.c
index fe62a9c..a150819 100644
- --- a/gssftp/ftpd/ftpd.c
+++ b/gssftp/ftpd/ftpd.c
@@ -994,9 +994,14 @@ login(passwd, logincode)
#endif
}

- - (void) krb5_setegid((gid_t)pw->pw_gid);
- - (void) initgroups(pw->pw_name, pw->pw_gid);
- -
+ if (krb5_setegid((gid_t)pw->pw_gid) < 0) {
+ reply(550, "Can't set egid.");
+ goto bad;
+ }
+ if (geteuid() == 0 && initgroups(pw->pw_name, pw->pw_gid) < 0) {
+ reply(550, "Can't initgroups");
+ goto bad;
+ }
/* open wtmp before chroot */
(void) snprintf(ttyline, sizeof(ttyline), "ftp%ld", (long) getpid());
pty_logwtmp(ttyline, pw->pw_name, rhost_sane);
diff --git a/k5-util.h b/k5-util.h
index 7bb8cfb..64cd53d 100644
- --- a/k5-util.h
+++ b/k5-util.h
@@ -69,8 +69,7 @@
#elif defined(HAVE_SETREUID)
# define krb5_seteuid(EUID) setreuid(geteuid(), (uid_t)(EUID))
#else
- - /* You need to add a case to deal with this operating system.*/
- -# define krb5_seteuid(EUID) (errno = EPERM, -1)
+# error "You need to add a case to deal with this operating system."
#endif

#ifdef HAVE_SETEGID
@@ -80,8 +79,7 @@
#elif defined(HAVE_SETREGID)
# define krb5_setegid(EGID) (setregid(getegid(), (gid_t)(EGID)))
#else
- - /* You need to add a case to deal with this operating system.*/
- -# define krb5_setegid(EGID) (errno = EPERM, -1)
+# error "You need to add a case to deal with this operating system."
#endif

#endif

This patch is also available at

http://web.mit.edu/kerberos/advisories/2011-005-patch.txt

A PGP-signed patch is available at

http://web.mit.edu/kerberos/advisories/2011-005-patch.txt.asc

REFERENCES
==========

This announcement is posted at:

http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2011-005.txt

This announcement and related security advisories may be found on the
MIT Kerberos security advisory page at:

http://web.mit.edu/kerberos/advisories/index.html

The main MIT Kerberos web page is at:

http://web.mit.edu/kerberos/index.html

CVSSv2:

http://www.first.org/cvss/cvss-guide.html
http://nvd.nist.gov/cvss.cfm?calculator&adv&version=2

CVE: CVE-2011-1526
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1526

ACKNOWLEDGMENTS
===============

We thank Tim Zingelman for discovering this vulnerability and
providing a preliminary patch.

CONTACT
=======

The MIT Kerberos Team security contact address is
<krbcore-security@mit.edu>. When sending sensitive information,
please PGP-encrypt it using the following key:

pub 2048R/56CD8F76 2010-12-29 [expires: 2012-02-01]
uid MIT Kerberos Team Security Contact <krbcore-security@mit.edu>

DETAILS
=======

The vulnerability results from two interacting flaws: omission of
required autoconf tests, causing krb5_setegid() to always fail, and
the FTP daemon's failure to check for the successful execution of
krb5_setegid().

The FTP daemon calls the portability macro krb5_setegid() from
k5-util.h, which is intended to wrap or emulate the POSIX interface
setegid(). The definition of the macro depends on macros that the
autoconf configure script defines (based on tests of the target
platform environment) when it runs. When the krb5 application
programs moved out of the main krb5 source tree, the new configure
script inadvertently omitted the necessary autoconf tests for
setegid() and related legacy interfaces. If no setegid() equivalent
appears to exist on the system, k5-util.h defines krb5_setegid() to
always fail with errno EPERM. Since the relevant autoconf tests never
execute, k5-util.h will always define krb5_setegid() to fail.

The FTP daemon does not check the return value of krb5_setegid(), so
it silently fails to set its effective GID, allowing users to gain
unauthorized access using the effective GID that the daemon process
started with.

REVISION HISTORY
================

2011-07-05 original release

Copyright (C) 2011 Massachusetts Institute of Technology
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (SunOS)

iEYEARECAAYFAk4TT7IACgkQSO8fWy4vZo7ttQCglKWLu47znBVfeGXl3LlnZtF2
llIAoNgVuCYIdVWcMEJaZ0oBp9RxhkzJ
=RUE/
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close