Fabio Alessandrelli
feaf03421d
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.
(cherry picked from commit 5262d1bbcc )
2018-07-29 03:00:34 +02:00
..
2018-07-21 09:09:42 -03:00
2018-01-05 01:22:23 +01:00
2018-07-29 03:00:34 +02:00
2018-07-26 10:37:03 +02:00
2018-07-28 10:49:27 +02:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-03-13 17:18:08 +02:00
2018-07-26 00:54:16 +02:00
2018-07-02 15:08:35 -03:00
2018-05-31 09:00:37 +02:00
2018-07-25 15:34:24 -05:00
2018-07-25 15:34:24 -05:00
2018-03-22 00:17:18 -03:00
2018-07-02 16:50:52 -03:00
2018-07-26 00:54:16 +02:00
2018-02-21 19:46:06 +01:00
2018-07-27 21:37:55 +02:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-07-18 23:07:31 +02:00
2018-07-18 23:07:31 +02:00
2018-01-05 01:22:23 +01:00
2018-07-18 16:27:03 +02:00
2018-05-19 00:40:16 +01:00
2018-05-19 00:40:16 +01:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-05-31 09:00:37 +02:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-07-21 09:09:42 -03:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-07-02 15:08:35 -03:00
2018-07-23 16:21:45 -03:00
2018-07-23 16:21:45 -03:00
2018-05-03 00:26:49 +02:00
2018-05-03 00:26:49 +02:00
2018-01-01 14:40:47 +01:00
2018-01-18 22:01:42 +01:00
2018-07-28 18:13:48 +02:00
2018-02-21 19:46:06 +01:00
2018-07-19 19:02:04 -03:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-07-02 15:08:35 -03:00
2018-05-03 17:00:21 +02:00
2018-07-26 00:54:16 +02:00
2018-07-02 15:08:35 -03:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-05-17 00:35:47 +02:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-07-26 11:48:12 +02:00
2018-07-20 08:37:10 +02:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-03-22 00:17:18 -03:00
2018-07-19 19:02:04 -03:00
2018-01-05 01:22:23 +01:00
2018-07-02 15:08:35 -03:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-07-24 12:13:05 +02:00
2018-07-24 12:13:05 +02:00
2018-07-26 00:54:16 +02:00
2018-05-07 23:17:06 -04:00
2018-07-26 00:54:16 +02:00
2018-05-28 21:49:48 +02:00
2018-07-15 19:29:00 -03:00
2018-07-20 21:55:18 -03:00
2018-07-27 21:37:55 +02:00
2018-04-11 19:59:41 +08:00
2018-02-21 19:46:06 +01:00
2018-01-05 01:22:23 +01:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-01-20 15:26:58 +01:00
2018-03-22 00:17:18 -03:00
2018-04-18 22:20:39 +02:00
2018-07-02 15:08:35 -03:00
2018-07-24 09:51:03 +02:00
2018-01-05 01:22:23 +01:00
2018-06-25 16:22:41 -03:00
2018-07-26 00:54:16 +02:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-05-27 12:53:52 -03:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-07-26 10:48:47 +02:00
2018-01-05 01:22:23 +01:00
2018-07-03 08:34:06 -03:00
2018-01-20 20:03:17 +01:00
2018-01-05 01:22:23 +01:00
2018-07-26 00:54:16 +02:00
2018-06-25 16:22:41 -03:00
2018-07-26 00:54:16 +02:00
2018-02-23 20:15:29 +01:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00