Bug 7385
Summary: | nfs4 broken in vanilla-sources 2.6.19 | ||
---|---|---|---|
Product: | File System | Reporter: | Huemi (t.himmelbauer) |
Component: | NFS | Assignee: | Trond Myklebust (trondmy) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | ||
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | vanilla-sources 2.6.19 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: | NFSv4: Fix thinko in fs/nfs/super.c |
Description
Huemi
2006-10-19 06:31:41 UTC
Created attachment 9303 [details]
NFSv4: Fix thinko in fs/nfs/super.c
Known bug due to a combination of a bug in Gentoo's implementation of "mount"
for NFSv4, and a kernel-side "fix" that was incorrect.
Thanks for the patch. Using the patch I was able to test my permission problem with vanilla-sources 2.6.19_rc2 and even there it exists. I'm able to read and write from and to my own files even with permissions set to 0000. Try it on a local file system (or with nfs) and you will find out that this is not the usual filesystem behaviour. So I think nfs4 has a bug regarding file permission handling. It is not a real security bug, because you can't read or write files of others without appropriate permissions, but your programs can overwrite your files without changing permissions. That is an entirely different issue that has nothing to do with the bug you reported above. All NFS servers have traditionally implemented this policy because NFSv2 and NFSv3 are stateless (there is no protocol equivalent of open() or close()). In order to make open("foo", O_CREATE|O_WRITE, 0) work, you have to allow writing by the owner to these files. NFSv4 introduces state, and has both OPEN and CLOSE, so it can remove the 'writeable 0 mode file' hack. I believe Bruce already has a patch for this in his latest CITI_ALL series. To clarify what I meant above: I believe a fix for the permission issue is available, but if you would still like to report it in the bugzilla, then please file it under a new entry, so that we keep it separate from the mount problem. |