Page MenuHomeFreeBSD

tarfs: Fix support for large files
ClosedPublic

Authored by des on Wed, Nov 12, 7:07 PM.
Tags
None
Referenced Files
F135978338: D53718.id166331.diff
Fri, Nov 14, 6:32 PM
F135966966: D53718.id.diff
Fri, Nov 14, 3:54 PM
F135966960: D53718.id166321.diff
Fri, Nov 14, 3:54 PM
F135956733: D53718.diff
Fri, Nov 14, 1:29 PM
Unknown Object (File)
Thu, Nov 13, 5:08 AM
Unknown Object (File)
Thu, Nov 13, 3:52 AM
Unknown Object (File)
Thu, Nov 13, 2:32 AM
Unknown Object (File)
Thu, Nov 13, 1:26 AM
Subscribers

Details

Summary
  • When fast-forwarding through a zstd frame, we incorrectly used the min() inline function instead of the MIN() macro. The function truncates the result to unsigned int, resulting in a decompression error when trying to seek more than 4 GB into the frame.
  • POSIX states that a size extended header record overrides the size field in the header if present, and that one must be included if the size of the file exceeds 8 GB (the size field maxes out at 64 GB).

MFC after: 1 week
Sponsored by: Klara, Inc.
Fixes: 69d94f4c7608 ("Add tarfs, a filesystem backed by tarballs.")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable