2023-06-14 20:22:10 |
Alex L. Demidov |
bug |
|
|
added bug |
2023-06-16 11:16:15 |
Michael Ward |
bug |
|
|
added subscriber Michael Ward |
2023-06-20 13:41:18 |
Mitchell Dzurick |
information type |
Public |
Public Security |
|
2023-06-20 15:00:54 |
Mitchell Dzurick |
information type |
Public Security |
Public |
|
2023-06-20 15:08:55 |
Mitchell Dzurick |
bug |
|
|
added subscriber Mitchell Dzurick |
2023-06-20 22:10:36 |
Lena Voytek |
nominated for series |
|
Ubuntu Mantic |
|
2023-06-20 22:10:36 |
Lena Voytek |
bug task added |
|
ec2-hibinit-agent (Ubuntu Mantic) |
|
2023-06-20 22:10:36 |
Lena Voytek |
nominated for series |
|
Ubuntu Lunar |
|
2023-06-20 22:10:36 |
Lena Voytek |
bug task added |
|
ec2-hibinit-agent (Ubuntu Lunar) |
|
2023-06-20 22:10:36 |
Lena Voytek |
nominated for series |
|
Ubuntu Jammy |
|
2023-06-20 22:10:36 |
Lena Voytek |
bug task added |
|
ec2-hibinit-agent (Ubuntu Jammy) |
|
2023-06-20 22:10:36 |
Lena Voytek |
nominated for series |
|
Ubuntu Focal |
|
2023-06-20 22:10:36 |
Lena Voytek |
bug task added |
|
ec2-hibinit-agent (Ubuntu Focal) |
|
2023-06-20 22:10:36 |
Lena Voytek |
nominated for series |
|
Ubuntu Kinetic |
|
2023-06-20 22:10:36 |
Lena Voytek |
bug task added |
|
ec2-hibinit-agent (Ubuntu Kinetic) |
|
2023-06-21 01:17:13 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Mantic): assignee |
|
Mitchell Dzurick (mitchdz) |
|
2023-06-21 01:17:14 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Lunar): assignee |
|
Mitchell Dzurick (mitchdz) |
|
2023-06-21 01:17:14 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Kinetic): assignee |
|
Mitchell Dzurick (mitchdz) |
|
2023-06-21 01:17:15 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Jammy): assignee |
|
Mitchell Dzurick (mitchdz) |
|
2023-06-21 01:17:17 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Focal): assignee |
|
Mitchell Dzurick (mitchdz) |
|
2023-06-21 01:17:25 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Mantic): status |
New |
In Progress |
|
2023-06-21 01:31:26 |
Mitchell Dzurick |
merge proposal linked |
|
https://code.launchpad.net/~mitchdz/ubuntu/+source/ec2-hibinit-agent/+git/ec2-hibinit-agent/+merge/445087 |
|
2023-06-21 02:23:34 |
Mitchell Dzurick |
merge proposal linked |
|
https://code.launchpad.net/~mitchdz/ubuntu/+source/ec2-hibinit-agent/+git/ec2-hibinit-agent/+merge/445090 |
|
2023-06-21 02:24:05 |
Mitchell Dzurick |
merge proposal linked |
|
https://code.launchpad.net/~mitchdz/ubuntu/+source/ec2-hibinit-agent/+git/ec2-hibinit-agent/+merge/445091 |
|
2023-06-21 02:24:51 |
Mitchell Dzurick |
merge proposal linked |
|
https://code.launchpad.net/~mitchdz/ubuntu/+source/ec2-hibinit-agent/+git/ec2-hibinit-agent/+merge/445092 |
|
2023-06-21 02:26:12 |
Mitchell Dzurick |
merge proposal linked |
|
https://code.launchpad.net/~mitchdz/ubuntu/+source/ec2-hibinit-agent/+git/ec2-hibinit-agent/+merge/445093 |
|
2023-06-21 14:24:14 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Mantic): status |
In Progress |
Fix Released |
|
2023-06-21 16:38:01 |
Mitchell Dzurick |
description |
The latest version 1.0.0-0ubuntu9.3 creates incorrect state-dir directory which includes double quotes in its name - /\"/var/lib/hibinit-agent\"/. I can see this behavior on Focal. See also upstream commit
https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1 |
[Impact]
A state-dir directory is created to store instance state for AWS EC2 instances. This package parses a configuration file variable with quotes and makes the quotes part of the full path, thus creating a directory titles '"' in root.
[Fix]
Remove the quotes in the configuration file. See upstream commit https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1
[Test Case]
1.
# Create AWS EC2 instance
AWS_REGION="eu-north-1"
AWS_AMI="ami-07ca74b1a97901682"
AWS_KEY="your key name"
AWS_SECURITY_GROUP="security instance that allows ssh from anywhere"
aws ec2 run-instances \
--region ${AWS_REGION} \
--image-id ${AWS_AMI} \
--count 1 \
--instance-type t3.micro \
--key-name ${AWS_KEY} \
--metadata-options "HttpTokens=required" \
--security-group-ids ${AWS_SECURITY_GROUP} \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=focal-test-hibinit}]' \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"Encrypted":true,"DeleteOnTermination":true,"VolumeSize":8,"VolumeType":"gp2"}}]' \
--hibernation-options 'Configured=true'
2. SSH into instance
3. Remove weird directory if it exists
$ sudo rm -rf /'"'/
4. Start hibinit-agent
$ sudo systemctl start hibinit-agent
5. check for dir
# before fix
$ ll / | head -n 3
total 4096080
drwxr-xr-x 3 root root 4096 Jun 20 22:25 "/
drwxr-xr-x 20 root root 4096 Jun 20 22:25 ./
# after fix
$ ll / | head -n 3
total 4096076
drwxr-xr-x 19 root root 4096 Jun 20 22:25 ./
drwxr-xr-x 19 root root 4096 Jun 20 22:25 ../
[Where things can go wrong]
Past logic could look for the weird directory path (did test for this, and nothing along these lines were seen), on upgrade old path remains in filesystem without being deleted.
[Original Report]
The latest version 1.0.0-0ubuntu9.3 creates incorrect state-dir directory which includes double quotes in its name - /\"/var/lib/hibinit-agent\"/. I can see this behavior on Focal. See also upstream commit
https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1 |
|
2023-06-23 03:43:21 |
Ubuntu Archive Robot |
bug |
|
|
added subscriber Michael Hudson-Doyle |
2023-06-23 17:50:37 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Focal): status |
New |
Confirmed |
|
2023-06-23 17:50:37 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Jammy): status |
New |
Confirmed |
|
2023-06-23 17:50:37 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Kinetic): status |
New |
Confirmed |
|
2023-06-23 17:50:37 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Lunar): status |
New |
Confirmed |
|
2023-06-26 17:34:59 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Focal): status |
Confirmed |
Fix Committed |
|
2023-06-26 17:35:02 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Jammy): status |
Confirmed |
Fix Committed |
|
2023-06-26 17:35:04 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Kinetic): status |
Confirmed |
Fix Committed |
|
2023-06-26 17:35:05 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Lunar): status |
Confirmed |
Fix Committed |
|
2023-07-01 01:01:58 |
Steve Langasek |
ec2-hibinit-agent (Ubuntu Lunar): status |
Fix Committed |
Incomplete |
|
2023-07-12 03:43:23 |
Ubuntu Archive Robot |
bug |
|
|
added subscriber Dan Bungert |
2023-07-13 18:23:54 |
Mitchell Dzurick |
ec2-hibinit-agent (Ubuntu Lunar): status |
Incomplete |
Fix Committed |
|
2023-07-14 19:41:10 |
Steve Langasek |
ec2-hibinit-agent (Ubuntu Lunar): status |
Fix Committed |
Incomplete |
|
2023-07-14 20:59:45 |
Mitchell Dzurick |
description |
[Impact]
A state-dir directory is created to store instance state for AWS EC2 instances. This package parses a configuration file variable with quotes and makes the quotes part of the full path, thus creating a directory titles '"' in root.
[Fix]
Remove the quotes in the configuration file. See upstream commit https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1
[Test Case]
1.
# Create AWS EC2 instance
AWS_REGION="eu-north-1"
AWS_AMI="ami-07ca74b1a97901682"
AWS_KEY="your key name"
AWS_SECURITY_GROUP="security instance that allows ssh from anywhere"
aws ec2 run-instances \
--region ${AWS_REGION} \
--image-id ${AWS_AMI} \
--count 1 \
--instance-type t3.micro \
--key-name ${AWS_KEY} \
--metadata-options "HttpTokens=required" \
--security-group-ids ${AWS_SECURITY_GROUP} \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=focal-test-hibinit}]' \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"Encrypted":true,"DeleteOnTermination":true,"VolumeSize":8,"VolumeType":"gp2"}}]' \
--hibernation-options 'Configured=true'
2. SSH into instance
3. Remove weird directory if it exists
$ sudo rm -rf /'"'/
4. Start hibinit-agent
$ sudo systemctl start hibinit-agent
5. check for dir
# before fix
$ ll / | head -n 3
total 4096080
drwxr-xr-x 3 root root 4096 Jun 20 22:25 "/
drwxr-xr-x 20 root root 4096 Jun 20 22:25 ./
# after fix
$ ll / | head -n 3
total 4096076
drwxr-xr-x 19 root root 4096 Jun 20 22:25 ./
drwxr-xr-x 19 root root 4096 Jun 20 22:25 ../
[Where things can go wrong]
Past logic could look for the weird directory path (did test for this, and nothing along these lines were seen), on upgrade old path remains in filesystem without being deleted.
[Original Report]
The latest version 1.0.0-0ubuntu9.3 creates incorrect state-dir directory which includes double quotes in its name - /\"/var/lib/hibinit-agent\"/. I can see this behavior on Focal. See also upstream commit
https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1 |
[Impact]
A state-dir directory is created to store instance state for AWS EC2 instances. This package parses a configuration file variable with quotes and makes the quotes part of the full path, thus creating a directory titles '"' in root.
[Fix]
Remove the quotes in the configuration file. See upstream commit https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1
[Test Case]
# General test case
1.
# Create AWS EC2 instance
AWS_REGION="eu-north-1"
AWS_AMI="ami-07ca74b1a97901682"
AWS_KEY="your key name"
AWS_SECURITY_GROUP="security instance that allows ssh from anywhere"
aws ec2 run-instances \
--region ${AWS_REGION} \
--image-id ${AWS_AMI} \
--count 1 \
--instance-type t3.micro \
--key-name ${AWS_KEY} \
--metadata-options "HttpTokens=required" \
--security-group-ids ${AWS_SECURITY_GROUP} \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=focal-test-hibinit}]' \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"Encrypted":true,"DeleteOnTermination":true,"VolumeSize":8,"VolumeType":"gp2"}}]' \
--hibernation-options 'Configured=true'
2. SSH into instance
3. Remove weird directory if it exists
$ sudo rm -rf /'"'/
4. Start hibinit-agent
$ sudo systemctl start hibinit-agent
5. check for dir
# before fix
$ ll / | head -n 3
total 4096080
drwxr-xr-x 3 root root 4096 Jun 20 22:25 "/
drwxr-xr-x 20 root root 4096 Jun 20 22:25 ./
# after fix
$ ll / | head -n 3
total 4096076
drwxr-xr-x 19 root root 4096 Jun 20 22:25 ./
drwxr-xr-x 19 root root 4096 Jun 20 22:25 ../
# On upgrade
This test case ensures that /"/ is uninstalled on upgrade during from d/postinst.
1. Create an AWS instance
AWS_REGION="eu-north-1"
AWS_AMI="ami-07ca74b1a97901682"
AWS_KEY="your key name"
AWS_SECURITY_GROUP="security instance that allows ssh from anywhere"
aws ec2 run-instances \
--region ${AWS_REGION} \
--image-id ${AWS_AMI} \
--count 1 \
--instance-type t3.micro \
--key-name ${AWS_KEY} \
--metadata-options "HttpTokens=required" \
--security-group-ids ${AWS_SECURITY_GROUP} \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=focal-test-hibinit}]' \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"Encrypted":true,"DeleteOnTermination":true,"VolumeSize":8,"VolumeType":"gp2"}}]' \
--hibernation-options 'Configured=true'
2. Check for directory (ec2-hibinit-agent will be installed by default, and therefore directory will exist by default)
$ file /\"/
/"/: directory
3. Upgrade ec2-hibinit-agent
$ # add ppa if needed
$ sudo apt update -y && sudo apt upgrade ec2-hibinit-agent -y
--- snippet from upgrade ---
The following packages will be upgraded:
ec2-hibinit-agent
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 12.6 kB of archives.
After this operation, 2048 B of additional disk space will be used.
Get:1 https://ppa.launchpadcontent.net/mitchdz/ec2-hibinit-agent-locale-and-quotes-fix/ubuntu lunar/main amd64 ec2-hibinit-agent all 1.0.0-0ubuntu13.2~lunar6 [12.6 kB]
Fetched 12.6 kB in 0s (82.2 kB/s)
(Reading database ... 125081 files and directories currently installed.)
Preparing to unpack .../ec2-hibinit-agent_1.0.0-0ubuntu13.2~lunar6_all.deb ...
Unpacking ec2-hibinit-agent (1.0.0-0ubuntu13.2~lunar6) over (1.0.0-0ubuntu13.1) ...
Setting up ec2-hibinit-agent (1.0.0-0ubuntu13.2~lunar6) ...
Installing new version of config file /etc/hibinit-config.cfg ...
Removing file /"/var/lib/hibinit-agent"/hibernation-enabled
Recursively removing directories /"/var/lib/hibinit-agent"
---
4. check for erroneous directory existence
$ file /\"/
/"/: cannot open `/"/' (No such file or directory)
[Where things can go wrong]
Past logic could look for the weird directory path (did test for this, and nothing along these lines were seen), on upgrade old path remains in filesystem without being deleted.
[Original Report]
The latest version 1.0.0-0ubuntu9.3 creates incorrect state-dir directory which includes double quotes in its name - /\"/var/lib/hibinit-agent\"/. I can see this behavior on Focal. See also upstream commit
https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1 |
|
2023-07-14 21:16:56 |
Steve Langasek |
ec2-hibinit-agent (Ubuntu Lunar): status |
Incomplete |
Fix Committed |
|
2023-07-14 21:16:58 |
Steve Langasek |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2023-07-14 21:17:00 |
Steve Langasek |
bug |
|
|
added subscriber SRU Verification |
2023-07-14 21:17:04 |
Steve Langasek |
tags |
|
verification-needed verification-needed-lunar |
|
2023-07-14 21:20:42 |
Steve Langasek |
tags |
verification-needed verification-needed-lunar |
verification-needed verification-needed-kinetic verification-needed-lunar |
|
2023-07-14 21:21:51 |
Steve Langasek |
tags |
verification-needed verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
|
2023-07-14 21:24:10 |
Steve Langasek |
tags |
verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
|
2023-07-25 15:47:06 |
Mitchell Dzurick |
tags |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
verification-done verification-done-focal verification-done-jammy verification-done-kinetic verification-done-lunar |
|
2023-07-26 01:16:08 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2023-07-26 01:16:11 |
Chris Halse Rogers |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2023-07-26 01:17:08 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Kinetic): status |
Fix Committed |
Fix Released |
|
2023-07-26 01:17:11 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Jammy): status |
Fix Committed |
Fix Released |
|
2023-07-26 01:17:15 |
Launchpad Janitor |
ec2-hibinit-agent (Ubuntu Lunar): status |
Fix Committed |
Fix Released |
|
2023-11-22 17:07:07 |
Mitchell Dzurick |
merge proposal linked |
|
https://code.launchpad.net/~mitchdz/ubuntu/+source/ec2-hibinit-agent/+git/ec2-hibinit-agent/+merge/456028 |
|