From: "Robert T. Johnson" <rtjohnso@eecs.berkeley.edu>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: 2.4.23: user/kernel pointer bugs (drivers/char/vt.c, drivers/char/drm/gamma_dma.c)
Date: 10 Jan 2004 13:30:16 -0800 [thread overview]
Message-ID: <1073770216.22193.79.camel@dooby.cs.berkeley.edu> (raw)
In-Reply-To: <Pine.LNX.4.58L.0401101543410.4057@logos.cnet>
Marcelo Tosatti wrote:
On Thu, 8 Jan 2004, Robert T. Johnson wrote:
Both of these bugs look exploitable. The vt.c patch is
self-explanatory.
Thanks for looking at this, and 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/char/vt.c.orig Thu Jan 8 10:53:01 2004
+++ drivers/char/vt.c Wed Jan 7 15:22:17 2004
@@ -288,7 +288,7 @@
case KDGKBSENT:
sz = sizeof(tmp.kb_string) - 1; /* sz should have been
a struct member */
- q = user_kdgkb->kb_string;
+ q = tmp.kb_string;
p = func_table[i];
if(p)
for ( ; *p && sz; p++, sz--)
The "q" variable is only used as an argument to put_user() (the kernel is
not reading from that address), so I think it is not a problem.
I think your patch will break the ioctl.
Whoops. I thought user_kdgkb->kb_string was a pointer, not an array.
You're absolutely right. Please ignore this patch. I'm very sorry for
the mistake.
Best,
Rob
prev parent reply other threads:[~2004-01-10 21:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-08 20:08 Robert T. Johnson
2004-01-08 23:52 ` [Dri-devel] " Alan Cox
2004-01-09 0:39 ` Eric Anholt
2004-01-09 0:38 ` Alan Cox
2004-01-10 17:46 ` Marcelo Tosatti
2004-01-10 21:30 ` Robert T. Johnson [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=1073770216.22193.79.camel@dooby.cs.berkeley.edu \
--to=rtjohnso@eecs.berkeley.edu \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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
Powered by JetHome