All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: bluez-devel@lists.sourceforge.net, netdev@oss.sgi.com,
	viro@zenII.linux.org.uk
Subject: Re: some bluetooth fixes
Date: Sun, 15 Feb 2004 00:25:13 +0100	[thread overview]
Message-ID: <20040215002513.7c6fc532.ak@suse.de> (raw)
In-Reply-To: <1076525743.2792.1.camel@pegasus>

On Wed, 11 Feb 2004 19:55:43 +0100
Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Andi,
> 
> > Doing size checks after the multiply is too late - they could
> > have already overflowed. You have to check the raw value from the user.
> 
> new patch is attached.


+	if (req.conn_num * sizeof(*ci) > PAGE_SIZE * 2)
+		return -EINVAL;

This can still overflow. It should be 

	if (req.conn_num > (PAGE_SIZE * 2)/sizeof(*ci))
		return -EINVAL

-Andi

WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <ak@suse.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: bluez-devel@lists.sourceforge.net, netdev@oss.sgi.com,
	viro@zenII.linux.org.uk
Subject: Re: some bluetooth fixes
Date: Wed, 11 Feb 2004 19:33:10 +0000 (UTC)
Date: Sun, 15 Feb 2004 00:25:13 +0100	[thread overview]
Message-ID: <20040215002513.7c6fc532.ak@suse.de> (raw)
In-Reply-To: <1076525743.2792.1.camel@pegasus>

On Wed, 11 Feb 2004 19:55:43 +0100
Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Andi,
> 
> > Doing size checks after the multiply is too late - they could
> > have already overflowed. You have to check the raw value from the user.
> 
> new patch is attached.


+	if (req.conn_num * sizeof(*ci) > PAGE_SIZE * 2)
+		return -EINVAL;

This can still overflow. It should be 

	if (req.conn_num > (PAGE_SIZE * 2)/sizeof(*ci))
		return -EINVAL

-Andi


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

  reply	other threads:[~2004-02-14 23:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-06  4:00 some bluetooth fixes Andi Kleen
2004-02-06 14:58 ` [Bluez-devel] " Marcel Holtmann
2004-02-06 14:58   ` Marcel Holtmann
2004-02-07  2:24   ` Andi Kleen
2004-02-07 11:13     ` [Bluez-devel] " Marcel Holtmann
2004-02-07 11:13       ` Marcel Holtmann
2004-02-07 11:57       ` Andi Kleen
2004-02-07 16:57         ` [Bluez-devel] " Marcel Holtmann
2004-02-07 16:57           ` Marcel Holtmann
2004-02-07 17:24           ` Andi Kleen
2004-02-07 17:24             ` Andi Kleen
2004-02-11 18:55             ` [Bluez-devel] " Marcel Holtmann
2004-02-11 18:55               ` Marcel Holtmann
2004-02-11 19:33               ` Andi Kleen [this message]
2004-02-14 23:25                 ` Andi Kleen
2004-02-11 20:47                 ` [Bluez-devel] " Marcel Holtmann
2004-02-11 20:47                   ` Marcel Holtmann
2004-02-11 19:55               ` Andi Kleen
2004-02-06 23:30 ` [Bluez-devel] " Marcel Holtmann
2004-02-06 23:30   ` Marcel Holtmann
2004-02-06 23:34   ` David S. Miller
2004-02-06 23:46     ` [Bluez-devel] " Marcel Holtmann
2004-02-06 23:46       ` Marcel Holtmann

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=20040215002513.7c6fc532.ak@suse.de \
    --to=ak@suse.de \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=marcel@holtmann.org \
    --cc=netdev@oss.sgi.com \
    --cc=viro@zenII.linux.org.uk \
    /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.