From: viro@parcelfarce.linux.theplanet.co.uk
To: ken@coverity.com
Cc: linux-kernel@vger.kernel.org, linux@coverity.com
Subject: Re: [CHECKER] Security reports involving isspace()
Date: Wed, 21 Apr 2004 00:25:45 +0100 [thread overview]
Message-ID: <20040420232545.GF17014@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <12837.24.6.86.122.1082499261.spork@webmail.coverity.com>
On Tue, Apr 20, 2004 at 03:14:21PM -0700, ken@coverity.com wrote:
> Here are some more static analysis reports from Coverity. These are
> places where the kernel gets a scalar from the user and then uses it as an
> array index with out bounds checking it.
>
> All of the reports below deal with the isspace macro. It expands to an
> access to a static array with 256 entries. If we use an unsigned char to
> index into the array, there are no problems. However, when that char is
> signed, we can index off the left of the array.
>
> It seems like this isn't a big deal, but if the isspace array is located
> after some important data structure, we could leak information.
#define __ismask(x) (_ctype[(int)(unsigned char)(x)])
#define isspace(c) ((__ismask(c)&(_S)) != 0)
Figuring out why the reports mentioned in the quoted text are bullshit
is left as an exercise for readers.
next prev parent reply other threads:[~2004-04-20 23:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 22:14 ken
2004-04-20 23:25 ` viro [this message]
2004-04-20 23:57 ` ken
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=20040420232545.GF17014@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=ken@coverity.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@coverity.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®