glib/docs
Philip Withnall 7c4e6e9fbe gvarianttype: Impose a recursion limit of 128 on variant types
Previously, GVariant has allowed ‘arbitrary’ recursion on GVariantTypes,
but this isn’t really feasible. We have to deal with GVariants from
untrusted sources, and the nature of GVariantType means that another
level of recursion (and hence, for example, another stack frame in your
application) can be added with a single byte in a variant type signature
in the input. This gives malicious input sources far too much leverage
to cause deep stack recursion or massive memory allocations which can
DoS an application.

Limit recursion to 128 levels (which should be more than enough for
anyone™), document it and add a test. This is, handily, also the limit
of 64 applied by the D-Bus specification (§(Valid Signatures)), plus a
bit to allow wrapping of D-Bus messages in additional layers of
variants.

oss-fuzz#9857

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-23 17:01:51 +13:00
..
reference gvarianttype: Impose a recursion limit of 128 on variant types 2018-10-23 17:01:51 +13:00
debugging.txt Remove references to gruntime. This includes renaming the test program 2002-02-26 21:23:52 +00:00
macros.txt build: Remove the --disable-mem-pools build option and the DISABLE_MEM_POOLS macro 2018-06-02 09:45:55 +02:00
Makefile.am Removed obsolete makefile rules 2013-10-17 13:20:14 -04:00