GPS time and position are trusted unless GPS_GUARD is enabled, and no variant enables it
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- c
- Domaine
- embedded-iot, security
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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.
- Langage dominant
- C
- Étoiles
- 3.9k
- Forks
- 1.5k
- Merge moyen
- 2 j 19 h
- PR mergées (30 j)
- 61
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de meshcore-dev/MeshCore
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
meshcore-dev/MeshCore#4015 ·
Les mainteneurs répondent en général sous 2 jours
-
CMD_SET_DEFAULT_FLOOD_SCOPE leaves an older, longer name's tail after the new namePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
meshcore-dev/MeshCore#3891 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
meshcore-dev/MeshCore#3826 ·
Les mainteneurs répondent en général sous 2 jours
-
App Preset Australia: NTOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
meshcore-dev/MeshCore#3825 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
meshcore-dev/MeshCore#3781 ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de meshcore-dev/MeshCore
Issues similaires
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBufferOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
needs triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
389ds/389-ds-base#8251 ·
Les mainteneurs répondent en général sous 1 jour
-
bug data-types
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
ClickHouse/clickhouse-cpp#645 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ROCm/hrx-system#3628 ·
Les mainteneurs répondent en général sous 1 jour