Skip to content

Commit

Permalink
[media] media-device: fix infoleak in ioctl media_enum_entities()
Browse files Browse the repository at this point in the history
This fixes CVE-2014-1739.

Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Salva Peiró authored and Mauro Carvalho Chehab committed May 1, 2014
1 parent 8845cc6 commit e6a6234
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/media-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e6a6234

Please sign in to comment.