Bug 58843 - chown does not strip suid bit
Summary: chown does not strip suid bit
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-25 18:30 UTC by Need Real Name
Modified: 2007-04-18 16:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-02-11 16:29:57 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2002-01-25 18:30:41 UTC
Description of Problem:
chowning an suid file does not strip the suid bit.

IMHO this is an important safety feature.  I'm not sure at which version the 2.4
kernel series began doing this, but in 2.2 it was added into 2.2.13:
http://www.linux.org.uk/VERSION/relnotes.2213.html
(search for string "chown").

Steps to Reproduce:
1. chown nobody /bin/su
2. ls -l /bin/su


Actual Results:
-rws--x---    1 nobody     wheel       18452 Jul 23  2001 /bin/su

Expected Results:
-rwx--x---    1 nobody     wheel       18452 Jul 23  2001 /bin/su

Additional Information:
Reproducible at least on kernel-2.4.9-21

Comment 1 Alan Cox 2002-02-11 16:34:34 UTC
POSIX does not require this, furthermore there are other reasons it is a bad
idea such as mandatory locking flags. See the man page for a detailed discussion
on this.




Note You need to log in before you can comment on or make changes to this bug.