From: Kevin Corry <corryk@us.ibm.com>
To: Horst von Brand <vonbrand@inf.utfsm.cl>
Cc: Joe Perches <joe@perches.com>,
"LKML" <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@transmeta.com>,
Joe Thornber <joe@fib011235813.fsnet.co.uk>
Subject: Re: [PATCH 3/8] dm: prevent possible buffer overflow in ioctl interface
Date: Fri, 28 Feb 2003 12:31:27 -0600 [thread overview]
Message-ID: <0302281231270D.05199@boiler> (raw)
In-Reply-To: <200302281814.h1SIEB42005202@eeyore.valparaiso.cl>
On Friday 28 February 2003 12:14, Horst von Brand wrote:
> Kevin Corry <corryk@us.ibm.com> said:
> > Also, the "+1" is still necessary, even if we switch to sizeof. The
> > sprintf call that follows copies DM_DIR, followed by a slash, followed by
> > the name from the hash table into the allocated string. The "+1" is for
> > the slash in the middle. The terminating NULL character is accounted for
> > in
> > DM_NAME_LEN.
>
> Then it was broken before.
>
> sizeof("1234") == strlen("1234") + 1 == 5
Hmmm...wasn't aware of that. I guess I never expected there to be a
difference. If that's the case, then Joe Perches' earlier patch should do the
trick, albiet for obscure reasons.
And I wouldn't say it was broken the other way; it was simply allocating one
byte more than necessary.
--
Kevin Corry
corryk@us.ibm.com
http://evms.sourceforge.net/
next prev parent reply other threads:[~2003-02-28 18:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OF06EBF3D5.39937A14-ON87256CDB.004FD627@us.ibm.com>
2003-02-28 14:59 ` [PATCH 3/8] dm: prevent possible buffer overflow in ioctl interface Kevin Corry
2003-02-28 18:14 ` Horst von Brand
2003-02-28 18:31 ` Kevin Corry [this message]
2003-02-26 17:05 device-mapper patchset 2.5.63-dm-1 Joe Thornber
2003-02-26 17:09 ` [PATCH 3/8] dm: prevent possible buffer overflow in ioctl interface Joe Thornber
2003-02-26 21:04 ` Horst von Brand
2003-02-27 14:20 ` Kevin Corry
2003-02-27 14:36 ` Kevin Corry
2003-02-27 16:25 ` Roland Dreier
2003-02-27 16:34 ` Kevin Corry
2003-02-27 22:05 ` Kevin Corry
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=0302281231270D.05199@boiler \
--to=corryk@us.ibm.com \
--cc=joe@fib011235813.fsnet.co.uk \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=vonbrand@inf.utfsm.cl \
/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