From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Rainer Weikusat <rainer.weikusat@sncag.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
torvalds@osdl.org, akpm@osdl.org
Subject: Re: Implementation defined behaviour in read_write.c
Date: Tue, 21 Sep 2004 11:57:48 +0100 [thread overview]
Message-ID: <1095764243.30748.55.camel@localhost.localdomain> (raw)
In-Reply-To: <878yb5ey11.fsf@farside.sncag.com>
On Llu, 2004-09-20 at 16:54, Rainer Weikusat wrote:
> The following code is in the function do_readv_writev in the file
> fs/read_write.c (2.6.8.1):
The 2.4.x kernel has part of this fixed. In particular it does the
overflow check differently because gcc 3.x in some forms did appear to
be making use of the undefined nature of the test and that was a
potential security hole. ("its undefined lets say its always false..")
The initial cast and test should be fine. The overflow problem was fixed
in the 2.4 tree and is handled by keeping tot_len unsigned so that the
overflow is a defined operation and then checking versus 0x7FFFFFFF or
0x7FFFFFFFFFFFFFFFUL according to BITS_PER_LONG. I guess the 2.4 code
should be merged into 2.6, perhaps using limits.h instead ?
Alan
next prev parent reply other threads:[~2004-09-21 12:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-20 15:54 Implementation defined behaviour in read_write.c Rainer Weikusat
2004-09-21 5:43 ` Rainer Weikusat
2004-09-21 10:57 ` Alan Cox [this message]
2004-09-22 5:58 ` Rainer Weikusat
2004-09-22 14:41 ` Linus Torvalds
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=1095764243.30748.55.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rainer.weikusat@sncag.com \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.