<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>56479</bug_id>
          
          <creation_ts>2004-07-08 12:56 0000</creation_ts>
          <short_desc>sys-kernel/*: fchown may allow unrestricted file groupIDs modifications</short_desc>
          <delta_ts>2004-08-01 23:59:26 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Security</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0497</bug_file_loc>
          <status_whiteboard>A3 [kernel+]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>koon@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>chriswhite@gentoo.org</cc>
    
    <cc>eradicator@gentoo.org</cc>
    
    <cc>hardened@gentoo.org</cc>
    
    <cc>kang@gentoo.org</cc>
    
    <cc>pebenito@gentoo.org</cc>
    
    <cc>scox@sig11.org</cc>

      

      
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-07-08 12:56:18 0000</bug_when>
            <thetext>From http://xforce.iss.net/xforce/xfdb/16599 :

Linux kernel versions 2.4 and 2.6 could allow a local attacker to mount a remote file system from a vulnerable system and modify files&apos; group IDs, caused by a missing check in the fchown function.

Note: Linux kernel version 2.4 kernel is affected by this vulnerability if the file system is shared via an NFS server.

CAN-2004-0497</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chriswhite@gentoo.org</who>
            <bug_when>2004-07-08 17:11:53 0000</bug_when>
            <thetext>Got the patches from upstream.. posting them now.

btw, the issue was in attr code, not really in fchown code.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chriswhite@gentoo.org</who>
            <bug_when>2004-07-08 17:12:33 0000</bug_when>
            <thetext>Created an attachment (id=35037)
Patch for 2.6 attr exploit
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chriswhite@gentoo.org</who>
            <bug_when>2004-07-08 17:13:26 0000</bug_when>
            <thetext>Created an attachment (id=35038)
2.6 kernel /proc filesystem missing attr check patch
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chriswhite@gentoo.org</who>
            <bug_when>2004-07-08 17:14:12 0000</bug_when>
            <thetext>Created an attachment (id=35039)
2.4 kernel sys_chown exploit patch
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chriswhite@gentoo.org</who>
            <bug_when>2004-07-08 17:14:55 0000</bug_when>
            <thetext>Created an attachment (id=35040)
2.4 kernel missing ) in inode_change code patch
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tseng@gentoo.org</who>
            <bug_when>2004-07-08 18:31:19 0000</bug_when>
            <thetext>Both of these fixes have been in {gentoo,hardened}-dev-sources for a bit now.
I dont recall if there was an earlier Gentoo bug, but the SuSE/RH advisories have been around for a bit.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tseng@gentoo.org</who>
            <bug_when>2004-07-08 18:37:30 0000</bug_when>
            <thetext>Con added the fixes to -ck5 upstream, so a version bump will close the vuln there as well. (Bump requested in #56337)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-07-09 01:19:13 0000</bug_when>
            <thetext>Maybe this is already fixed in most of our sources, I opened this one to check that all sources are OK with this problem, as it was not listed in the recent kernel GLSA.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>plasmaroo@gentoo.org</who>
            <bug_when>2004-07-09 06:20:41 0000</bug_when>
            <thetext>(From update of attachment 35039)
Marking patch as obsolete since the 2.6 one does not have parenthesis issues
and applies fine on 2.4.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>plasmaroo@gentoo.org</who>
            <bug_when>2004-07-09 06:20:58 0000</bug_when>
            <thetext>(From update of attachment 35040)
Marking patch as obsolete since the 2.6 one does not have parenthesis issues
and applies fine on 2.4.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>plasmaroo@gentoo.org</who>
            <bug_when>2004-07-09 11:23:23 0000</bug_when>
            <thetext>OK, everything should now be patched. The following sources remain, and I&apos;m adding their maintainers to the CC list:

grsec-sources: Adding solar.
hardened-sources: Adding hardened herd and scox.
hppa-(dev-)sources: Adding GMSoft.
mips-sources: Adding `Kumba.
openmosix-sources: Adding the cluster herd.
pegasos-(dev-)sources: Adding dholm.
rsbac-(dev-)sources: Adding kang.
selinux-sources: Adding pebenito.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gmsoft@gentoo.org</who>
            <bug_when>2004-07-09 12:40:42 0000</bug_when>
            <thetext>All done for hppa.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>voxus@gentoo.org</who>
            <bug_when>2004-07-10 05:36:54 0000</bug_when>
            <thetext>all done for openMosix-sources.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dberkholz@gentoo.org</who>
            <bug_when>2004-07-10 13:40:22 0000</bug_when>
            <thetext>In that case..</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>plasmaroo@gentoo.org</who>
            <bug_when>2004-07-11 05:47:44 0000</bug_when>
            <thetext>Seems to be done for grsec-sources as well...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2004-07-11 06:24:57 0000</bug_when>
            <thetext>yeah twice.

updated revision to grsec-sources-2.4.26.2.0-r6 and added the openmosix-sources.CAN-2004-0497.patch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>method@gentoo.org</who>
            <bug_when>2004-07-11 14:29:18 0000</bug_when>
            <thetext>selinux-sources patched</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-07-16 06:12:41 0000</bug_when>
            <thetext>Still waiting for the following sources to be patched for CAN-2004-0497:
- hardened-sources
- mips-sources [reAdding `Kumba]
- pegasos-(dev-)sources
- rsbac-(dev-)sources</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kang@gentoo.org</who>
            <bug_when>2004-07-16 10:23:04 0000</bug_when>
            <thetext>rsbac-(dev-)sources: patched</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kumba@gentoo.org</who>
            <bug_when>2004-07-17 13:27:01 0000</bug_when>
            <thetext>This was one of those patches I saw in an updated SuSE kernel, but I couldn&apos;t find a description or patch for -0497.  Is there a description and/or patch for -0496 as well (also fixed in the updated SuSE kernel)?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-07-20 08:22:54 0000</bug_when>
            <thetext>The only reference I can find on -0496 is the SuSE advisory. No description, no patch. According to CVE description, it is a superset of the Sparse-found vulnerabilities we already fixed (-0495).

Still waiting for :
- hardened-sources
- mips-sources
- pegasos-(dev-)sources
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dholm@gentoo.org</who>
            <bug_when>2004-07-21 02:38:26 0000</bug_when>
            <thetext>pegasos(-dev)-sources fixed</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scox@sig11.org</who>
            <bug_when>2004-07-21 06:02:02 0000</bug_when>
            <thetext>Heya, as I said in my ~/.away (http://dev.gentoo.org/devaway/), I don&apos;t have
any connection at home at the moment (so no access to CVS).

I could however bring my ssh keys at work tomorrow, if noone else from the
hardened herd can add the patch for me.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>plasmaroo@gentoo.org</who>
            <bug_when>2004-07-22 05:09:16 0000</bug_when>
            <thetext>GLSA 200407-16.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kumba@gentoo.org</who>
            <bug_when>2004-07-22 19:19:20 0000</bug_when>
            <thetext>mips-sources fixed</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2004-07-23 00:48:44 0000</bug_when>
            <thetext>GLSA should be updated to reflect the mips-sources fix. 

Additionally, development-sources-2.6.8_rc1 should be marked stable on x86, ppc, arm as it is the fixed version...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>plasmaroo@gentoo.org</who>
            <bug_when>2004-07-23 03:57:36 0000</bug_when>
            <thetext>Readding `Kumba - the 2.6 kernels also need the /proc patch attached to this bug; and 2.4 needs patching for CAN-2004-0497, but not the /proc issue.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scox@sig11.org</who>
            <bug_when>2004-07-23 07:36:50 0000</bug_when>
            <thetext>hardened-sources fixed yesterday, before the GLSA went out.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kumba@gentoo.org</who>
            <bug_when>2004-08-01 23:59:26 0000</bug_when>
            <thetext>Mips fixed (I hope I&apos;m not missing anything else)</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>35037</attachid>
            <date>2004-07-08 17:12 0000</date>
            <desc>Patch for 2.6 attr exploit</desc>
            <filename>2.6-attr_exploit.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBkaWZmIC1OcnUgc3R5bGUgcGF0Y2guCiMK
IyBDaGFuZ2VTZXQKIyAgIDIwMDQvMDcvMDIgMjA6NTU6MDQtMDc6MDAgY2hyaXN3QG9zZGwub3Jn
IAojICAgW1BBVENIXSBjaG93biBwZXJtaXNzaW9uIGNoZWNrIGZpeCBmb3IgQVRUUl9HSUQKIyAg
IAojICAgU3VTRSBkaXNjb3ZlcmVkIHRoaXMgcHJvYmxlbSB3aXRoIGNob3duIGFuZCBBVFRSX0dJ
RC4gIE1ha2Ugc3VyZSB1c2VyCiMgICBpcyBhdXRob3JpemVkIHRvIGNoYW5nZSB0aGUgZ3JvdXAs
IENBTi0yMDA0LTA0OTcuCiMgCiMgZnMvYXR0ci5jCiMgICAyMDA0LzA3LzAyIDA5OjA3OjMyLTA3
OjAwIGNocmlzd0Bvc2RsLm9yZyArMiAtMQojICAgY2hvd24gcGVybWlzc2lvbiBjaGVjayBmaXgg
Zm9yIEFUVFJfR0lECiMgCmRpZmYgLU5ydSBhL2ZzL2F0dHIuYyBiL2ZzL2F0dHIuYwotLS0gYS9m
cy9hdHRyLmMJMjAwNC0wNy0wOCAxNjozNTo1NyAtMDc6MDAKKysrIGIvZnMvYXR0ci5jCTIwMDQt
MDctMDggMTY6MzU6NTcgLTA3OjAwCkBAIC0zNSw3ICszNSw4IEBACiAKIAkvKiBNYWtlIHN1cmUg
Y2FsbGVyIGNhbiBjaGdycC4gKi8KIAlpZiAoKGlhX3ZhbGlkICYgQVRUUl9HSUQpICYmCi0JICAg
ICghaW5fZ3JvdXBfcChhdHRyLT5pYV9naWQpICYmIGF0dHItPmlhX2dpZCAhPSBpbm9kZS0+aV9n
aWQpICYmCisJICAgIChjdXJyZW50LT5mc3VpZCAhPSBpbm9kZS0+aV91aWQgfHwKKwkgICAgKCFp
bl9ncm91cF9wKGF0dHItPmlhX2dpZCkgJiYgYXR0ci0+aWFfZ2lkICE9IGlub2RlLT5pX2dpZCkp
ICYmCiAJICAgICFjYXBhYmxlKENBUF9DSE9XTikpCiAJCWdvdG8gZXJyb3I7CiAK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>35038</attachid>
            <date>2004-07-08 17:13 0000</date>
            <desc>2.6 kernel /proc filesystem missing attr check patch</desc>
            <filename>2.6-proc_exploit.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBkaWZmIC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N0IGlhdHRyICppYXR0cikKIHsKIAlzdHJ1Y3QgaW5vZGUgKmlu
b2RlID0gZGVudHJ5LT5kX2lub2RlOwotCWludCBlcnJvciA9IGlub2RlX3NldGF0dHIoaW5vZGUs
IGlhdHRyKTsKLQlpZiAoIWVycm9yKSB7Ci0JCXN0cnVjdCBwcm9jX2Rpcl9lbnRyeSAqZGUgPSBQ
REUoaW5vZGUpOwotCQlkZS0+dWlkID0gaW5vZGUtPmlfdWlkOwotCQlkZS0+Z2lkID0gaW5vZGUt
PmlfZ2lkOwotCQlkZS0+bW9kZSA9IGlub2RlLT5pX21vZGU7Ci0JfQorCXN0cnVjdCBwcm9jX2Rp
cl9lbnRyeSAqZGUgPSBQREUoaW5vZGUpOworCWludCBlcnJvcjsKIAorCWVycm9yID0gaW5vZGVf
Y2hhbmdlX29rKGlub2RlLCBpYXR0cik7CisJaWYgKGVycm9yKQorCQlnb3RvIG91dDsKKworCWVy
cm9yID0gaW5vZGVfc2V0YXR0cihpbm9kZSwgaWF0dHIpOworCWlmIChlcnJvcikKKwkJZ290byBv
dXQ7CisJCisJZGUtPnVpZCA9IGlub2RlLT5pX3VpZDsKKwlkZS0+Z2lkID0gaW5vZGUtPmlfZ2lk
OworCWRlLT5tb2RlID0gaW5vZGUtPmlfbW9kZTsKK291dDoKIAlyZXR1cm4gZXJyb3I7CiB9CiAK
</data>        

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>35039</attachid>
            <date>2004-07-08 17:14 0000</date>
            <desc>2.4 kernel sys_chown exploit patch</desc>
            <filename>2.4-chown_exploit.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBkaWZmIC1OcnUgc3R5bGUgcGF0Y2guCiMK
IyBDaGFuZ2VTZXQKIyAgIDIwMDQvMDcvMDMgMTg6MzI6NDAtMDM6MDAgbWFyY2Vsb0Bsb2dvcy5j
bmV0IAojICAgICBUaG9tYXMgQmllZ2U6IEZpeCBtaXNzaW5nIERBQyBjaGVjayBvbiBzeXNfY2hv
d24KIyAKIyBmcy9hdHRyLmMKIyAgIDIwMDQvMDcvMDMgMTg6Mjg6MzAtMDM6MDAgbWFyY2Vsb0Bs
b2dvcy5jbmV0ICsxIC0wCiMgICBUaG9tYXMgQmllZ2U6IEZpeCBtaXNzaW5nIERBQyBjaGVjayBv
biBzeXNfY2hvd24KIyAKZGlmZiAtTnJ1IGEvZnMvYXR0ci5jIGIvZnMvYXR0ci5jCi0tLSBhL2Zz
L2F0dHIuYwkyMDA0LTA3LTA4IDE3OjA1OjIwIC0wNzowMAorKysgYi9mcy9hdHRyLmMJMjAwNC0w
Ny0wOCAxNzowNToyMCAtMDc6MDAKQEAgLTMzLDYgKzMzLDcgQEAKIAogCS8qIE1ha2Ugc3VyZSBj
YWxsZXIgY2FuIGNoZ3JwLiAqLwogCWlmICgoaWFfdmFsaWQgJiBBVFRSX0dJRCkgJiYKKwkgICAg
KGN1cnJlbnQtPmZzdWlkICE9IGlub2RlLT5pX3VpZCB8fAogCSAgICAoIWluX2dyb3VwX3AoYXR0
ci0+aWFfZ2lkKSAmJiBhdHRyLT5pYV9naWQgIT0gaW5vZGUtPmlfZ2lkKSAmJgogCSAgICAhY2Fw
YWJsZShDQVBfQ0hPV04pKQogCQlnb3RvIGVycm9yOwo=
</data>        

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>35040</attachid>
            <date>2004-07-08 17:14 0000</date>
            <desc>2.4 kernel missing ) in inode_change code patch</desc>
            <filename>2.4-inode_change_exploit.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBkaWZmIC1OcnUgc3R5bGUgcGF0Y2guCiMK
IyBDaGFuZ2VTZXQKIyAgIDIwMDQvMDcvMDMgMTk6Mjk6NDUtMDM6MDAgbWFyY2Vsb0Bsb2dvcy5j
bmV0IAojICAgICBBZGQgbWlzc2luZyBicmFja2V0IHRvIGlub2RlX2NoYW5nZV9vaygpIGZpeAoj
ICAgVEFHOiB2Mi40LjI3LXJjMwojIAojIGZzL2F0dHIuYwojICAgMjAwNC8wNy8wMyAxOToyODoy
OS0wMzowMCBtYXJjZWxvQGxvZ29zLmNuZXQgKzEgLTEKIyAgIEFkZCBtaXNzaW5nIGJyYWNrZXQg
dG8gaW5vZGVfY2hhbmdlX29rKCkgZml4CiMgCmRpZmYgLU5ydSBhL2ZzL2F0dHIuYyBiL2ZzL2F0
dHIuYwotLS0gYS9mcy9hdHRyLmMJMjAwNC0wNy0wOCAxNzowNjo1OCAtMDc6MDAKKysrIGIvZnMv
YXR0ci5jCTIwMDQtMDctMDggMTc6MDY6NTggLTA3OjAwCkBAIC0zNCw3ICszNCw3IEBACiAJLyog
TWFrZSBzdXJlIGNhbGxlciBjYW4gY2hncnAuICovCiAJaWYgKChpYV92YWxpZCAmIEFUVFJfR0lE
KSAmJgogCSAgICAoY3VycmVudC0+ZnN1aWQgIT0gaW5vZGUtPmlfdWlkIHx8Ci0JICAgICghaW5f
Z3JvdXBfcChhdHRyLT5pYV9naWQpICYmIGF0dHItPmlhX2dpZCAhPSBpbm9kZS0+aV9naWQpICYm
CisJICAgICghaW5fZ3JvdXBfcChhdHRyLT5pYV9naWQpICYmIGF0dHItPmlhX2dpZCAhPSBpbm9k
ZS0+aV9naWQpKSAmJgogCSAgICAhY2FwYWJsZShDQVBfQ0hPV04pKQogCQlnb3RvIGVycm9yOwog
Cg==
</data>        

          </attachment>
    </bug>

</bugzilla>