From: "Adam Jerome" <abj@novell.com>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH 001/001] /fs/proc/: 'larger than buffer size' memory accesses by clear_user()
Date: Mon, 10 Jul 2006 09:37:32 -0600 [thread overview]
Message-ID: <44B206D3.3C0A.0073.0@novell.com> (raw)
From: Adam B. Jerome <abj@novell.com>
This patch addresses potential 'larger than buffer size' memory accesses by clear_user().
Without this patch, this call to clear_user() can attempt to clear too many (tsz) bytes
resulting in a wrong (-EFAULT) return code by read_kcore().
Signed-off-by: Adam B. Jerome <abj@novell.com>
---
I do not subscribe to the list. Please CC posted answers/comments CC me <abj@novell.com>.
Thanks; -adam
diff -urpN linux-2.6-git/fs/proc/kcore.c linux-2.6-cur/fs/proc/kcore.c
--- linux-2.6-git/fs/proc/kcore.c 2006-07-07 15:39:23.000000000 -0600
+++ linux-2.6-cur/fs/proc/kcore.c 2006-07-07 16:11:58.000000000 -0600
@@ -384,7 +384,7 @@ read_kcore(struct file *file, char __use
*/
if (n) {
if (clear_user(buffer + tsz - n,
- tsz - n))
+ n))
return -EFAULT;
}
} else {
next reply other threads:[~2006-07-10 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 15:37 Adam Jerome [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-10 15:32 Adam Jerome
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=44B206D3.3C0A.0073.0@novell.com \
--to=abj@novell.com \
--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
Powered by JetHome