From: Andrew Morton <akpm@digeo.com>
To: Junfeng Yang <yjf@stanford.edu>
Cc: linux-kernel@vger.kernel.org, mc@cs.stanford.edu
Subject: Re: [CHECKER] 2 potential out-of-bound user-pointer errors in fs/readdir.c
Date: Thu, 15 May 2003 15:03:44 -0700 [thread overview]
Message-ID: <20030515150344.1b2686f2.akpm@digeo.com> (raw)
In-Reply-To: <Pine.GSO.4.44.0305151329550.29285-100000@elaine24.Stanford.EDU>
Junfeng Yang <yjf@stanford.edu> wrote:
>
>
> Hi,
>
> Enclosed are two warnings found in fs/readdir.c, where user provided
> pointers are accessed out of 'verified' bounds.
>
> The warnings are found by: first, whenenver we see calls to verify_area,
> access_ok and all the no-underscore versions of *_user functions, we
> remember the verified bounds. when a user-pointer is accessed thru
> __*_user functions, we check if the verified bound is big enough.
>
> Please confirm or clarify. Thanks!
The code as-is appears to be OK. Note how sys_getdents64() will run
access_ok() against the entire user buffer up-front. Then the start/len of
that verified area is copied into the getdents_callback64 and that is
propagated down to filldir64().
And filldir64() looks like it correctly remains within the bounds of the
start/len.
I guess that copy_to_user() should be __copy_to_user().
next prev parent reply other threads:[~2003-05-15 21:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-01 4:39 [CHECKER] 5 potential user-pointer errors that allow arbitrary reads from kernel Junfeng Yang
2003-05-01 4:55 ` [CHECKER] 2 potential passing kernel-pointer into copy_*_user errors Junfeng Yang
2003-05-01 5:45 ` [CHECKER] 5 potential user-pointer errors that allow arbitrary reads from kernel Junfeng Yang
2003-05-01 12:54 ` Michael Hunold
2003-05-01 20:07 ` Junfeng Yang
2003-05-01 20:52 ` Greg KH
2003-05-01 20:53 ` Junfeng Yang
2003-05-02 6:43 ` [CHECKER] 4 potential user-pointer errors Junfeng Yang
2003-05-09 21:44 ` [CHECKER] Clarifications needed on a user-pointer false alarm in kernel/kmod.c Junfeng Yang
2003-05-12 6:29 ` [CHECKER] 1 potential derefence of user-pointer without verification error Junfeng Yang
2003-05-12 6:44 ` Junfeng Yang
2003-05-15 20:40 ` [CHECKER] 2 potential out-of-bound user-pointer errors in fs/readdir.c Junfeng Yang
2003-05-15 22:03 ` Andrew Morton [this message]
2003-05-16 0:29 ` Junfeng Yang
2003-05-12 21:19 ` [CHECKER] One more potential user-pointer error Junfeng Yang
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=20030515150344.1b2686f2.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mc@cs.stanford.edu \
--cc=yjf@stanford.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
all inboxes | Powered by JetHome®