1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00
Files
godot/core/io
Fabio Alessandrelli 5262d1bbcc Fix marshalls size checks.
Yesterday, when playing around with my network code, I realized there is
a security issue in decode_variant, at least when decoding PoolArrays.
Basically, the size of the PoolArray is encoded in a uint32_t, when
decoding it, that value is cast to int when comparing if the packet is
actually that size causing numbers with MSB=1 to be interpreted as
negative thus always passing the check. That same value though, is used
as uint32_t again to resize the output vector.  For this reason, sending
a malformed packet with declared type PoolByteArray and size of 2^31(+x)
causes the engine to try to allocate 2+GB of pool memory, causing the
engine to crash.
2018-07-28 21:21:19 +02:00
..
2018-05-13 23:03:48 +02:00
2018-02-22 12:17:06 +01:00
2018-01-01 14:40:47 +01:00
2018-01-01 14:40:47 +01:00
2018-07-28 21:21:19 +02:00
2018-05-13 23:03:48 +02:00