dns/ddclient: DuckDNS token is written to syslog in clear text when the update request fails (native backend)
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- networking, security
Direzione di ricerca
La fuga si trova nel blocco except Exception della classe account DuckDNS in lib/account/duckdns.py, dove str(e) viene passato direttamente a syslog.syslog. Inizia confermando che l'URL della richiesta con il token raggiunge quel testo dell'eccezione. Poi intercetta l'errore e registra un messaggio che ometta l'URL o oscuri il valore della password. Il lavoro è completo quando un aggiornamento fallito non scrive mai il token in syslog e hai verificato se altre classi account in lib/account/ presentano lo stesso schema.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Important notices
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
With the native backend, lib/account/duckdns.py sends the token as a query parameter
(requests.get(proto+'://www.duckdns.org/update', data)) and on any exception logs str(e):
except Exception as e:
syslog.syslog(syslog.LOG_ERR, str(e))
For connection errors, requests includes the full request URL in the exception text, so the
log line contains the token in clear text, e.g.
HTTPSConnectionPool(host='www.duckdns.org', port=443): Max retries exceeded with url:
/update?domains=<name>&token=<TOKEN IN CLEAR TEXT>&ip=<ip> (Caused by ...)
The line is logged at LOG_ERR, so it also reaches every remote syslog target. Anyone who can read
the logs (locally or on the log server) can then repoint the DuckDNS name.
To Reproduce
- Configure a DuckDNS account in Services → Dynamic DNS (native backend).
- Make the first update fail at network level, e.g. right after a PPPoE reconnect before the
line is ready (this is how we saw it, twice in the last eight weeks), or by temporarily blocking
www.duckdns.org. - Look at the system log / remote syslog: the
ddclienterror line containstoken=....
Expected behavior
Credentials never appear in log output. For example, catch the exception and log without the URL,
or redact the token before logging:
except Exception as e:
msg = str(e).replace(self.settings.get('password') or '\0', '***')
syslog.syslog(syslog.LOG_ERR, f"DuckDNS update failed for {self.description}: {msg}")
(The dyndns2-based services are not affected: they send credentials via HTTPBasicAuth, so the
URL in an exception contains no secret. Other account classes that put secrets into the URL
may deserve the same check.)
Environment
- OPNsense 26.7.8_1 (amd64)
- os-ddclient as shipped with 26.7.8_1, native backend
- Lingua principale
- PHP
- Stelle
- 1.2k
- Fork
- 905
- Merge medio
- 4g 19h
- PR unite (30g)
- 16
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opnsense/plugins
-
security/tailscale: add description to restart serviceForse già presa @drpsyko101 l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 2 giorni
-
security/acme-client: missing accounts directory causes DNS-01 validation failureForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertasupport
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opnsense/plugins#5770 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
security/tor: Advanced mode / help toggles are brokenForse già presa @txr13 l’ha presa 45 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
os-opnproxy 1.0.5_5Apertaincomplete
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opnsense/plugins#5710 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
net/vnstat: use OPNsense interface names in dashboard widgetForse già presa @joeroback l’ha presa 108 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di opnsense/plugins
Issue simili
-
cleanup
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
[Bug]: Detection::detectString() / detectContent() never use finfo – missing use finfo; (regression from #54077)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta0. Needs triage 35-feedback bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
getgrav/grav-plugin-api#74 ·