Repository navigation
v1.24.0 — Security Hardening & Correctness Fixes
Summary
Comprehensive security hardening and correctness audit addressing 33 issues (11 high, 14 medium, 8 low) identified in a full codebase review. Post-fix rating improved from B- (72/100) to A- (82/100).
Security (7 fixes)
- SSRF bypass via proxy-mode requests and permissive domain matching
- IP blocklist bypass via hex/octal/decimal encoding
- DNS rebinding in CONNECT handler
- pprof endpoints exposed without authentication
- Unbounded allocation from peer-controlled size field
- Decompression bomb protection on Packages files
- Unbounded in-memory package index growth
Correctness (18 fixes)
- TOCTOU race in upload tracking (atomic tryAcceptUpload)
- Cache currentSize double-counting on duplicate Put
- Data corruption on FetchToWriter retry (removed retry)
- rate.WaitN panic when n > burst (burst-sized splitting)
- LimitedWriter.Write failing on large buffers
- ParseSize never returning errors / integer overflow
- Off-by-one in chunk range boundaries
- reloadConfig no-op for rate limits
- trackedReader.closed data race (sync.Once)
- packagePath panic on short hash
- File removed before DB delete in deleteUnlocked
- Audit byte counting drift (countingWriter)
- DurationTracker unbounded memory growth (ring buffer)
- Division by zero producing +Inf throughput
- Nil pointer deref when downloader cfg is nil
- Assembly file created in CWD when resume disabled
- Flag override logic for default values (cobra Changed())
- SIGHUP reload not available on Windows (runtime guard)
Resilience (8 fixes)
- Bounded peer stream reads (256-byte LimitReader)
- Two-phase stream deadlines (header + size-proportional)
- DownloadRange offset-to-EOF support
- Audit rotation continues on failure instead of dropping events
- checkFilePermissions world-writable detection
- Decompression limited to 512MB per file
- Package index capped at 500,000 entries per repo
- Overflow-safe ParseSize with strconv.ParseInt
Stats
- 33 issues fixed across 19 files
- Zero regressions in full test suite
- Codebase rating: B- (72) → A- (82)
Installation
Debian/Ubuntu (.deb):
wget https://github.com/clintcan/debswarm/releases/download/v1.24.0/debswarm_1.24.0-1_amd64.deb
sudo dpkg -i debswarm_1.24.0-1_amd64.debBinary (Linux amd64):
curl -sSL https://github.com/clintcan/debswarm/releases/download/v1.24.0/debswarm_1.24.0_linux_amd64.tar.gz | sudo tar -xz -C /usr/local/bin debswarmFull Changelog: v1.23.0...v1.24.0