[Libguestfs] Hivex - Trailing garbage at the end of hive file

Richard W.M. Jones rjones at redhat.com
Fri Oct 4 15:01:08 UTC 2013


On Fri, Oct 04, 2013 at 02:12:08PM +0000, Subramanian, Hari wrote:
> To respond to you question about "whether it fails", hivexsh is unable to
> open the hive file and it prints this message and exits. I've attached the
> verbose logs as requested

OK, I understand it now.  It is in fact failing, setting
errno = ENOSYS and returning an error.

> This extract from the logs shows that the hivexsh complains content after
> file offset 0x77c000 is garbage
> 
> hivex: badsys: trailing garbage at end of file (at 0x77c000, after 1849
> pages)
> 
> So, I went ahead and truncated the contents of the file after that file
> offset and hivex was able to successfully open the new hive file

I guess if the hive comes from a real guest we can change this to warn
but not fail.

Should be a pretty simple patch.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list