Page MenuHomeFreeBSD

tarfs: Fix support for large files
ClosedPublic

Authored by des on Nov 12 2025, 7:07 PM.
Tags
None
Referenced Files
F149859563: D53718.diff
Fri, Mar 27, 3:55 PM
Unknown Object (File)
Fri, Mar 27, 8:14 AM
Unknown Object (File)
Fri, Mar 27, 5:17 AM
Unknown Object (File)
Thu, Mar 26, 3:49 PM
Unknown Object (File)
Wed, Mar 25, 11:11 AM
Unknown Object (File)
Fri, Mar 13, 2:53 AM
Unknown Object (File)
Sun, Mar 8, 6:47 PM
Unknown Object (File)
Sun, Mar 8, 6:27 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 68578
Build 65461: arc lint + arc unit