1.3 KiB
Test Case: Dot-Omitted OFF_MAX Cookie Rejection
Test ID: TC160-dot-omitted-offmax-cookie
Category: Directory Corruption
Priority: Critical
Regression: Synthetic dot at i_size + 1 overflowed signed directory offsets
Objective
Verify that a dot_omitted directory with i_size == OFF_MAX is rejected before
the synthetic dot entry can create an unrepresentable cookie or negative offset.
Fixture
dot-omitted-offmax.erofs contains an extended directory inode with a valid
backing block, flat-plain layout, the dot-omitted format bit, and
i_size=9223372036854775807. The structured helper records every mutated field
and the image hash.
Procedure
-
Mount the fixture and require
staton/offmax-dirto reportOFF_MAX. -
Run:
truss -o tc160.truss \ final_review_probe readdir-offmax /mnt/repo22-final/offmax-dir 97 -
The helper first calls
getdirentriesatOFF_MAX, then at offset 0. RequireEINTEGRITYboth times and require the descriptor offset to remain exactlyOFF_MAXand 0 respectively. -
Require both syscalls to show
ERR#97, compare dmesg, and clean all resources.
Expected Results
- No synthetic dot dirent or cookie is returned.
- Both reads fail with positive errno 97.
- No file offset becomes negative or advances after the error.