Slashdot Mirror


The 25-Year-Old BSD Bug

sproketboy writes with news that a developer named Marc Balmer has recently fixed a bug in a bit of BSD code which is roughly 25 years old. In addition to the OSnews summary, you can read Balmer's comments and a technical description of the bug. "This code will not work as expected when seeking to the second entry of a block where the first has been deleted: seekdir() calls readdir() which happily skips the first entry (it has inode set to zero), and advance to the second entry. When the user now calls readdir() to read the directory entry to which he just seekdir()ed, he does not get the second entry but the third. Much to my surprise I not only found this problem in all other BSDs or BSD derived systems like Mac OS X, but also in very old BSD versions. I first checked 4.4BSD Lite 2, and Otto confirmed it is also in 4.2BSD. The bug has been around for roughly 25 years or more."

4 of 213 comments (clear)

  1. Re:Many eyes make bugs shallow... by Goaway · · Score: 5, Interesting

    Except that the bug had been triggered many times before, seeing as how Samba had code in place to work around it.

  2. Re:Samba knew, but didn't pass it on? by id10ts · · Score: 5, Interesting

    Yes, Samba did pass on what it found and it appears they were promptly shot down by someone on the *BSD side.

    The Samba e-mail archives contain a message from over 3 years ago, but it doesn't give attribution to the *BSD source.

    The Samba Bugzilla also has a bug reported more recently involving the same issue. Reading through the bug history, you can see there was one FreeBSD dev involved in the bug discussion, and he referenced a prior conversation between Tridge (Samba) and PHK (FreeBSD) where PHK said there was no bug in FreeBSD.

  3. Long live the Code by GuldKalle · · Score: 5, Interesting

    Am I the only one who thinks it's quite impressive to have 25 year old code still being used and employed on new systems?

    --
    What?
  4. Re:more proof by Fast+Thick+Pants · · Score: 5, Interesting

    Let's take Microsoft's word that it did: Try find "California" < %windir%\system32\ftp.exe

    Nothing shady about it either; that's the beauty of BSD code.