Malformed telemetry can crash the server
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
The panic comes from an unwrap() on serde_json::from_str of data.isp_info at about line 202 of src/results/telemetry.rs, where the untrusted telemetry value is parsed into IPInfo. Start by reading that function and the IPInfo struct, then reproduce by sending a telemetry request with ispinfo={} and opening the returned result ID. Done when malformed ispinfo produces a fallback or a rejected request instead of a panic, and a test covers the malformed case.
Written by the indexing model from the issue text.
Description
When telemetry is enabled, a malformed ispinfo value can crash the server when a shared result is opened.
Steps to reproduce:
- Send a telemetry request with
ispinfo={}. - Use the returned result ID to open
/backend/results/?id=<id>. - The server panics with
missing field processedStringand exits.
Expected behavior:
Malformed telemetry should not crash the server. The result should use a safe fallback, or the telemetry request should be rejected.
Cause:
src/results/telemetry.rs line 202 parses untrusted telemetry with:
let isp_info: IPInfo = serde_json::from_str(&data.isp_info).unwrap();
Because this runs from a public endpoint, an unauthenticated user can repeatedly terminate the process.
Suggested fix:
Handle invalid ispinfo instead of using unwrap(). Fall back to the client IP or "Unknown connection". Validating ispinfo before storing it would also help.
- Dominant language
- Rust
- Stars
- 254
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from librespeed/speedtest-rust
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
librespeed/speedtest-rust#52 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
librespeed/speedtest-rust#36 · 2 comments ·
-
Upload requests with Transfer-Encoding: chunked hang foreverPossibly taken @maddie claimed this 99 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
librespeed/speedtest-rust#49 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
librespeed/speedtest-rust#48 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
librespeed/speedtest-rust#43 · 2 comments ·
All issues in librespeed/speedtest-rust
Similar issues
-
A-git C-bug S-needs-info
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
rust-lang/cargo#17794 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
LadybirdBrowser/ladybird#15821 ·
Maintainers usually reply within 1 day
-
`SortMergeJoinExec` panics instead of returning an error when its output coalescer rejects a batchOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
apache/datafusion#27728 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
limitlessprojects/Go-Hybrid#4764 ·
Maintainers usually reply within 1 day