Fix double-counted Linux disk space from bind-mounted filesystems (#44969)
**Related issue:** Resolves #43091 # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. ## Testing - [ ] Added/updated automated tests - [x] QA'd all new/changed functionality manually Was able to reproduce by enrolling a Ubuntu 25.10 host and mounting / onto a different path like this: ```bash sudo mkdir -p /tmp/snap.rootfs_TESTING sudo mount --bind / /tmp/snap.rootfs_TESTING ``` Then, refetched vitals and saw the total disk space doubled: <img width="211" height="108" alt="Screenshot 2026-05-07 at 9 40 12 PM" src="https://github.com/user-attachments/assets/81cad4af-f146-4ea9-84e3-ee56eb426d8a" /> With the fix applied on this branch, refetched again and saw the correct total disk space: <img width="251" height="118" alt="Screenshot 2026-05-07 at 9 31 15 PM" src="https://github.com/user-attachments/assets/cbb6f91b-320a-4d48-8583-f5fdf5a4fcd9" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Bug Fixes - Resolved inaccurate total disk space reporting on Linux systems where the same filesystem is bind-mounted at multiple paths. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -0,0 +1 @@
|
||||
* Fixed Linux total disk space being double-counted when a filesystem was bind-mounted at multiple paths (e.g. snap-confine's `/tmp/snap.rootfs_*`).
|
||||
Reference in New Issue
Block a user