GPS time and position are trusted unless GPS_GUARD is enabled, and no variant enables it
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot, security
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C
- Stars
- 3.9k
- Forks
- 1.5k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 56
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 meshcore-dev/MeshCore
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
meshcore-dev/MeshCore#4015 ·
Maintainers usually reply within 2 days
-
CMD_SET_DEFAULT_FLOOD_SCOPE leaves an older, longer name's tail after the new namePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
meshcore-dev/MeshCore#3891 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
meshcore-dev/MeshCore#3826 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
meshcore-dev/MeshCore#3825 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshcore-dev/MeshCore#3781 ·
Maintainers usually reply within 2 days
All issues in meshcore-dev/MeshCore
Similar issues
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBufferOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
389ds/389-ds-base#8251 ·
Maintainers usually reply within 1 day
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ClickHouse/clickhouse-cpp#645 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ROCm/hrx-system#3628 ·
Maintainers usually reply within 1 day