[Libguestfs] increasing HIVEX_MAX_SUBKEYS and HIVEX_MAX_VALUES

Richard W.M. Jones rjones at redhat.com
Sat Dec 3 12:12:36 UTC 2016


>  /* These limits are in place to stop really stupid stuff and/or exploits. */
> -#define HIVEX_MAX_SUBKEYS       25000
> -#define HIVEX_MAX_VALUES        10000
> +#define HIVEX_MAX_SUBKEYS     3600000
> +#define HIVEX_MAX_VALUES       110000
>  #define HIVEX_MAX_VALUE_LEN   8000000
>  #define HIVEX_MAX_ALLOCATION  1000000

Do you have the alternate patch that just increases the limits to 1.5x
what you need?

We're building a list of (up to) HIVEX_MAX_SUBKEYS * 4 bytes (not
counting intermediate blocks) in the _get_children function.  While
it's not a massive amount of memory in a modern system, I think if
we're going to increase them substantially we should make these limits
configurable which makes everyone happy.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Increase-HIVEX_MAX_SUBKEYS-and-HIVEX_MAX_VALUES.patch
Type: application/octet-stream
Size: 880 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20161203/618cdeea/attachment.obj>


More information about the Libguestfs mailing list