From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: SECURITY - data leakage due to incorrect strncpy implementation
Date: 11 Jul 2003 23:50:15 +0100 [thread overview]
Message-ID: <1057963814.20636.72.camel@dhcp22.swansea.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0307111544020.4337-100000@home.osdl.org>
On Gwe, 2003-07-11 at 23:44, Linus Torvalds wrote:
> On 11 Jul 2003, Alan Cox wrote:
> >
> > Lots of kernel drivers rely on the libc definition of strncpy.
>
> But that's ok. We _do_ do the padding. I hated it when I wrote it, but as
> far as I know, the kernel strncpy() has done padding pretty much since day
> one.
/**
* strncpy - Copy a length-limited, %NUL-terminated string
* @dest: Where to copy the string to
* @src: Where to copy the string from
* @count: The maximum number of bytes to copy
*
* Note that unlike userspace strncpy, this does not %NUL-pad the buffer.
* However, the result is not %NUL-terminated if the source exceeds
* @count bytes.
*/
Only x86 does the padding
next prev parent reply other threads:[~2003-07-11 22:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-11 17:05 Sound updating, security of strlcpy and a question on pci v unload Alan Cox
2003-07-11 19:04 ` Mikulas Patocka
2003-07-11 21:45 ` SECURITY - data leakage due to incorrect strncpy implementation Alan Cox
2003-07-11 22:10 ` Alan Cox
2003-07-11 23:49 ` Paul Mackerras
2003-07-12 21:28 ` Horst von Brand
2003-07-13 8:02 ` Alan Cox
2003-07-11 22:44 ` Linus Torvalds
2003-07-11 22:50 ` Alan Cox [this message]
2004-01-29 3:11 ` Pete Zaitcev
2003-07-11 22:37 ` Sound updating, security of strlcpy and a question on pci v unload Mitchell Blank Jr
2003-07-12 0:08 ` Greg KH
2004-01-29 8:57 SECURITY - data leakage due to incorrect strncpy implementation Martin Schwidefsky
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=1057963814.20636.72.camel@dhcp22.swansea.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
--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 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®