Require BOOTP chaddr match for host→VM DHCP responses - #192
Conversation
Mirror openai#191 request-path identity checks: admit/forward DHCP BootReplies only when chaddr matches the VM MAC, so foreign client replies are not written into the guest fd. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37d4a80528
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return false; | ||
| }; | ||
|
|
||
| message_matches_bootp_client(&message, Opcode::BootReply, self.vm_mac_address.0) |
There was a problem hiding this comment.
Reject foreign DHCP replies instead of falling through policy
When a gateway UDP 67→68 packet contains another client's MAC, returning false here only denies the DHCP bypass; it does not reject the packet. allowed_from_host_ipv4 still immediately returns Some(()) for every legacy/stateless configuration where flows.is_none(), while stateful configurations without a matching inbound rule also default to allowing it. Consequently, foreign broadcast DHCP replies are still written to the VM under common configurations; identify DHCP-shaped responses and explicitly reject mismatched clients before the generic policy paths.
Useful? React with 👍 / 👎.
Summary
message_matches_bootp_client.vm.writen via the DHCP carve-out).Test plan
cargo test -p softnet --lib proxy::host::tests::dhcp_boot_reply_chaddr_must_match_vmNotes
Low-severity / hardening completion relative to #186/#191. Not framed as a high-impact isolation bypass.