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 天 19 小時
- 30 天內合併 PR
- 61
環境準備
這個專案沒有提供開發容器、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 天內回覆