From: Dawson Engler <engler@csl.Stanford.EDU>
To: linux-kernel@vger.kernel.org
Subject: [CHECKER] amusing copy_from_user bug
Date: Tue, 10 Apr 2001 03:11:05 -0700 (PDT) [thread overview]
Message-ID: <200104101011.DAA29579@csl.Stanford.EDU> (raw)
copy_from_user should probably have something like
(sizeof(agp_segment) * reserve.seg_count)
as it's size argumenbt rather than
GFP_KERNEL
/u2/engler/mc/oses/linux/2.4.3/drivers/char/agp/agpgart_fe.c:882:agpioc_reserve_
wrap: ERROR:SIZE-CHECK:882:882: segment = 'copy_from_user'(7 bytes), need 12
agp_segment *segment;
segment = kmalloc((sizeof(agp_segment) * reserve.seg_count),
GFP_KERNEL);
if (segment == NULL) {
return -ENOMEM;
}
if (copy_from_user(segment, (void *) reserve.seg_list,
GFP_KERNEL)) {
kfree(segment);
return -EFAULT;
}
As a side question: is it still true that verify_area's must be done before
any use of __put_user/__get_user/__copy_from_user/etc?
next reply other threads:[~2001-04-10 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-10 10:11 Dawson Engler [this message]
2001-04-10 10:41 ` Jakub Jelinek
2001-04-10 10:59 ` Petru Paler
2001-04-10 18:07 ` David S. Miller
2001-04-10 12:20 ` Andi Kleen
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=200104101011.DAA29579@csl.Stanford.EDU \
--to=engler@csl.stanford.edu \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®