* [PATCH] Fix buffer overflow in udevstart
@ 2004-07-16 11:59 Hannes Reinecke
2004-07-17 14:06 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2004-07-16 11:59 UTC (permalink / raw)
To: linux-hotplug
[-- 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)) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-17 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-16 11:59 [PATCH] Fix buffer overflow in udevstart Hannes Reinecke
2004-07-17 14:06 ` Greg KH
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).