Eric Blake 54456cc0fd storage: avoid mishandling backing store > 2GB
Detected by Coverity.  The code was doing math on shifted unsigned
char (which promotes to int), then promoting that to unsigned long
during assignment to size.  On 64-bit platforms, this risks sign
extending values of size > 2GiB.  Bug present since commit
489fd3 (v0.6.0).

I'm not sure if a specially-crafted bogus qcow2 image could
exploit this, although it's probably not possible, since we
were already checking for the computed results being within
range of our fixed-size buffer.

* src/util/storage_file.c (qcowXGetBackingStore): Avoid sign
extension.
2011-06-08 05:18:46 -06:00
..
2011-05-05 13:48:19 -06:00
2011-05-05 13:48:19 -06:00
2011-05-11 12:41:14 -06:00
2010-09-23 10:37:10 +02:00
2011-05-11 12:41:14 -06:00
2011-05-11 12:41:14 -06:00
2010-06-02 21:35:22 -04:00
2011-05-11 12:41:14 -06:00
2011-05-09 14:02:13 +02:00
2011-05-24 12:34:43 -06:00
2011-02-11 12:32:17 -07:00
2010-05-06 14:35:38 -06:00
2010-02-19 11:52:04 +01:00
2011-01-03 14:45:00 -07:00
2010-06-10 06:05:31 -06:00
2011-05-26 11:17:55 -06:00