BSD bug found and fixed after 25 years

By Matthew Broersma, ZDNet UK
Tuesday, May 13, 2008 08:37 AM

A Unix developer has discovered and fixed a filesystem bug in Berkeley Software Distribution, a widely used, open source, Unix-like operating system, discovering in the process that the bug was at least 25 years' old.

BSD's variants include OpenBSD, FreeBSD and NetBSD, and it forms the basis of Apple's Mac OS X operating system. All BSD derivatives were found to contain the bug, according to Marc Balmer, a Swiss developer closely involved with OpenBSD.

"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," Balmer wrote in a website post on the issue. "The bug has been around for roughly 25 years or more."

The discovery of the bug sheds light on the process of maintaining and developing open source software, which is handled by distributed developers rather than centralized teams, as is usual in the case of proprietary software.

Balmer said he was alerted to the problem by an OpenBSD user who found that Samba, an open source networking protocol, would crash when serving files from a filesystem using Microsoft Disk Operating System (MS-DOS) formatting.

He found that the problem was not with Samba but with OpenBSD itself, and that the bug was known to Samba developers. "Samba... uses a workaround, or replacement code, to access directories on the BSDs, since the directory reading code in all BSDs was flawed," Balmer wrote.

The problem was with the *dir() group of commands, such as telldir() and seekdir(), used to handle, open, read and interpret directories, according to Balmer.

After lengthy experimentation, he found that, if directory entries are deleted at a certain stage, the telldir() command returns errors and can crash programs. "This code will not work as expected when seeking to the second entry of a block where the first has been deleted," Balmer wrote.

He cited an e-mail from Kirk McKusick, the author of the original *dir() library, indicating that the bug may have been in the library from its initial version.

The long delay in fixing the problem is probably due to the fact that it does not surface often and that other programs, such as Samba, have created workarounds, according to Balmer.

After the long discovery time, the fix itself was "surprisingly simple", Balmer wrote, and will now be incorporated into OpenBSD and other operating systems using the same code.

"Sorry that it took us almost 25 years to fix it," Balmer wrote.

The OpenBSD project released version 4.3 earlier this month, featuring a large number of new drivers, software packages and bug fixes.


WORTHWHILE?

0

0 votes
Blog

Talkback 1 comments

Talk about latent bugs...
Talk about latent bugs...NT
Posted by four_eyes_z on Tuesday, May 13 2008 12:39 PM

Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

Tech Jobs Now!

Replicating your infrastructure in a lab

Enterprise Servers & Storage

Learn two ways to replicate your current environment for testing and evaluation of new server platforms.


Read more »



  • HPC Applications

    Ever wondered if High Performing Computing systems really matter in our day-to-day world? HPC is not just reserved for the some obscure high-end scientific studies.

    David Scott from Intel Corporation gives you a quick tour to the process of developing HPC applications and the interesting world of HPC Applications in today's industries, including the lucrative oil industry.
    Play video


  • Maximize IT Spend: Business Acceleration

    How do you ensure your IT solutions are well integrated and streamlined across your enterprise? Rajendhiran Sanggaran from Oracle explains the processes and important considerations required to enable IT to fuel your business to the next level of growth.
    Play video

Tags

  1. adobe
  2. apple
  3. big
  4. china
  5. firefox
  6. gates
  7. google
  8. ibm
  9. live
  10. microsoft
  11. mobile
  12. ooxml
  13. open
  14. oracle
  15. ratification
  16. release
  17. saas
  18. sap
  19. says
  20. search
  21. software
  22. source
  23. sun
  24. support
  25. ubuntu
  26. users
  27. vista
  28. windows
  29. xp
  30. yahoo

What's the Indian definition of privacy?

Blog thumbnail

Two days back, I was having dinner at an aunt's place. She is a leading doctor. We were discussing my school friend, who happens to be her patient.

My aunt..... by Swati Prasad

Read more »