Malformed telemetry can crash the server
还没有人认领这个 Issue。
评估
调研方向
panic 来自 src/results/telemetry.rs 第 202 行附近对 data.isp_info 执行 serde_json::from_str 后的 unwrap(),不可信的遥测值在这里被解析为 IPInfo。请先阅读该函数和 IPInfo 结构体,然后发送一个带有 ispinfo={} 的遥测请求并打开返回的结果 ID 来复现问题。当格式错误的 ispinfo 产生回退结果或被拒绝的请求而不是 panic,并且有测试覆盖该错误情况时,即为完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 254
- 派生
- 40
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
librespeed/speedtest-rust 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
librespeed/speedtest-rust#52 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 65/100
librespeed/speedtest-rust#36 · 2 条评论 ·
-
Upload requests with Transfer-Encoding: chunked hang forever可能已有人在做 @maddie 于 99 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
librespeed/speedtest-rust#49 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
librespeed/speedtest-rust#48 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
librespeed/speedtest-rust#43 · 2 条评论 ·
查看 librespeed/speedtest-rust 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
nervosnetwork/ckb#5405 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 2 天内回复
-
Releases do not move the `latest` Docker tag: the branch `30.12` is taken for the latest release branch可能已有人在做 @alexey-milovidov 今天认领。 未关闭comp-ci-infrastructure unexpected behaviour
难度 2/5 1-3 小时 新手友好度 70/100
ClickHouse/ClickHouse#134282 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复