UNIXv4 Restored: First C Language Kernel, Flaw Found

Late last year, a shocking discovery was made during a cleanup at the University of Utah computer center. An archived magnetic tape containing the code for the operating system UNIXv4, which was developed in 1973 for the PDP-11/45 computer and was thought to be lost, was found. UNIXv4 followed the development of UNIXv3 released a year earlier, introducing the use of the C language and unnamed pipes for the first time. A key feature of UNIXv4 was the rewriting of the kernel from assembler into C language. The kernel code was written by Ken Thompson, with Dennis Ritchie handling the drivers.

By the end of December 2025, employees at the museum of computing history were able to locate the necessary equipment to extract the archive saved on the tape. The toolkit readtape was used to digitize the analog signal recorded on tape. Works were utilized to decode the archive format, which included the implementation of the Emacs editor from James Gosling.

In addition to the UNIXv4 code, the tape also contained the source texts of one of the first compilers for the C language and the language interpreter SNOBOL. The UNIXv4 code was later cleaned up and published on GitHub in a form suitable for building and running on a PDP-11 simulator. The UNIXv4 code comprises 61 thousand lines, with 27 thousand in C language, 33 thousand in assembly language for the PDP-11, and about a thousand header files.


One security researcher highlighted a concerning discovery related to the “su” utility that was included with UNIXv4. The utility consisted of less than 50 lines of code, was installed with the setuid-root flag, and allowed the execution of /bin/sh with root privileges upon entering the correct password. The code contained a vulnerability leading to a buffer overflow due to copying the user-entered password into a fixed 100-character array without validating the input size.

/Reports, release notes, official announcements.