GPS time and position are trusted unless GPS_GUARD is enabled, and no variant enables it
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c
- 领域
- embedded-iot, security
调研方向
Start by tracing GpsGuard::acceptTime() and the GPS provider paths named in the issue: MicroNMEALocationProvider::updateTime() and RakLocationProvider. Check how build date, current fix, and GPS_GUARD_TIME_MAX_STEP affect time acceptance, then inspect the firmware variants to see how the guard is configured. Done means the default variants use the time checks while the position fence and speed checks remain opt-in, with relevant GPS tests or validation covering the behavior.
由索引模型根据 Issue 内容生成。
描述
GPS time and position are trusted without any sanity check unless GPS_GUARD is compiled in, and no variant enables it.
- Time. After about four seconds of "valid" GGA/RMC sentences,
MicroNMEALocationProvider::updateTime()sets the RTC to whatever the receiver reports, forwards or backwards (time_valid > 2), and again every 30 minutes. The RAK12500 path (RakLocationProvider) sets the clock from the first fix with a non-zero epoch and has no guard at all. - Position. Every valid fix replaces the last one, so the receiver alone decides the position that goes into adverts (when the location policy shares it) and into telemetry.
A wrong date doesn't need an attacker: GPS week-number rollover, or a cold start with a stale RTC. GNSS spoofing is cheap too. The clock matters more than the position here:
- message and advert timestamps come from it;
- a forward jump makes later messages from correctly clocked nodes look old;
- servers keep a per-client last timestamp, so a backward step can lock clients out of logins until the clock catches up.
Suggestion: turn on GpsGuard's time checks by default. acceptTime() already refuses a GPS time before the firmware's build date, uses it only while a trusted fix is current, and limits a correction to GPS_GUARD_TIME_MAX_STEP (600 s) once the clock is valid. The position fence and speed checks can stay opt-in. #3972 adds range checks on the date fields themselves, but those only reject impossible dates, not wrong ones.
Turning the guard on doesn't hurt the common reboot case. A board without a battery-backed RTC restarts at VolatileRTCClock's fixed base time (15 May 2024). That is before any current build date, so the guard treats it as an unset clock and lets the first trusted fix set the real time in one step. The step limit only applies once the clock already holds a plausible time. Nodes with GPS turned off are unaffected either way.
Found while fuzzing the GPS code paths on the host (AI-assisted, Claude); checked by me.
- 主要语言
- C
- 星标
- 3.9k
- 派生
- 1.5k
- 平均合并
- 2 天 7 小时
- 30 天内合并 PR
- 56
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
meshcore-dev/MeshCore 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
meshcore-dev/MeshCore#4015 ·
维护者通常 2 天内回复
-
CMD_SET_DEFAULT_FLOOD_SCOPE leaves an older, longer name's tail after the new name可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
meshcore-dev/MeshCore#3891 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
meshcore-dev/MeshCore#3826 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
meshcore-dev/MeshCore#3825 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
meshcore-dev/MeshCore#3781 ·
维护者通常 2 天内回复
查看 meshcore-dev/MeshCore 的全部 Issue
相似的 Issue
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBuffer未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
needs triage
难度 2/5 1-3 小时 新手友好度 72/100
389ds/389-ds-base#8251 ·
维护者通常 1 天内回复
-
bug data-types
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/clickhouse-cpp#645 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ROCm/hrx-system#3628 ·
维护者通常 1 天内回复