M1-audit: UpdateFile accepts unvalidated BlobSize/ChunkCount — defeats the #75 disk-fill cap #87

Closed
opened 2026-11-07 08:40:52 +01:00 by amiryahaya · 0 comments
Owner

UploadBlob caps at the declared BlobSize (#75), but UpdateFile.cs:48-49 lets the uploader overwrite BlobSize/ChunkCount with any values while pending — no upper bound.

Trigger: upload-url with BlobSize=1 → PUT /files/{id} {"blobSize": 1099511627776} (still pending) → blob PUT with no Content-Length → 1 TB accepted past the guard.

Fix: apply CreateUploadUrl's rules (0 < BlobSize ≤ 5 GB, 1 ≤ ChunkCount ≤ 10k) in UpdateFile.

Part of M1 closure audit #84.

UploadBlob caps at the declared BlobSize (#75), but UpdateFile.cs:48-49 lets the uploader overwrite BlobSize/ChunkCount with any values while pending — no upper bound. **Trigger**: upload-url with BlobSize=1 → `PUT /files/{id} {"blobSize": 1099511627776}` (still pending) → blob PUT with no Content-Length → 1 TB accepted past the guard. **Fix**: apply CreateUploadUrl's rules (0 < BlobSize ≤ 5 GB, 1 ≤ ChunkCount ≤ 10k) in UpdateFile. Part of M1 closure audit #84.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#87
No description provided.