Your message dated Sun, 19 May 2013 20:01:56 +0400
with message-id <[email protected]>
and subject line Re: Bug#412032: qemu doesn't handle setuid programs correctly
has caused the Debian Bug report #412032,
regarding qemu doesn't handle setuid programs correctly
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 [email protected]
immediately.)
--
412032: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=412032
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: qemu
Version: 0.9.0-1netsweng2
Severity: normal
Tags: patch
When working in an environment similar to
http://wiki.debian.org/QemuUserEmulation
setuid programs such as /bin/su don't work correctly. This can be fixed by
making
the (statically linked) qemu be setuid, and applying the attached patch. The
patch
is needed so that the real and effective uid are manged correctly.
Without it, "su - someuser" will give a shell in which the real and effective
uids
are "someuser", but when running a command from that shell, such as
/usr/bin/id, the
real uid for that command is "someuser", but the effective uid is "root"
(becasue
of the setuid of the qemu executable). This patch causes qemu to change it's
effective
uid to match the real uid in the case where the target executable is not
setuid. This
is just an else clause for the clock that changes the uid to match the uid on a
setuid
target executable.
This fix was created on the 0.9.0 package from experimental, but the code is
that same
in 0.8.2, so the patch should be equally applicable there as well.
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages qemu depends on:
ii bochsbios 2.3-2 BIOS for the Bochs emulator
ii openhackware 0.4.1-2 OpenFirmware emulator for PowerPC
ii proll 18-2 JavaStation PROM 2.x compatible re
ii vgabios 0.6a-1 VGA BIOS software for the Bochs an
Versions of packages qemu recommends:
ii debootstrap 0.3.3.1 Bootstrap a basic Debian system
ii sharutils 1:4.2.1-15 shar, unshar, uuencode, uudecode
pn vde2 <none> (no description available)
-- no debconf information
#DPATCHLEVEL=0
--- linux-user/linuxload.c.orig 2007-02-22 08:15:54.000000000 -0500
+++ linux-user/linuxload.c 2007-02-22 08:16:25.000000000 -0500
@@ -78,6 +78,8 @@
if(bprm->e_uid != geteuid()) {
id_change = 1;
}
+ } else {
+ seteuid(getuid());
}
/* Set-gid? */
--- End Message ---
--- Begin Message ---
Version: 1.3.0+dfsg-1~exp2
At Thu, 22 Feb 2007 17:43:55 -0500, Stuart R. Anderson wrote:
> Package: qemu
> Version: 0.9.0-1netsweng2
> Severity: normal
> Tags: patch
>
> When working in an environment similar to
> http://wiki.debian.org/QemuUserEmulation
> setuid programs such as /bin/su don't work correctly. This can be fixed by
> making
> the (statically linked) qemu be setuid, and applying the attached patch. The
> patch
> is needed so that the real and effective uid are manged correctly.
[..]
I think the right fix is to allow setuid in binfmt handlers in kernel, not to
make
qemu binaries setuid.
This has been done in version 1.3.0+dfsg-1~exp2, so I think this bug can now be
closed. If you don't think it's the right fix, please reopen this bugreport and
tell us what else is missing.
Thank you, and please excuse us for it took so long.
/mjt
--- End Message ---