Sabyrzhan Tasbolatov
53f6c858c4
drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue
...
commit 2fd10bcf0310b9525b2af9e1f7aa9ddd87c3772e upstream.
syzbot found WARNING in qp_broker_alloc[1] in qp_host_alloc_queue()
when num_pages is 0x100001, giving queue_size + queue_page_size
bigger than KMALLOC_MAX_SIZE for kzalloc(), resulting order >= MAX_ORDER
condition.
queue_size + queue_page_size=0x8000d8, where KMALLOC_MAX_SIZE=0x400000.
[1]
Call Trace:
alloc_pages include/linux/gfp.h:547 [inline]
kmalloc_order+0x40/0x130 mm/slab_common.c:837
kmalloc_order_trace+0x15/0x70 mm/slab_common.c:853
kmalloc_large include/linux/slab.h:481 [inline]
__kmalloc+0x257/0x330 mm/slub.c:3959
kmalloc include/linux/slab.h:557 [inline]
kzalloc include/linux/slab.h:682 [inline]
qp_host_alloc_queue drivers/misc/vmw_vmci/vmci_queue_pair.c:540 [inline]
qp_broker_create drivers/misc/vmw_vmci/vmci_queue_pair.c:1351 [inline]
qp_broker_alloc+0x936/0x2740 drivers/misc/vmw_vmci/vmci_queue_pair.c:1739
Reported-by: syzbot+15ec7391f3d6a1a7cc7d@syzkaller.appspotmail.com
Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@gmail.com>
Link: https://lore.kernel.org/r/20210209102612.2112247-1-snovitoll@gmail.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-04 11:38:32 +01:00
..
2020-03-03 08:02:57 +01:00
2020-06-29 18:45:52 +02:00
2021-03-04 11:38:32 +01:00
2020-06-29 18:45:53 +02:00
2020-08-25 01:31:32 +10:00
2020-07-23 09:44:15 +02:00
2021-03-04 11:38:11 +01:00
2020-08-07 18:48:15 -07:00
2021-02-07 15:37:17 +01:00
2020-07-01 15:08:03 +02:00
2019-10-10 15:24:19 +02:00
2021-02-17 11:02:24 +01:00
2021-03-04 11:38:12 +01:00
2020-10-16 12:21:15 -07:00
2020-10-07 09:10:07 +02:00
2020-10-07 09:10:07 +02:00
2020-06-29 18:45:52 +02:00
2020-10-15 10:01:51 -07:00
2021-03-04 11:38:32 +01:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:25:18 -07:00
2020-06-19 14:05:49 -06:00
2019-05-30 11:25:18 -07:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:39 -07:00
2019-10-10 15:24:19 +02:00
2020-06-29 19:10:51 +02:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:29:53 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-07-01 15:05:37 +02:00
2021-03-04 11:38:14 +01:00
2020-09-22 18:54:00 +02:00
2019-05-30 11:26:39 -07:00
2020-07-23 12:56:49 +02:00
2020-07-14 18:21:25 +02:00
2020-08-07 11:33:22 -07:00
2019-10-10 15:34:40 +02:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:36:45 +02:00
2020-01-14 15:06:07 +01:00
2020-10-28 19:12:03 +01:00
2020-08-20 13:12:59 +02:00
2020-07-01 15:05:37 +02:00
2020-10-28 19:12:03 +01:00
2020-07-01 15:05:37 +02:00
2020-12-30 11:53:45 +01:00
2020-06-29 18:43:42 +02:00
2020-07-01 15:05:36 +02:00
2020-09-22 18:53:30 +02:00
2019-06-05 17:36:37 +02:00
2020-07-23 09:44:15 +02:00
2019-11-05 18:32:47 +01:00
2019-06-19 17:09:55 +02:00
2020-06-29 18:43:42 +02:00
2019-06-19 17:09:55 +02:00
2020-01-14 15:16:51 +01:00
2019-12-10 10:15:48 +01:00
2020-05-27 11:09:26 +02:00