omfs: detect metadata chain cycles
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | omfs: detect directory sibling chain cyclesfs/ | +63 | 0 replies | |
| 2/2 | omfs: detect file extent chain cyclesfs/ | +78 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] omfs: detect metadata chain cycles
OMFS stores directory sibling chains and file extent continuation chains on disk. Both chains are terminated by ~0, but the next block values are image-controlled.
A crafted filesystem can create a cycle in either chain. Lookup of a missing directory entry or read of a file with a cyclic extent continuation then loops in the kernel.
This series detects cycles in both metadata chains. I verified the fixes with crafted OMFS images:
- directory sibling self-cycle:
unpatched kernel timed out after "statting /mnt/missing"; patched kernel returned ELOOP.
- file extent continuation self-cycle:
unpatched kernel timed out after "reading /mnt/loopfile"; patched kernel returned from read with EIO.
Valid directory and file images continued to behave normally.
이상호 (2):
omfs: detect directory sibling chain cycles
omfs: detect file extent chain cycles
fs/omfs/dir.c | 64 +++++++++++++++++++++++++++++++++++++++- fs/omfs/file.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 141 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0