Gonglei
a08aaff811
virtio-crypto: fix possible integer and heap overflow
...
Because the 'size_t' type is 4 bytes in 32-bit platform, which
is the same with 'int'. It's easy to make 'max_len' to zero when
integer overflow and then cause heap overflow if 'max_len' is zero.
Using uint_64 instead of size_t to avoid the integer overflow.
Cc: qemu-stable@nongnu.org
Reported-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Tested-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-01-10 05:56:58 +02:00
..
2017-01-03 17:28:44 +01:00
2016-11-15 17:20:37 +02:00
2016-10-04 13:28:07 +01:00
2016-12-20 21:52:12 +01:00
2017-01-09 11:40:23 +00:00
2017-01-09 11:40:20 +00:00
2017-01-09 11:40:23 +00:00
2016-10-24 15:46:10 +02:00
2017-01-09 11:40:21 +00:00
2016-11-30 04:22:18 +02:00
2016-06-17 16:33:48 +10:00
2016-07-12 16:20:46 +02:00
2017-01-09 11:40:20 +00:00
2016-10-17 19:22:17 +01:00
2017-01-09 11:40:20 +00:00
2017-01-09 11:40:20 +00:00
2017-01-10 05:56:58 +02:00
2016-11-14 11:15:54 -05:00
2017-01-09 11:40:20 +00:00
2016-12-27 14:59:25 +00:00
2016-05-18 15:04:27 +03:00
2016-11-18 17:50:09 +02:00
2016-10-24 15:27:20 +02:00
2016-11-30 04:20:57 +02:00
2016-10-08 11:25:29 +03:00
2016-11-01 19:21:09 +02:00
2016-10-28 18:17:24 +03:00
2016-10-28 18:17:24 +03:00
2017-01-09 11:40:20 +00:00
2016-03-22 22:20:17 +01:00
2017-01-06 10:38:21 +08:00
2016-11-16 12:09:58 -02:00
2016-03-22 22:20:17 +01:00
2016-12-16 01:14:38 +02:00
2016-10-28 18:17:24 +03:00
2016-11-23 12:00:48 +11:00
2016-01-29 15:07:25 +00:00
2016-12-20 21:52:12 +01:00
2016-12-16 01:14:54 +02:00
2017-01-03 16:38:49 +00:00
2016-09-22 18:13:08 +01:00
2016-12-20 21:52:12 +01:00
2016-09-29 11:43:22 +08:00
2016-11-16 12:09:58 -02:00
2016-11-16 12:09:58 -02:00
2017-01-09 11:50:23 +00:00
2017-01-09 11:40:20 +00:00
2016-10-28 18:17:24 +03:00
2016-09-15 15:32:22 +03:00
2016-10-28 18:17:24 +03:00
2016-11-22 10:29:41 -08:00
2016-10-31 09:53:04 -06:00
2017-01-10 05:56:58 +02:00
2016-12-22 16:00:23 +01:00
2016-11-22 10:29:39 -08:00
2016-09-29 11:43:17 +08:00
2016-10-24 15:27:20 +02:00
2016-10-04 13:28:07 +01:00