Bug 525398

Summary: RHEL4: Unable to write to file as non-root user with setuid and setgid bit set
Product: Red Hat Enterprise Linux 4 Reporter: Cong Wang <amwang>
Component: kernelAssignee: Cong Wang <amwang>
Status: CLOSED ERRATA QA Contact: Petr Beňas <pbenas>
Severity: high Docs Contact:
Priority: high    
Version: 4.9CC: eteo, pbenas, pstehlik, rkhan
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-16 15:48:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cong Wang 2009-09-24 08:45:53 UTC
From Sathisha Poojary:
I was working with RHEL 5 update 3 and noticed a minor inconvenience which was
a side effect of the RHEL5.3 patch BZ#463687 [kernel: open() call allows setgid
bit when user is not in new file's group].

Steps to reproduce the issue:

#mkdir /newdir
#touch /newdir/file1
#chmod 06777 /newdir/file1

#su newuser
$dd if=/dev/null of=/newdr/file1
dd: opening '/newdir/file1': Operation not permitted

However the dd works with 'conv=notrunc' option.

Comment 1 RHEL Program Management 2010-04-14 03:09:44 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 2 Vivek Goyal 2010-10-15 13:28:59 UTC
Committed in 89.44.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 8 Petr Beňas 2010-11-18 11:51:11 UTC
Reproduced in 89.43.EL and verified in 89.44.EL.

Comment 10 errata-xmlrpc 2011-02-16 15:48:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0263.html