From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Date: Fri, 16 Jul 2004 11:59:49 +0000 Subject: [PATCH] Fix buffer overflow in udevstart Message-Id: <40F7C335.8050802@suse.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------030003010209030402070807" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------030003010209030402070807 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi all, this patch fixes a buffer overflow in udevstart. Quite nasty that it=20 went overlooked for so long. Made our Opterons segfault. Cheers, Hannes --=20 Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstra=DFe 5 +49 911 74053 688 90409 N=FCrnberg http://www.suse.de --------------030003010209030402070807 Content-Type: text/x-patch; name="udev-029-max_pathlen.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="udev-029-max_pathlen.patch" --- 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)) { --------------030003010209030402070807-- ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&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