Skip to content

--efa runs aws-efa-installer-latest as root with no sha256 or signature check #1505

Closed

Description

@scttfrdmn

Summary

The MPI user data runs the EFA installer as root with no integrity check. pkg/userdata/mpi.go (the {{if .EFAEnabled}} block) does curl -O https://efa-installer.amazonaws.com/aws-efa-installer-latest.tar.gz, then tar -xf, then ./efa_installer.sh -y -g. No sha256 or signature is checked, and latest is a moving target, so every --efa launch runs whatever bytes that URL serves at boot. This differs from the AWS CLI (#1490: pinned version and sha256, and #1495: a signature-verified pin bump) and from spored and the bootstrap body (KMS signature).

Evidence

Suggested fix

Same pattern as #1490/#1495: pin a versioned tarball (aws-efa-installer-<v>.tar.gz) with its sha256 in the user data, and move the pin with a workflow that verifies the .sig against the committed EFA key. This could reuse #1494's regional mirror, which would also let --no-public-ip launches use --efa without NAT (today cmd/launch_no_public_ip.go lists efa-installer.amazonaws.com as an internet need). Remove the tarball after the install.

Found while working on #1491. Not changed there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mpitype:security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions