Page MenuHomeFreeBSD

fusefs: handle evil servers that return illegal inode numbers
ClosedPublic

Authored by asomers on May 4 2022, 11:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 2, 10:13 AM
Unknown Object (File)
Thu, May 30, 7:05 PM
Unknown Object (File)
Thu, May 30, 7:05 PM
Unknown Object (File)
Thu, May 30, 6:05 PM
Unknown Object (File)
May 15 2024, 10:37 PM
Unknown Object (File)
May 3 2024, 5:39 PM
Unknown Object (File)
Apr 30 2024, 8:17 PM
Unknown Object (File)
Apr 30 2024, 8:02 PM
Subscribers

Details

Summary

fusefs: handle evil servers that return illegal inode numbers

  • If during FUSE_CREATE, FUSE_MKDIR, etc the server returns the same inode number for the new file as for its parent directory, reject it. Previously this would triggers a recurse-on-non-recursive lock panic.
  • If during FUSE_LINK the server returns a different inode number for the new name as for the old one, reject it. Obviously, that can't be a hard link.
  • If during FUSE_LOOKUP the server returns the same inode number for the new file as for its parent directory, reject it. Nothing good can come of this.

PR: 263662
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 2 weeks

Test Plan

tests added

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45477
Build 42365: arc lint + arc unit