containers / composefs

The reliability of disk images, the flexibility of files
Other
462 stars 37 forks source link

Verify payload length early on #310

Closed cgwalters closed 3 months ago

cgwalters commented 3 months ago

I was looking at something else here and happened to notce we didn't seem to be sanity checking the length of strings in some places.

Looking harder, first thing I checked is a really long filename in a dump file; that's fine, we do check that.

Next I tried symlinks, and that caused a an assertion trip process abort (thankfully at least) deep in the bowels of the EROFS generation.

Fix this by checking the payload length against PATH_MAX.

Also: