Date: Thu, 12 Dec 1996 12:22:57 -0500 (EST) From: Bill Paul <wpaul@skynet.ctr.columbia.edu> To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Cc: hackers@freebsd.org Subject: Re: Weird bug in /etc/group -related library functions Message-ID: <199612121722.MAA23073@skynet.ctr.columbia.edu> In-Reply-To: <199612121135.MAA01522@labinfo.iet.unipi.it> from "Luigi Rizzo" at Dec 12, 96 12:35:43 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Luigi Rizzo had to walk into mine and say: > Hi, > > yesterday we have experienced a weird bug related to an invalid > /etc/group. I'll submit a PR as soon as I have more detailed info, but > the thing was as follows: > > 1) by mistake an invalid line was inserted in /etc/group. But we > did not know... > > 2) our system (basically running 2.1R) started giving > "Memory error" and killing processes on Signal 11 > This happened on reboot as well, and on both statically and > dynamically linked programs (but we realized this late...) > > 3) suspecting some hw problem in the system, we started the usual, > painful sequence of swapping memory, cache, motherboard, and all > possible hardware on the system. Finally, replacing the disk with > another one with a fresh install of FreeBSD we found that the hw was > working. > > 4) suspecting some corrupt libraries we replaced them and all the > faulting programs, but without result. > > It took a while to figure out where the problem was: a corrupt line in > /etc/group. Any idea on what routine can be at fault ? Among the > programs giving Memory fault - signal 11 there were quotacheck, > sendmail, and possibly login (it was not possible to log into the > system). It sounds like a nasty bug in some library code related to the > parsing of /etc/group The getgrent(3) module in libc parses /etc/group. But, if this was in 2.1.0-RELEASE, the odds are it's already been fixed (I stomped a couple such bugs after 2.1 came out). If you're going to submit a PR, try to confirm that the bug is still present in 2.1.6.1 or 2.2 (or -current), and be sure to supply a sample /etc/groups line that trips tbe bug. Please don't forget this part: I hate it when people get all up in arms about a showstopper bug and then don't bother showing a decent test case that reproduces it. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" =============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612121722.MAA23073>