From: Andrew Morton <akpm@digeo.com>
To: Paul Mackerras <paulus@samba.org>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: copy_from_user
Date: Wed, 18 Jun 2003 00:31:10 -0700 [thread overview]
Message-ID: <20030618003110.6a9751a5.akpm@digeo.com> (raw)
In-Reply-To: <16112.2991.972670.344808@cargo.ozlabs.ibm.com>
Paul Mackerras <paulus@samba.org> wrote:
>
> Some time ago (in the 2.1 series IIRC) we added code to copy_from_user
> to zero the remainder of the destination buffer if we faulted on the
> source. The motive was to eliminate some potential security holes
> that could arise if callers didn't check the return value from
> copy_from_user and continued on to pass the contents of the
> destination buffer back to userspace in one way or another.
>
> However, I notice that copy_from_user on i386 in 2.5 doesn't clear the
> destination if the access_ok() check fails,
This was not deliberate - the memset simply got lost.
It is simple enough to fix. Do we remember the details of the
security hole?
> or if the size is 1, 2 or 4.
This one is OK - __get_user_asm() does the zeroing in the fixup code.
next prev parent reply other threads:[~2003-06-18 7:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-18 6:50 copy_from_user Paul Mackerras
2003-06-18 7:31 ` Andrew Morton [this message]
2003-06-18 12:26 ` copy_from_user Paul Mackerras
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=20030618003110.6a9751a5.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®