Repository navigation
fix(start-wrt): count a DNS publishing request only from a proven source - #4657
Conversation
The device page's "trying to publish DNS records" note came from any update refused for lacking the permission, including unsigned UDP. A UDP source address is not proven and the router does no reverse-path filtering, so a device in one profile could forge an update from a device in another and raise the note there, prompting the admin to grant a permission that device never asked for. The transport check now precedes the permission check: an unsigned UDP update is refused as needing TCP and never counts as asking. An unsigned update over TCP, which StartOS sends, still counts. Inbound VPN peers sign their updates and send them over UDP. Only permitted peers' TSIG keys were loaded, so an unpermitted peer's signature could not be verified and, with the reorder, its request would no longer surface. Every peer's key is now loaded for verification; the directory of who may publish still holds only permitted peers.
helix-white
left a comment
There was a problem hiding this comment.
Approved at 25e5b22d1c3d1d04a650905967029a3dd7aaa0b3; no correctness findings. git merge-tree --write-tree origin/master HEAD succeeds, and GitHub reports MERGEABLE.
Unsigned UDP updates can no longer raise the device page’s DNS-publishing request note using a forged source address. An unsigned TCP request still counts, as does a correctly signed UDP request from an inbound VPN peer without publishing permission. The source-proof requirement is recorded beside the production policy gate.
The change reuses the shared injector’s existing TCP/TSIG evidence and refusal tracking. Loading every configured inbound peer’s derived verification key does not grant publishing permission: admission and ownership sweeping still use the permitted-peer directory. The additional map is an in-memory snapshot rebuilt by the existing refresher; there is no persisted configuration, API schema, or migration change. The existing unreleased Activity-log fragment still describes the feature accurately.
Implementation diff: +19 / −13 lines in 1 file (excludes lockfiles, tests, docs, release notes, and changelog).
Verification evidence is author-reported: the pre-rebase suite passed 875 startwrt-core and 30 uciedit tests; K1 bench checks reproduced the forged-UDP hint on master and confirmed its removal, retained TCP hints, and permitted TCP publishing with the fix. Inbound VPN behavior was covered by unit tests, not the bench. The reviewed head has a clean recorded formatting check; the author also reports passing tests on a local merge with #4658. I inspected the regressions, shared TSIG verification, transport callers, device-status consumers, and revocation sweep without running builds or tests. Current CI has passed Prettier and conflict checks; the riscv64 build, automated tests, formatting/lockfiles, generated artifacts, dependency licenses, and changelog/version checks remain pending.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
The device page's "trying to publish DNS records" note (#4608) counted any update refused for lacking the permission, including unsigned UDP. A UDP source address is not proven and the router does no reverse-path filtering, so a device in one profile could forge an update from a device in another and raise the note there, prompting the admin to grant a permission that device never asked for.
No changelog fragment: this refines the #4608 note, which has not been released.
Verification
On f6185a93e (before the rebase):
make start-wrt-test: startwrt-core 875 passed, uciedit 30 passed, 0 failed.Rebased onto master 0b69dc3 (#4656) without conflicts; the master commits taken in change no start-wrt or start-core code. On 25e5b22:
make start-wrt-format-checkclean.This and #4658 (port-forward request note) both edit
dns_inject.rs. They merge without conflicts in either order, andmake start-wrt-testpasses on a local merge of both heads (startwrt-core 878, uciedit 30, 0 failed).