termie / nova-migration-demo

Nova is a cloud computing fabric controller (the main part of an IaaS system). It is written in Python.
http://openstack.org/projects/compute/
Apache License 2.0
2 stars 0 forks source link

EC2 instance ID handling deals with integers, not strings #779

Open termie opened 13 years ago

termie commented 13 years ago

The EC2 API is a little too permissive when it comes to instance ids. It is possible to drop zeroes from the instance-id, and it will still be recognized. Though this is probably benign, it's still a bug.

Below I have an instance with 7 leading zeroes, but I can kill it using 6 leading zeroes...

root@openstack# euca-describe-instances RESERVATION r-63svy7ci justinsb default INSTANCE i-0000000a ami-00000008 10.3.0.8 10.3.0.8 running None (justinsb, openstack) 0 m1.small 2011-03-23T16:57:08Z nova

root@openstack# euca-terminate-instances i-000000a

root@openstack# euca-describe-instances (It's gone!)

termie commented 13 years ago

(by vishvananda) Personally I consider this a feature... On Mar 23, 2011 12:20 PM, "justinsb" 741123@bugs.launchpad.net wrote:

Public bug reported:

The EC2 API is a little too permissive when it comes to instance ids. It is possible to drop zeroes from the instance-id, and it will still be recognized. Though this is probably benign, it's still a bug.

Below I have an instance with 7 leading zeroes, but I can kill it using 6 leading zeroes...

root@openstack# euca-describe-instances RESERVATION r-63svy7ci justinsb default INSTANCE i-0000000a ami-00000008 10.3.0.8 10.3.0.8 running None (justinsb, openstack) 0 m1.small 2011-03-23T16:57:08Z nova

root@openstack# euca-terminate-instances i-000000a

root@openstack# euca-describe-instances (It's gone!)

\ Affects: nova Importance: Undecided Status: New

You received this bug notification because you are a member of Nova Bug Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/741123

Title: EC2 instance ID handling deals with integers, not strings

Status in OpenStack Compute (Nova): New

Bug description: The EC2 API is a little too permissive when it comes to instance ids. It is possible to drop zeroes from the instance-id, and it will still be recognized. Though this is probably benign, it's still a bug.

Below I have an instance with 7 leading zeroes, but I can kill it using 6 leading zeroes...

root@openstack# euca-describe-instances RESERVATION r-63svy7ci justinsb default INSTANCE i-0000000a ami-00000008 10.3.0.8 10.3.0.8 running None (justinsb, openstack) 0 m1.small 2011-03-23T16:57:08Z nova

root@openstack# euca-terminate-instances i-000000a

root@openstack# euca-describe-instances (It's gone!)

termie commented 13 years ago

(by justin-fathomdb) Well, I do find it nice now that I know the trick, but I'm worried it'll bite us hard at some stage...

termie commented 13 years ago

(by eday) As long as we don't officially document it as a supported feature, I don't think we need to worry. Automated tools should never drop 0's out of 'i-0000000a' automatically, so only the few of you who do it manually will get bitten, and rightfully so! :)

-Eric

On Wed, Mar 23, 2011 at 06:51:58PM -0000, justinsb wrote:

Well, I do find it nice now that I know the trick, but I'm worried it'll bite us hard at some stage...

You received this bug notification because you are a member of Nova Bug Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/741123

Title: EC2 instance ID handling deals with integers, not strings

Status in OpenStack Compute (Nova): New

Bug description: The EC2 API is a little too permissive when it comes to instance ids. It is possible to drop zeroes from the instance-id, and it will still be recognized. Though this is probably benign, it's still a bug.

Below I have an instance with 7 leading zeroes, but I can kill it using 6 leading zeroes...

root@openstack# euca-describe-instances RESERVATION r-63svy7ci justinsb default INSTANCE i-0000000a ami-00000008 10.3.0.8 10.3.0.8 running None (justinsb, openstack) 0 m1.small 2011-03-23T16:57:08Z nova

root@openstack# euca-terminate-instances i-000000a

root@openstack# euca-describe-instances (It's gone!)

termie commented 13 years ago

(by justin-fathomdb) OK with leaving this one as-is for now.

Having two names tends to cause problems around things like security checks, but I don't see any attacks at the moment.

Presumably this will get cleaned up anyway when/if we reach a decision on instance IDs...

termie commented 13 years ago

(by ttx) Closing it as wontfix, please reopen if I misunderstood your last comment

termie commented 13 years ago

(by justin-fathomdb) Won't fix is fine for now, but we should fix this when we fix instance IDs.