Verify that domain returned from IMDS is an AWS domain
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ec2-instance-connect (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The domain returned from IMDS is not verified if it was and AWS domain.
[Test Cases]
0) Deploy an Amazon AWS instance with Instance Connect feature enabled
1) Connect to the instance using Instance Connect, for example by pressing the "Connect" button on the web UI.
2. Within a few ten seconds of connecting run (assuming using the ubuntu username):
bash -x /usr/share/
3) The debug output should show successful validation:
...
++ /usr/bin/curl -s -f -m 1 -H 'X-aws-
+ domain=
+ domain_exit=0
+ '[' 0 -ne 0 ']'
+ is_domain_valid=1
+ for valid_domain in amazonaws.com amazonaws.com.cn c2s.ic.gov sc2s.sgov.gov
+ '[' amazonaws.com = amazonaws.com ']'
+ is_domain_valid=0
+ break
+ '[' 0 -eq 1 ']'
++ /usr/bin/printf managed-
...
[Regression Potential]
The validation code can fail preventing connection to the VM. Considering that this is a very small amount of code an looks OK this is unlikely.
The validation could also falsely pass, but that would not be a regression since the validation was not there before.
summary: |
- Please update to upstream release 1.1.13 + Verify that domain returned from IMDS is an AWS domain |
description: | updated |
summary: |
- Verify that domain returned from IMDS is an AWS domain + Please update to 1.1.13 upstream release |
summary: |
- Please update to 1.1.13 upstream release + Verify that domain returned from IMDS is an AWS domain |
This bug was fixed in the package ec2-instance- connect - 1.1.13-0ubuntu1
--------------- connect (1.1.13-0ubuntu1) hirsute; urgency=medium
ec2-instance-
* debian/copyright: Don't exclude debian/
This is not needed with source format 3.0.
* debian/gbp.conf: Add basic Ubuntu configuration
* New upstream version 1.1.13 (LP: #1904741):
- Verify that domain returned from IMDS is an AWS domain
-- Balint Reczey <email address hidden> Wed, 18 Nov 2020 14:31:17 +0100