From: Tilman Schmidt <tilman@imap.cc>
To: linux-kernel@vger.kernel.org
Cc: Jesper Juhl <jesper.juhl@gmail.com>,
Andrew Morton <akpm@osdl.org>, Karsten Keil <kkeil@suse.de>
Subject: Re: 2.6.17-rc4-mm1
Date: Thu, 18 May 2006 02:04:00 +0200 [thread overview]
Message-ID: <446BB9F0.3050708@imap.cc> (raw)
In-Reply-To: <6cPGb-7pP-31@gated-at.bofh.it>
[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]
On 15.05.2006 20:10, Jesper Juhl wrote:
> In the
> isdn-unsafe-interaction-between-isdn_write-and-isdn_writebuf_stub.patch
> patch, which is currently in -mm there's a bug.
>
> This bit :
> - copy_from_user(skb_put(skb, len), buf, len);
> + if (!copy_from_user(skb_put(skb, len), buf, len))
> should really be :
> - copy_from_user(skb_put(skb, len), buf, len);
> + if (copy_from_user(skb_put(skb, len), buf, len))
> Somehow a stray "!" crept in there.
Ouch. I hadn't noticed that either. Sorry about that.
Strangely, I ran a system with that patch for quite some time, actually
doing all kinds of ISDN connections without ever noticing any ill
effects. I can only conclude that the affected codebranch was never
exercised, which makes me suspect it is dead, or at least pining for the
fjords. Looking closer, I can't help noticing that the only branch
calling the affected function isdn_writebuf_stub() starts out with:
printk(KERN_WARNING "isdn_write minor %d obsolete!\n", minor);
So I guess it really doesn't make much difference one way or the other.
But it's certainly more correct that way, so:
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Tilman Schmidt <tilman@imap.cc>
> --- linux-2.6.17-rc4-mm1-orig/drivers/isdn/i4l/isdn_common.c 2006-05-15 19:43:06.000000000 +0200
> +++ linux-2.6.17-rc4-mm1/drivers/isdn/i4l/isdn_common.c 2006-05-15 19:58:26.000000000 +0200
> @@ -1952,7 +1952,7 @@ isdn_writebuf_stub(int drvidx, int chan,
> if (!skb)
> return -ENOMEM;
> skb_reserve(skb, hl);
> - if (!copy_from_user(skb_put(skb, len), buf, len))
> + if (copy_from_user(skb_put(skb, len), buf, len))
> return -EFAULT;
> ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb);
> if (ret <= 0)
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]
next parent reply other threads:[~2006-05-18 0:03 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6cGjz-1Io-9@gated-at.bofh.it>
[not found] ` <6cPGb-7pP-31@gated-at.bofh.it>
2006-05-18 0:04 ` Tilman Schmidt [this message]
2006-05-15 7:56 2.6.17-rc4-mm1 Andrew Morton
2006-05-15 10:09 ` 2.6.17-rc4-mm1 Eric Dumazet
2006-05-15 11:03 ` 2.6.17-rc4-mm1 Andrew Morton
2006-05-15 11:42 ` 2.6.17-rc4-mm1 Pekka Enberg
2006-05-15 13:28 ` 2.6.17-rc4-mm1 Eric Dumazet
2006-05-15 13:12 ` 2.6.17-rc4-mm1 Reuben Farrelly
2006-05-15 22:09 ` 2.6.17-rc4-mm1 Neil Brown
2006-05-15 16:40 ` 2.6.17-rc4-mm1 Michal Piotrowski
2006-05-15 17:04 ` 2.6.17-rc4-mm1 Andrew Morton
2006-05-15 17:30 ` 2.6.17-rc4-mm1 Takashi Iwai
2006-05-15 17:56 ` 2.6.17-rc4-mm1 Takashi Iwai
2006-05-15 18:11 ` 2.6.17-rc4-mm1 Andrew Morton
2006-05-16 9:04 ` 2.6.17-rc4-mm1 Takashi Iwai
2006-05-15 18:50 ` 2.6.17-rc4-mm1 Michal Piotrowski
2006-05-15 16:49 ` 2.6.17-rc4-mm1 Alexey Dobriyan
2006-05-15 17:01 ` 2.6.17-rc4-mm1 Andrew Morton
2006-05-15 18:01 ` 2.6.17-rc4-mm1 Alexey Dobriyan
2006-05-15 19:29 ` 2.6.17-rc4-mm1 Michael Halcrow
2006-05-15 17:48 ` 2.6.17-rc4-mm1 Michal Piotrowski
2006-05-15 18:00 ` 2.6.17-rc4-mm1 Andrew Morton
2006-05-15 18:05 ` 2.6.17-rc4-mm1 Jesper Juhl
2006-05-15 18:37 ` 2.6.17-rc4-mm1 Michal Piotrowski
2006-05-15 18:53 ` 2.6.17-rc4-mm1 Andrew Morton
2006-05-15 19:10 ` 2.6.17-rc4-mm1 Michal Piotrowski
2006-05-15 19:26 ` 2.6.17-rc4-mm1 Andrew Morton
2006-05-15 20:17 ` 2.6.17-rc4-mm1 Michal Piotrowski
2006-05-16 8:39 ` 2.6.17-rc4-mm1 Jean Delvare
2006-05-16 12:55 ` 2.6.17-rc4-mm1 Jean Delvare
2006-05-16 14:48 ` 2.6.17-rc4-mm1 Jean Delvare
2006-05-16 15:18 ` 2.6.17-rc4-mm1 Stephen Hemminger
2006-05-16 15:23 ` 2.6.17-rc4-mm1 Jean Delvare
2006-05-16 16:08 ` 2.6.17-rc4-mm1 Greg KH
2006-05-16 16:27 ` 2.6.17-rc4-mm1 Stephen Hemminger
2006-05-16 16:49 ` 2.6.17-rc4-mm1 Greg KH
2006-05-15 19:28 ` 2.6.17-rc4-mm1 Ingo Molnar
[not found] ` <6bffcb0e0605151003x5d3518b9o70dae3b3349c4f9f@mail.gmail.com>
2006-05-15 22:24 ` 2.6.17-rc4-mm1 David Woodhouse
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=446BB9F0.3050708@imap.cc \
--to=tilman@imap.cc \
--cc=akpm@osdl.org \
--cc=jesper.juhl@gmail.com \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox