linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: potential buffer overflow in udev
Date: Sat, 28 Feb 2004 21:09:09 +0000	[thread overview]
Message-ID: <1078002549.1193.9.camel@pim> (raw)
In-Reply-To: <1077981760.18811.3.camel@peloton.desrt.ca>

On Sat, 2004-02-28 at 16:22, Ryan Lortie wrote:
> I was poking around in the udev code a bit this morning and I came
> across this:
> 
> void sysbus_send_create(struct udevice *dev, const char *path)
> {
>         char filename[255];
> [...]
>         strncpy(filename, udev_root, sizeof(filename));
>         strncat(filename, dev->name, sizeof(filename));
> 
> There exists a possible buffer overflow condition here.
> 
> By the strncat manpage:
> The strncat() function is similar, except that only the first n
> characters of src are appended to dest.
> 
> ie: the size argument corresponds to how many characters you are adding,
> not the total size of the resulting string.
> 
> Same problem occurs in sysbus_send_remove.

Thanks, but please look at the latest version of udev.
It's already fixed two days ago:

http://linuxusb.bkbits.net:8080/udev/cset@1.592?nav=index.html|src/|related/udev_dbus.c

Kay




-------------------------------------------------------
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\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

      reply	other threads:[~2004-02-28 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-28 15:22 potential buffer overflow in udev Ryan Lortie
2004-02-28 21:09 ` Kay Sievers [this message]

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=1078002549.1193.9.camel@pim \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).