Files
erofs-freebsd-out-tree/tests/TC117-invalid-xattr-format.md
T
2026-08-18 09:20:44 +02:00

1.0 KiB

Test Case: Invalid xattr formats

Test ID: TC117-invalid-xattr-format Fixtures: bad-inline-entry.erofs, bad-shared-entry.erofs

Objective

Verify that an oversized inline e_value_size and an oversized shared e_value_size fail at xattr access without destabilizing the mount. The manifest must identify each exact field offset and before -> ffff mutation.

Manual steps

Test each image in a separate attach/mount/cleanup cycle:

stat -f 'mode=%Sp size=%z' /mnt/repo22-g4/corrupt-inline
truss -o /tmp/tc117-inline.truss getextattr -qq user bad \
  /mnt/repo22-g4/corrupt-inline
grep extattr_get_file /tmp/tc117-inline.truss
getextattr -qq -x user local /mnt/repo22-g4/shared-a
truss -o /tmp/tc117-shared.truss getextattr -qq user shared_key \
  /mnt/repo22-g4/shared-a
grep extattr_get_file /tmp/tc117-shared.truss

Expected results

Both malformed gets return EINTEGRITY (97); mount/stat and the independent inline local value still work. Neither image leaks a mount/md or hangs.