Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56479 - sys-kernel/*: fchown may allow unrestricted file groupIDs modifications
Summary: sys-kernel/*: fchown may allow unrestricted file groupIDs modifications
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Security
URL: http://cve.mitre.org/cgi-bin/cvename....
Whiteboard: A3 [kernel+]
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-08 12:56 UTC by Thierry Carrez (RETIRED)
Modified: 2011-10-30 22:42 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for 2.6 attr exploit (2.6-attr_exploit.patch,846 bytes, patch)
2004-07-08 17:12 UTC, Chris White (RETIRED)
no flags Details | Diff
2.6 kernel /proc filesystem missing attr check patch (2.6-proc_exploit.patch,1.34 KB, patch)
2004-07-08 17:13 UTC, Chris White (RETIRED)
no flags Details | Diff
2.4 kernel sys_chown exploit patch (2.4-chown_exploit.patch,659 bytes, patch)
2004-07-08 17:14 UTC, Chris White (RETIRED)
no flags Details | Diff
2.4 kernel missing ) in inode_change code patch (2.4-inode_change_exploit.patch,742 bytes, patch)
2004-07-08 17:14 UTC, Chris White (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Carrez (RETIRED) gentoo-dev 2004-07-08 12:56:18 UTC
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' 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
Comment 1 Chris White (RETIRED) gentoo-dev 2004-07-08 17:11:53 UTC
Got the patches from upstream.. posting them now.

btw, the issue was in attr code, not really in fchown code.
Comment 2 Chris White (RETIRED) gentoo-dev 2004-07-08 17:12:33 UTC
Created attachment 35037 [details, diff]
Patch for 2.6 attr exploit
Comment 3 Chris White (RETIRED) gentoo-dev 2004-07-08 17:13:26 UTC
Created attachment 35038 [details, diff]
2.6 kernel /proc filesystem missing attr check patch
Comment 4 Chris White (RETIRED) gentoo-dev 2004-07-08 17:14:12 UTC
Created attachment 35039 [details, diff]
2.4 kernel sys_chown exploit patch
Comment 5 Chris White (RETIRED) gentoo-dev 2004-07-08 17:14:55 UTC
Created attachment 35040 [details, diff]
2.4 kernel missing ) in inode_change code patch
Comment 6 Brandon Hale (RETIRED) gentoo-dev 2004-07-08 18:31:19 UTC
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.
Comment 7 Brandon Hale (RETIRED) gentoo-dev 2004-07-08 18:37:30 UTC
Con added the fixes to -ck5 upstream, so a version bump will close the vuln there as well. (Bump requested in #56337)
Comment 8 Thierry Carrez (RETIRED) gentoo-dev 2004-07-09 01:19:13 UTC
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.
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2004-07-09 06:20:41 UTC
Comment on attachment 35039 [details, diff]
2.4 kernel sys_chown exploit patch

Marking patch as obsolete since the 2.6 one does not have parenthesis issues
and applies fine on 2.4.
Comment 10 Tim Yamin (RETIRED) gentoo-dev 2004-07-09 06:20:58 UTC
Comment on attachment 35040 [details, diff]
2.4 kernel missing ) in inode_change code patch

Marking patch as obsolete since the 2.6 one does not have parenthesis issues
and applies fine on 2.4.
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2004-07-09 11:23:23 UTC
OK, everything should now be patched. The following sources remain, and I'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.
Comment 12 Guy Martin (RETIRED) gentoo-dev 2004-07-09 12:40:42 UTC
All done for hppa.
Comment 13 Konstantin Arkhipov (RETIRED) gentoo-dev 2004-07-10 05:36:54 UTC
all done for openMosix-sources.
Comment 14 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-10 13:40:22 UTC
In that case..
Comment 15 Tim Yamin (RETIRED) gentoo-dev 2004-07-11 05:47:44 UTC
Seems to be done for grsec-sources as well...
Comment 16 solar (RETIRED) gentoo-dev 2004-07-11 06:24:57 UTC
yeah twice.

updated revision to grsec-sources-2.4.26.2.0-r6 and added the openmosix-sources.CAN-2004-0497.patch
Comment 17 Joshua Brindle (RETIRED) gentoo-dev 2004-07-11 14:29:18 UTC
selinux-sources patched
Comment 18 Thierry Carrez (RETIRED) gentoo-dev 2004-07-16 06:12:41 UTC
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
Comment 19 Guillaume Destuynder (RETIRED) gentoo-dev 2004-07-16 10:23:04 UTC
rsbac-(dev-)sources: patched
Comment 20 Joshua Kinard gentoo-dev 2004-07-17 13:27:01 UTC
This was one of those patches I saw in an updated SuSE kernel, but I couldn'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)?
Comment 21 Thierry Carrez (RETIRED) gentoo-dev 2004-07-20 08:22:54 UTC
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
Comment 22 David Holm (RETIRED) gentoo-dev 2004-07-21 02:38:26 UTC
pegasos(-dev)-sources fixed
Comment 23 Andrea Luzzardi 2004-07-21 06:02:02 UTC
Heya, as I said in my ~/.away (http://dev.gentoo.org/devaway/), I don'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.
Comment 24 Tim Yamin (RETIRED) gentoo-dev 2004-07-22 05:09:16 UTC
GLSA 200407-16.
Comment 25 Joshua Kinard gentoo-dev 2004-07-22 19:19:20 UTC
mips-sources fixed
Comment 26 Thierry Carrez (RETIRED) gentoo-dev 2004-07-23 00:48:44 UTC
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...
Comment 27 Tim Yamin (RETIRED) gentoo-dev 2004-07-23 03:57:36 UTC
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.
Comment 28 Andrea Luzzardi 2004-07-23 07:36:50 UTC
hardened-sources fixed yesterday, before the GLSA went out.
Comment 29 Joshua Kinard gentoo-dev 2004-08-01 23:59:26 UTC
Mips fixed (I hope I'm not missing anything else)