Bug 6828
Summary: | Bogus FH in NFS request causes DoS in file system code | ||
---|---|---|---|
Product: | File System | Reporter: | Laurence Withers (l) |
Component: | NFS | Assignee: | Neil Brown (neilb) |
Status: | CLOSED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | ||
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.14.4 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: | working exploit code for this bug |
Description
Laurence Withers
2006-07-13 03:29:41 UTC
That sounds more like an ext3 bug to me. Why should it panic when confronted with an iget() request for an invalid inode instead of just returning an error? We don't assert that it's an NFS bug. The problem is that ext3 doesn't distinguish were calls to iget come from. In one case a lookup from a directory entry containing an invalid i-node number should cause a filesystem panic, one from some other part of the kernel shouldn't. Reiserfs silently ignores invalid i-node numbers. It would be trivial to patch ext3 to do the same, but then one loses some of the important consistencey checking in the filesystem. It would be better to have the code in ext3 track where the inode lookup request came from and act approriately. (Our tempororary work-around looked at the kernel call stack to determine if the inode came from NFS and ignore the error if it did. This is definately not the right way to fix the problem though.) Created attachment 8565 [details]
working exploit code for this bug
Possibly superfluous: this bug is easily reproduced with the 2.6.17.6 and 2.6.17.7 kernels. Personally I have not run this exploit but we have been facing the similar problem on our file server. There are two partitions (LVM) which are repeatedly being remounted as read-only after exporting them in NFS. The log messages gives error as "bad_inode_number: so-and-so" but after unmounting the partitions.Running fsck we do not find any errors. What is the fix for this? We are running RHEL-2.6.9-22. Anyway I found from one post on google that this could be because of NFS client's cache(when the server is offline) with wrong FH/non-existatnt inode request. Should we reboot/clear cache for all clients? This has been a BLOCKER for us. Please let us know if there is any fix in latest kernel or so. Regards; Rituraj This should be fixed in the latest 2.6.17.X kernel and will be fixed in 2.6.18. If you need a RHEL specific fix, you should talk to RedHat. |