Home Home > GIT Browse > openSUSE-42.3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Dirsch <sndirsch@suse.de>2018-07-05 14:35:34 +0200
committerStefan Dirsch <sndirsch@suse.de>2018-07-07 20:33:13 +0200
commit0a0a5a2c8d3975e1895508dafeb0a40c535db6e9 (patch)
tree27fa9987efd2d0aaf968ffa9124bf034450c0e65
parent3d14f8399d6227106b1cce8972e43fd34908e830 (diff)
video: fbdev: uvesafb: Fix integer overflow in allocation
(bsc#1100418, CVE-2018-13406) suse-commit: cef968addcfdfc5792e29536e7a49a39872877b3
-rw-r--r--drivers/video/fbdev/uvesafb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 178ae93b7ebd..381236ff34d9 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -1059,7 +1059,8 @@ static int uvesafb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
info->cmap.len || cmap->start < info->cmap.start)
return -EINVAL;
- entries = kmalloc(sizeof(*entries) * cmap->len, GFP_KERNEL);
+ entries = kmalloc_array(cmap->len, sizeof(*entries),
+ GFP_KERNEL);
if (!entries)
return -ENOMEM;