From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] media: info leak in __media_device_enum_links()
Date: Mon, 10 Jun 2013 12:07:47 +0200 [thread overview]
Message-ID: <2131110.fTHJyNQdyt@avalon> (raw)
In-Reply-To: <20130531122444.GS23987@mwanda>
Hi Dan,
On Friday 31 May 2013 15:24:45 Dan Carpenter wrote:
> Ping?
Oops, sorry for having missed the patch.
> On Sat, Apr 13, 2013 at 12:32:15PM +0300, Dan Carpenter wrote:
> > These structs have holes and reserved struct members which aren't
> > cleared. I've added a memset() so we don't leak stack information.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I've taken the patch in my tree, Added a "CC: stable@vger.kernel.org" and
issued a pull request.
> > diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
> > index 99b80b6..450c0d1 100644
> > --- a/drivers/media/media-device.c
> > +++ b/drivers/media/media-device.c
> > @@ -139,6 +139,8 @@ static long __media_device_enum_links(struct
> > media_device *mdev,>
> > for (p = 0; p < entity->num_pads; p++) {
> >
> > struct media_pad_desc pad;
> >
> > +
> > + memset(&pad, 0, sizeof(pad));
> >
> > media_device_kpad_to_upad(&entity->pads[p], &pad);
> > if (copy_to_user(&links->pads[p], &pad, sizeof(pad)))
> >
> > return -EFAULT;
> >
> > @@ -156,6 +158,7 @@ static long __media_device_enum_links(struct
> > media_device *mdev,>
> > if (entity->links[l].source->entity != entity)
> >
> > continue;
> >
> > + memset(&link, 0, sizeof(link));
> >
> > media_device_kpad_to_upad(entity->links[l].source,
> >
> > &link.source);
> >
> > media_device_kpad_to_upad(entity->links[l].sink,
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2013-06-10 10:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 9:32 [patch] [media] media: info leak in __media_device_enum_links() Dan Carpenter
2013-05-31 12:24 ` Dan Carpenter
2013-06-10 10:07 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2131110.fTHJyNQdyt@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox