cloud-init: checking cmdline for ip= is too broad

Bug #1919188 reported by James Falcon
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
James Falcon

Bug Description

klibc initramfs in debian (and I think Ubunutu as well) allows the 'iscsi_target_ip=' cmdline parameter to specify an iscsi device attachment. The cloud-init code to check "whether this system has klibc initramfs network config or not" checks if the 'ip=' string is present in the cmdline. The python code to do this ( will match any parameter in the cmdline that contains 'ip='. For iSCSI volumes, the code still works (by accident?) because the next line checks for an open-iscsi interface file, which should exist if we are using iSCSI.

However, it raises the possibility that there are other commandline parameters being used out in the wild that contain 'ip=' that may erroneously be marked by cloud-init as specifying an initramfs network config option. An example fix would be using a regular expression to check that either whitespace or beginning of the line precedes 'ip'.

James Falcon (falcojr)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → James Falcon (falcojr)
Revision history for this message
James Falcon (falcojr) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :
Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
James Falcon (falcojr) wrote : Fixed in cloud-init version 21.2.

This bug is believed to be fixed in cloud-init in version 21.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.