Patch "drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command" has been added to the 3.14-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-qxl-use-kmalloc_array-to-alloc-reloc_info-in-qxl_process_single_command.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
34855706c30d52b0a744da44348b5d1cc39fbe51Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <[email protected]>
Date: Tue, 16 Feb 2016 14:25:00 +0100
Subject: drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command
From: Gerd Hoffmann <[email protected]>
commit 34855706c30d52b0a744da44348b5d1cc39fbe51 upstream.
This avoids integer overflows on 32bit machines when calculating reloc_info size, as reported by Alan Cox.
--- drivers/gpu/drm/qxl/qxl_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/qxl/qxl_ioctl.c +2 -1
@@ -168,7 +168,8 @@ static int qxl_process_single_command(st cmd->command_size))return -EFAULT ; - reloc_info =kmalloc (sizeof (struct qxl_reloc_info ) * cmd->relocs_num,GFP_KERNEL ); + reloc_info =kmalloc_array (cmd->relocs_num, +sizeof (struct qxl_reloc_info ),GFP_KERNEL );if (!reloc_info)return -ENOMEM ;
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/drm-qxl-use-kmalloc_array-to-alloc-reloc_info-in-qxl_process_single_command.patch