Hilko Bengen
2014-Feb-06 15:32 UTC
[Libguestfs] [PATCH 1/2] hivex: Use correct constant in diagnostic error message
--- lib/value.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/value.c b/lib/value.c index c4e21ec..f222b41 100644 --- a/lib/value.c +++ b/lib/value.c @@ -334,7 +334,7 @@ hivex_value_value (hive_h *h, hive_value_h value, /* Arbitrarily limit the length that we will read. */ if (len > HIVEX_MAX_VALUE_LEN) { SET_ERRNO (ERANGE, "data length > HIVEX_MAX_VALUE_LEN (%zu > %d)", - len, HIVEX_MAX_SUBKEYS); + len, HIVEX_MAX_VALUE_LEN); return NULL; } -- 1.9.rc1
I actually encountered a binary value with 1033680 bytes. --- lib/hivex-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h index 7f4cc3c..bfd24c8 100644 --- a/lib/hivex-internal.h +++ b/lib/hivex-internal.h @@ -321,7 +321,7 @@ extern int _hivex_get_values (hive_h *h, hive_node_h node, hive_value_h **values /* These limits are in place to stop really stupid stuff and/or exploits. */ #define HIVEX_MAX_SUBKEYS 15000 #define HIVEX_MAX_VALUES 10000 -#define HIVEX_MAX_VALUE_LEN 1000000 +#define HIVEX_MAX_VALUE_LEN 2000000 #define HIVEX_MAX_ALLOCATION 1000000 #endif /* HIVEX_INTERNAL_H_ */ -- 1.9.rc1
Richard W.M. Jones
2014-Feb-07 06:37 UTC
Re: [Libguestfs] [PATCH 1/2] hivex: Use correct constant in diagnostic error message
On Thu, Feb 06, 2014 at 04:32:35PM +0100, Hilko Bengen wrote:> --- > lib/value.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/value.c b/lib/value.c > index c4e21ec..f222b41 100644 > --- a/lib/value.c > +++ b/lib/value.c > @@ -334,7 +334,7 @@ hivex_value_value (hive_h *h, hive_value_h value, > /* Arbitrarily limit the length that we will read. */ > if (len > HIVEX_MAX_VALUE_LEN) { > SET_ERRNO (ERANGE, "data length > HIVEX_MAX_VALUE_LEN (%zu > %d)", > - len, HIVEX_MAX_SUBKEYS); > + len, HIVEX_MAX_VALUE_LEN); > return NULL; > } > > -- > 1.9.rc1ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Richard W.M. Jones
2014-Feb-07 06:37 UTC
Re: [Libguestfs] [PATCH 2/2] hivex: Bump value size limit
On Thu, Feb 06, 2014 at 04:32:36PM +0100, Hilko Bengen wrote:> I actually encountered a binary value with 1033680 bytes. > --- > lib/hivex-internal.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h > index 7f4cc3c..bfd24c8 100644 > --- a/lib/hivex-internal.h > +++ b/lib/hivex-internal.h > @@ -321,7 +321,7 @@ extern int _hivex_get_values (hive_h *h, hive_node_h node, hive_value_h **values > /* These limits are in place to stop really stupid stuff and/or exploits. */ > #define HIVEX_MAX_SUBKEYS 15000 > #define HIVEX_MAX_VALUES 10000 > -#define HIVEX_MAX_VALUE_LEN 1000000 > +#define HIVEX_MAX_VALUE_LEN 2000000 > #define HIVEX_MAX_ALLOCATION 1000000 > > #endif /* HIVEX_INTERNAL_H_ */ > -- > 1.9.rc1ACK(!) Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Apparently Analagous Threads
- [PATCH 1/2] hivex: Use correct constant in diagnostic error message
- Re: increasing HIVEX_MAX_SUBKEYS and HIVEX_MAX_VALUES
- [PATCH hivex] maint: split long lines
- increasing HIVEX_MAX_SUBKEYS and HIVEX_MAX_VALUES
- Re: increasing HIVEX_MAX_SUBKEYS and HIVEX_MAX_VALUES