Files
firmware/src
Ben Meadors f6f3284cfc fix(lockdown): re-lock serial console admin auth on USB link drop (#11028)
On lockdown builds (MESHTASTIC_PHONEAPI_ACCESS_CONTROL, nRF52) the SerialConsole
is a process-lifetime singleton, so the per-connection admin-auth slot keyed by
its inherited PhoneAPI* is reused for every USB/serial client for the whole boot.
An operator's admin unlock stayed latched across serial client swaps: an attacker
plugging into the USB/serial port before the prior session's 15-minute inactivity
timeout inherited admin authorization -- the serial analog of the BLE stale-session
reuse bug closed by resetting state in onConnect()/onDisconnect().

Sample the USB-CDC host link (DTR/mount) state each runOnce(); on the link-drop
edge call close(), which frees the auth slot and resets PhoneAPI state so whoever
connects next re-locks via handleStartConfig()'s !isConnected() branch on their
first want_config -- the same physical-link boundary BLE enforces in onConnect().
On the nRF52 TinyUSB (Adafruit) core, (bool)Port == tud_cdc_n_connected(), which
goes false on cable unplug or host port-close. Console transports without a real
DTR line fall back to the existing inactivity timeout, no worse than before.

Entirely nRF52-lockdown-gated; non-lockdown builds are byte-identical.
2026-07-17 07:05:11 -05:00
..
2026-03-24 12:39:21 -05:00
2026-07-16 18:35:33 -05:00
2026-07-01 19:01:27 -05:00
2026-01-29 05:56:19 -06:00
2026-02-19 07:16:33 -06:00
2026-07-16 18:35:33 -05:00
2026-05-11 11:46:13 -05:00
2026-07-01 19:01:27 -05:00
2026-07-16 18:57:50 -05:00
2026-07-01 19:01:27 -05:00
2023-01-21 21:23:24 +01:00
2026-07-01 19:01:27 -05:00
2026-07-16 18:57:50 -05:00