Commit 2f183161 authored by Salva Peiró's avatar Salva Peiró Committed by Jiri Slaby

media: media-device: fix infoleak in ioctl media_enum_entities()

commit e6a62346 upstream.

This fixes CVE-2014-1739.
Signed-off-by: default avatarSalva Peiró <speiro@ai2.upv.es>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 0d9757a0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment