BUG: Files upload Index rows can outlive matching installed bytes under contention #255

Open
opened 2026-09-27 18:07:14 +00:00 by kayg · 0 comments
Owner

Finding

The post-dev adversarial round found an Index and storage mismatch in the Files upload path.

tests/adversarial/attack.py ran eight concurrent 64 KiB TUS uploads and renames while 16 requests listed the same directory and CPU workers kept the host busy. The uploads and renames completed. The probe read the raw SQLite Index before listing could repair it. For all eight files (uploaded-0.bin through uploaded-7.bin), the Index row existed but the installed file bytes did not match the upload payload.

The server stayed alive. This is a data consistency finding, not a SLOW latency result. Please reproduce it on a quiet host, fix the install/Index ordering, and keep a regression test for concurrent upload, rename and listing.

Probe: tests/adversarial/attack.py, Files contention section. The round ran on job/fonts after merging dev at ac941215.

## Finding The post-`dev` adversarial round found an Index and storage mismatch in the Files upload path. `tests/adversarial/attack.py` ran eight concurrent 64 KiB TUS uploads and renames while 16 requests listed the same directory and CPU workers kept the host busy. The uploads and renames completed. The probe read the raw SQLite Index before listing could repair it. For all eight files (`uploaded-0.bin` through `uploaded-7.bin`), the Index row existed but the installed file bytes did not match the upload payload. The server stayed alive. This is a data consistency finding, not a SLOW latency result. Please reproduce it on a quiet host, fix the install/Index ordering, and keep a regression test for concurrent upload, rename and listing. Probe: `tests/adversarial/attack.py`, Files contention section. The round ran on `job/fonts` after merging `dev` at `ac941215`.
Sign in to join this conversation.
No labels
No milestone
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
kayg/calternal#255
No description provided.