From: Hannes Reinecke <hare@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] Fix buffer overflow in udevstart
Date: Fri, 16 Jul 2004 11:59:49 +0000 [thread overview]
Message-ID: <40F7C335.8050802@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
Hi all,
this patch fixes a buffer overflow in udevstart. Quite nasty that it
went overlooked for so long. Made our Opterons segfault.
Cheers,
Hannes
--
Dr. Hannes Reinecke hare@suse.de
SuSE Linux AG S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
[-- Attachment #2: udev-029-max_pathlen.patch --]
[-- Type: text/x-patch, Size: 429 bytes --]
--- udev-029/udevstart.c.orig 2004-07-16 13:15:41.010532491 +0200
+++ udev-029/udevstart.c 2004-07-16 13:51:55.895068751 +0200
@@ -228,7 +228,7 @@
continue;
snprintf(dirname, MAX_PATHLEN, "%s/%s", SYSCLASS, dent->d_name);
- dirname[MAX_PATHLEN] = '\0';
+ dirname[MAX_PATHLEN - 1] = '\0';
dir2 = opendir(dirname);
if (dir2 != NULL) {
for (dent2 = readdir(dir2); dent2 != NULL; dent2 = readdir(dir2)) {
next reply other threads:[~2004-07-16 11:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-16 11:59 Hannes Reinecke [this message]
2004-07-17 14:06 ` [PATCH] Fix buffer overflow in udevstart Greg KH
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=40F7C335.8050802@suse.de \
--to=hare@suse.de \
--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).