-
Notifications
You must be signed in to change notification settings - Fork 0
archive extraction hardening #4
Copy link
Copy link
Open
Description
rabarbra
opened on Jul 13, 2026
Issue body actions
- Symlinks, hardlinks, and FIFOs are silently dropped. extractTar switches only on TypeDir and TypeReg, so a tarball containing symlinks extracts to an incomplete tree with no warning at all. Silent data loss is worse than an error.
- Setuid/setgid bits are preserved from the archive. Modes are applied raw via os.FileMode(header.Mode) with no masking. Mask with 0o777.
- Directory modes come from the archive too — a 0o400 dir entry makes every subsequent write into that directory fail. Create dirs 0o755 and chmod afterward.
- No decompression-bomb limit. io.Copy is unbounded, so a 42.zip-style archive fills the disk. Wrap in io.LimitReader with a total-size cap.
- The websocket DialContext response body is never closed (animated_svg.go:426).
Reactions are currently unavailable
Activity
Metadata
Metadata
Assignees
Labels
No labels