Skip to content

chore: Limit port 19522 (SEV key exchange server) to be called by the peer VM only - #11440

Merged
frankdavid merged 1 commit into
masterfrom
frankdavid/limit-19522
Sep 4, 2026
Merged

chore: Limit port 19522 (SEV key exchange server) to be called by the peer VM only#11440
frankdavid merged 1 commit into
masterfrom
frankdavid/limit-19522

Conversation

@frankdavid

Copy link
Copy Markdown
Contributor

No description provided.

@frankdavid
frankdavid requested review from r-birkner and a balanced review from Copilot September 3, 2026 16:21
@frankdavid
frankdavid requested review from a team as code owners September 3, 2026 16:21
@github-actions github-actions Bot added the chore label Sep 3, 2026
@zeropath-ai

zeropath-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 42ef6a2.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/ic_os/config/tool/src/guestos/generate_ic_config.rs
       Add peer_guest_vm_address field to IcConfigTemplate
► rs/ic_os/config/tool/src/guestos/generate_ic_config.rs
       Populate peer_guest_vm_address from guestos_config.upgrade_config.peer_guest_vm_address
Enhancement ► rs/ic_os/config/tool/templates/ic.json5.template
       Open disk encryption key exchange port (19522) for peer_guest_vm_address when provided
Enhancement ► rs/orchestrator/src/firewall.rs
       Set default peer_guest_vm_address in test/template usage
Enhancement ► rs/orchestrator/testdata/nftables_assigned_cloud_engine.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_assigned_replica.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_boundary_node_app_subnet.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_boundary_node_system_subnet.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_unassigned_cloud_engine.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_unassigned_replica.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/tests/driver/src/driver/ic.rs
    Update whitelisted ports description to mention 19522 is restricted to peer Guest VM
Enhancement ► rs/tests/driver/src/util.rs
    Set peer_guest_vm_address to None in test config

@zeropath-ai

zeropath-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 42ef6a2.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/ic_os/config/tool/src/guestos/generate_ic_config.rs
       Add peer_guest_vm_address field to IcConfigTemplate
► rs/ic_os/config/tool/src/guestos/generate_ic_config.rs
       Populate peer_guest_vm_address from guestos_config.upgrade_config.peer_guest_vm_address
Enhancement ► rs/ic_os/config/tool/templates/ic.json5.template
       Open disk encryption key exchange port (19522) for peer_guest_vm_address when provided
Enhancement ► rs/orchestrator/src/firewall.rs
       Set default peer_guest_vm_address in test/template usage
Enhancement ► rs/orchestrator/testdata/nftables_assigned_cloud_engine.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_assigned_replica.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_boundary_node_app_subnet.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_boundary_node_system_subnet.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_unassigned_cloud_engine.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/orchestrator/testdata/nftables_unassigned_replica.conf.golden
    Reflect disk encryption key exchange rule for peer_guest_vm_address
Enhancement ► rs/tests/driver/src/driver/ic.rs
    Update whitelisted ports description to mention 19522 is restricted to peer Guest VM
Enhancement ► rs/tests/driver/src/util.rs
    Set peer_guest_vm_address to None in test config

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The reviewed changes have no unresolved approval-blocking issues.

Pull request overview

Restricts SEV key-exchange port 19522 to the configured peer Guest VM.

Changes:

  • Adds peer-address-aware nftables rules.
  • Updates firewall golden files and rendering tests.
  • Clarifies test-driver firewall documentation.
File summaries
File Description
rs/tests/driver/src/util.rs Supplies the optional peer-address template field.
rs/tests/driver/src/driver/ic.rs Documents the restricted port.
rs/orchestrator/testdata/nftables_unassigned_replica.conf.golden Updates unassigned replica rules.
rs/orchestrator/testdata/nftables_unassigned_cloud_engine.conf.golden Updates unassigned cloud-engine rules.
rs/orchestrator/testdata/nftables_boundary_node_system_subnet.conf.golden Updates system-subnet boundary-node rules.
rs/orchestrator/testdata/nftables_boundary_node_app_subnet.conf.golden Updates app-subnet boundary-node rules.
rs/orchestrator/testdata/nftables_assigned_replica.conf.golden Updates assigned replica rules.
rs/orchestrator/testdata/nftables_assigned_cloud_engine.conf.golden Updates assigned cloud-engine rules.
rs/orchestrator/src/firewall.rs Provides a peer address to golden tests.
rs/ic_os/config/tool/templates/ic.json5.template Restricts port 19522 to the peer address.
rs/ic_os/config/tool/src/guestos/generate_ic_config.rs Propagates and tests the peer address.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@r-birkner r-birkner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The change will be active at the next upgrade. So, we will only see an issue at the next next upgrade.

@frankdavid
frankdavid added this pull request to the merge queue Sep 4, 2026
Merged via the queue into master with commit 560f51c Sep 4, 2026
49 of 51 checks passed
@frankdavid
frankdavid deleted the frankdavid/limit-19522 branch September 4, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants