https://bugzilla.novell.com/show_bug.cgi?id=682881 https://bugzilla.novell.com/show_bug.cgi?id=682881#c0 Summary: SetUID Perl scripts don't work any more Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: i586 OS/Version: openSUSE 11.4 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: jimc@math.ucla.edu QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=421570) --> (http://bugzilla.novell.com/attachment.cgi?id=421570) "C" wrapper to give setUID effect User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 SUSE/3.6.15-0.2.2 Firefox/3.6.15 Symptom: On a showroom stock OS installation, a setUID Perl script does not receive the effective UID of its owner (specifically, root). http://search.cpan.org/~jesse/perl-5.12.0/pod/perl5120delta.pod says: says: (search for suidperl) "suidperl is no longer part of Perl." Indeed, neither is sperl${version}. http://search.cpan.org/~jesse/perl-5.12.2/INSTALL#suidperl says (paraphrasing): suidperl is no longer available. Use sudo instead. Package version: perl-5.12.3-11.14.1.i586 Reproducible: Always Steps to Reproduce: 1. Create a Perl script, e.g. printf "ruid = %d euid = %d\n", $<, $>; 2. chmod 4755 the_script.pl 3. As another user, execute the script. Actual Results: It prints your UID as both the real and effective UID. Expected Results: It should receive, and print out, the script's owner as the effective uid. I use three setUID Perl scripts for power and credential (encryption) management, i.e. when suspending my laptop. The recommended method of using sudo is definitely a step backward for me. This FAQ: http://www.faqs.org/faqs/unix-faq/faq/part4/section-7.html refers to a wrapper function which apparently was posted to comp.sources.unix about 20 years ago and is not on any archive sites that I could find. I've attached my own re-implementation of it. I'm using this as a workaround. But the problem with a wrapper is, Perl freaks out if ruid != euid, so the wrapper has to set both, losing an authoritative record of who called it and precluding reversion to that user. What I would like the developers to do: 1. Consider turning on Perl's "suid scripts are safe now" switch, enabling to use binfmt_misc for setUID initiation. Its -C implies -O, preventing the switched symlink exploit. 2. Find the wrapper mentioned in the FAQ, or make a modern professionally crafted version with a modern understanding of exploits and threats, and make it a pacakge in OpenSuSE. You may use my attached wrapper as a start point. 3. Tolerate space in Bugzilla for this report, and perhaps expand it with your comments and/or post a discussion of setUID Perl scripts in a findable FAQ. There is remarkably little indexed information about the setUID Perl issue. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.