summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSalva Peiró <speiro@ai2.upv.es>2014-04-30 19:48:02 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-07 13:25:35 -0700
commit4e32a7c66fae40bde0fbff8cbc893eabe8575135 (patch)
treed83c0e11290a36737bc469343b24459ca1690308 /drivers
parentc4f3c998c17e31c73c1ab223469435a12358d25e (diff)
media: media-device: fix infoleak in ioctl media_enum_entities()
commit e6a623460e5fc960ac3ee9f946d3106233fd28d8 upstream. This fixes CVE-2014-1739. Signed-off-by: Salva Peiró <speiro@ai2.upv.es> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/media-device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 1957c0df08fd..79715f9feb0a 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -93,6 +93,7 @@ static long media_device_enum_entities(struct media_device *mdev,
struct media_entity *ent;
struct media_entity_desc u_ent;
+ memset(&u_ent, 0, sizeof(u_ent));
if (copy_from_user(&u_ent.id, &uent->id, sizeof(u_ent.id)))
return -EFAULT;