Commit d1a999df authored by Salva Peiró's avatar Salva Peiró Committed by Greg Kroah-Hartman

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 avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e6c336b
......@@ -90,6 +90,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