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

Bug#352500: libc0.3: getresuid has misordered arguments



Package: libc0.3
Version: 2.3.5-7
Severity: normal
Tags: patch upstream

Hi

When calling getresuid() from a setuid program, ruid and uid are
exchanged. This can make setuid program set the effective uid as real
uid too, so that the user that launched the program can't kill it any
more...

Here is an obvious fix.

Regards,
Samuel

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: hurd-i386 (i686-AT386)
Shell:  /bin/sh linked to /bin/bash
Kernel: GNU 0.3
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)

-- no debconf information

-- 
Samuel Thibault <samuel.thibault@ens-lyon.org>
Index: sysdeps/mach/hurd/getresuid.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/getresuid.c,v
retrieving revision 1.1
diff -u -r1.1 getresuid.c
--- sysdeps/mach/hurd/getresuid.c	14 Oct 2002 01:03:11 -0000	1.1
+++ sysdeps/mach/hurd/getresuid.c	12 Feb 2006 12:25:38 -0000
@@ -25,7 +25,7 @@
 /* Fetch the effective user ID, real user ID, and saved-set user ID,
    of the calling process.  */
 int
-__getresuid (uid_t *euid, uid_t *ruid, uid_t *suid)
+__getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
 {
   error_t err;
   uid_t eff, real, saved;

Reply to: