From: Luca Risolia <luca_ing@libero.it>
To: "Robert T. Johnson" <rtjohnso@eecs.berkeley.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.23: user/kernel pointer bugs (vicam.c, w9968cf.c)
Date: Thu, 8 Jan 2004 03:10:40 +0100 [thread overview]
Message-ID: <20040108021040.GC6239@posta.studio.unibo.it> (raw)
In-Reply-To: <1073512053.20237.89.camel@dooby.cs.berkeley.edu>
Thanks for your help.
On Wed, Jan 07, 2004 at 01:47:32PM -0800, Robert T. Johnson wrote:
> I think there are exploitable user/kernel pointer bugs in vicam.c and
> w9968cf.c. The bugs are very simple, so I think the patches speak for
> themselves. Thanks for looking at this, and my apologies if I've made
> any mistakes. Let me know if you have any questions.
>
> Best,
> Rob
>
> P.S. Both of these bugs were found using the source code verification
> tool, CQual, developed by Jeff Foster, myself, and others, and available
> from http://www.cs.umd.edu/~jfoster/cqual/.
>
> --- drivers/usb/w9968cf.c.orig Wed Jan 7 13:32:28 2004
> +++ drivers/usb/w9968cf.c Wed Jan 7 13:44:44 2004
> @@ -3552,10 +3552,13 @@
>
> case VIDIOCSYNC: /* wait until the capture of a frame is finished */
> {
> - unsigned int f_num = *((unsigned int *) arg);
> + unsigned int f_num;
> struct w9968cf_frame_t* fr;
> int err = 0;
>
> + if (copy_from_user(&f_num, arg, sizeof(f_num)))
> + return -EFAULT;
> +
> if (f_num >= cam->nbuffers) {
> DBG(4, "Invalid frame number (%d). "
> "VIDIOCMCAPTURE failed.", f_num)
> @@ -3620,7 +3623,8 @@
> {
> struct video_buffer* buffer = (struct video_buffer*)arg;
>
> - memset(buffer, 0, sizeof(struct video_buffer));
> + if (clear_user(buffer, sizeof(struct video_buffer)))
> + return -EFAULT;
>
> DBG(5, "VIDIOCGFBUF successfully called.")
> return 0;
>
prev parent reply other threads:[~2004-01-08 1:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 21:47 Robert T. Johnson
2004-01-08 2:10 ` Luca Risolia [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=20040108021040.GC6239@posta.studio.unibo.it \
--to=luca_ing@libero.it \
--cc=linux-kernel@vger.kernel.org \
--cc=rtjohnso@eecs.berkeley.edu \
/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
Powered by JetHome