moralismercatus / crete

Open source concolic testing tool for binaries
1 stars 1 forks source link

Incorrect behavior when dispatch terminates while sending image to vm-node #151

Closed moralismercatus closed 7 years ago

moralismercatus commented 8 years ago

Reproduction steps:

  1. Modify the image such that it detects the need to update, or start the vm-node without any existing image/image.info.
  2. Start dispatch.
  3. Kill dispatch before updating the image finishes.

You will notice that the image.info file in /image has been updated before the image file is completely updated. Thus, when you attempt to run dispatch again, there will be problems, as the image.info is there but the corresponding image either missing or missing part.

To fix the problem, only write image.info to file after the image has been completely copied from dispatch.

Also, verify the same logic for vm-node to vm-inst copying.

moralismercatus commented 7 years ago

crete.img.info is now updated only after the image is successfully transmitted.