public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: linux-os@analogic.com
Cc: Tom Felker <tfelker2@uiuc.edu>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Bogus buffer length check in linux-2.6.11  read()
Date: Wed, 16 Mar 2005 13:30:00 +0000	[thread overview]
Message-ID: <1110979800.3057.69.camel@icampbell-debian> (raw)
In-Reply-To: <Pine.LNX.4.61.0503160724120.16304@chaos.analogic.com>


On Wed, 2005-03-16 at 07:29 -0500, linux-os wrote:

> This means that the read() is no longer perfectly happy
> to corrupt all of the user's memory which is the defacto
> correct response for a bad buffer as shown. Instead, some
> added "check in software" claims to prevent this, but
> is wrong anyway because it can't possibly know how much
> data area is available.

The manpage for read(2) that I've got says

       EFAULT buf is outside your accessible address space.

which is exactly what it would appear
        if (unlikely(!access_ok(VERIFY_WRITE, buf, count)))
                return -EFAULT;
checks for. Assuming this is the check you are bitching about -- you
could be a little more precise if you are going to complain about stuff.

Ian.

-- 
Ian Campbell

flannister, n.:
	The plastic yoke that holds a six-pack of beer together.
		-- "Sniglets", Rich Hall & Friends


  reply	other threads:[~2005-03-16 13:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-15 17:59 Bogus buffer length check in linux-2.6.11 read() linux-os
2005-03-16  2:56 ` Tom Felker
2005-03-16 12:29   ` linux-os
2005-03-16 13:30     ` Ian Campbell [this message]
2005-03-16 14:11       ` linux-os
2005-03-16 14:42         ` Eric Dumazet
2005-03-16 14:51           ` linux-os
     [not found] <3IoOm-5M2-49@gated-at.bofh.it>
2005-03-15 23:59 ` Robert Hancock
2005-03-16 12:23   ` linux-os
     [not found] ` <3IwVv-4kD-17@gated-at.bofh.it>
     [not found]   ` <3IFYO-3eg-37@gated-at.bofh.it>
     [not found]     ` <3IGUS-46t-27@gated-at.bofh.it>
     [not found]       ` <3IHxD-4Gb-5@gated-at.bofh.it>
2005-03-16 14:37         ` Robert Hancock

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=1110979800.3057.69.camel@icampbell-debian \
    --to=ijc@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=tfelker2@uiuc.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