{"id":535549,"date":"2026-07-06T10:22:10","date_gmt":"2026-07-06T10:22:10","guid":{"rendered":"https:\/\/www.newsbeep.com\/ie\/535549\/"},"modified":"2026-07-06T10:22:10","modified_gmt":"2026-07-06T10:22:10","slug":"secure-unix-ancestor-ksos-did-type-safety-before-rust-made-it-cool","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/ie\/535549\/","title":{"rendered":"Secure Unix ancestor KSOS did type safety before Rust made it cool"},"content":{"rendered":"<p class=\"kicker \" style=\"\">OS PLATFORMS<\/p>\n<p class=\"subtitle \" style=\"\">Modula-based source code\u00a0resurfaces after nearly four decades<\/p>\n<p>For the first time, the source code of KSOS, backed by the US Department of Defense in the late 1970s and 1980s, is available to the public in the archives of <a href=\"https:\/\/www.tuhs.org\/\" rel=\"nofollow noopener\" target=\"_blank\">The Unix Heritage Society<\/a>\u00a0(TUHS).<\/p>\n<p>TUHS volunteers preserve the historical source code and documentation of the original UNIX \u2013 or as much of it as is left. A few days ago, in an <a href=\"https:\/\/www.tuhs.org\/pipermail\/tuhs\/2026-June\/033976.html\" rel=\"nofollow noopener\" target=\"_blank\">email<\/a> to its mailing list, TUHS founder <a href=\"https:\/\/minnie.tuhs.org\/warren.html\" rel=\"nofollow noopener\" target=\"_blank\">Warren Toomey<\/a> announced the addition of <a href=\"https:\/\/www.tuhs.org\/Archive\/Distributions\/Other\/KSOS\/\" target=\"_blank\" rel=\"nofollow noopener\">KSOS<\/a> to the collection.<\/p>\n<p>&#8220;KSOS was the US Department of Defense (DoD) Kernelized Secure Operating System (KSOS, formerly called Secure UNIX). KSOS is intended to provide a provably secure operating system for larger minicomputers,&#8221; he wrote.<\/p>\n<p>Despite its age, KSOS sounds surprisingly modern. It was a Unix-compatible OS, implemented in a type-safe programming language, Modula, rather than C. Modula was the <a href=\"https:\/\/www.theregister.com\/software\/2024\/01\/04\/rip-software-design-pioneer-niklaus-wirth\/1417086\" rel=\"nofollow noopener\" target=\"_blank\">late great Niklaus Wirth<\/a>&#8216;s successor to Pascal\u00a0and, in turn, the forerunner to Modula-2 \u2013 which we described when it was <a href=\"https:\/\/www.theregister.com\/software\/2022\/12\/16\/gcc-13-to-support-modula-2\/512766\" rel=\"nofollow noopener\" target=\"_blank\">added to the GNU Compiler Collection in 2022<\/a>. KSOS was designed to be formally verifiable, so that it could be trusted for use in highly secure systems. It ran on commodity hardware, and its development was sponsored by the US DOD.<\/p>\n<p>Very few OS kernels have been formally verified, and one of the best-known modern examples is the <a href=\"https:\/\/www.theregister.com\/security\/2009\/08\/17\/researchers-forge-secure-kernel-from-maths-proofs\/1394189\" rel=\"nofollow noopener\" target=\"_blank\">seL4 microkernel<\/a>, as used in the <a href=\"https:\/\/www.theregister.com\/software\/2025\/11\/10\/ironclad-os-crafts-unix-like-kernel-in-ada-and-spark\/541310\" rel=\"nofollow noopener\" target=\"_blank\">Ironclad OS we covered last year<\/a>, and also in the <a href=\"https:\/\/www.theregister.com\/software\/2026\/06\/26\/one-man-two-kernels-and-a-lot-of-risc-v\/5262858\" rel=\"nofollow noopener\" target=\"_blank\">new QSOE RISC-V RTOS<\/a>. KSOS isn&#8217;t some cutting-edge experimental new Rust effort, like the <a href=\"https:\/\/www.theregister.com\/software\/2025\/09\/12\/three-alternative-microkernels-show-devs-dont-need-linux\/1428275\" rel=\"nofollow noopener\" target=\"_blank\">Asterinas project we described last year<\/a> or the even newer <a href=\"https:\/\/github.com\/maestro-os\/maestro\" rel=\"nofollow noopener\" target=\"_blank\">Maestro project<\/a>.<\/p>\n<p>What became KSOS started in 1978 at Ford Aerospace (yes, that Ford). On the team were Peter Neumann, who later ran the RISKS Digest \u2013 The Register <a href=\"https:\/\/www.theregister.com\/security\/2004\/04\/08\/tracking-the-blackout-bug\/1431138\" rel=\"nofollow noopener\" target=\"_blank\">was quoting him<\/a> in 2004 \u2013 and Tom Perrine, who described it and its modern relevance in a 2002 article for the USENIX journal ;login:. It&#8217;s titled &#8220;<a href=\"https:\/\/www.usenix.org\/system\/files\/login\/articles\/1255-perrine.pdf\" rel=\"nofollow noopener\" target=\"_blank\">The Kernelized Secure Operating system (KSOS)<\/a>&#8221; [PDF], and at only three and a bit pages long, it&#8217;s well worth a read. Even then, 24 years ago, projects were struggling to reinvent things KSOS did successfully a couple of decades earlier. That&#8217;s even more true today. To learn more about how KSOS worked, there&#8217;s a 1978 <a href=\"https:\/\/seclab.cs.ucdavis.edu\/projects\/history\/papers\/ford78.pdf\" rel=\"nofollow noopener\" target=\"_blank\">Executive Summary<\/a> [PDF] \u2013 which, despite its title, runs to 15 pages. Clearly, executives back then had longer attention spans.<\/p>\n<p>Perrine gave a talk about KSOS at <a href=\"https:\/\/defcon.org\/html\/defcon-20\/dc-20-index.html\" rel=\"nofollow noopener\" target=\"_blank\">DEF CON 20<\/a> in 2012, which you can watch on YouTube.<\/p>\n<p>KSOS isn&#8217;t forgotten. For instance, it came up in a talk at last year&#8217;s FOSDEM: <a href=\"https:\/\/archive.fosdem.org\/2025\/schedule\/event\/fosdem-2025-5002-confidential-computing-s-recent-past-emerging-present-and-long-lasting-future\/\" rel=\"nofollow noopener\" target=\"_blank\">Confidential Computing&#8217;s Recent Past, Emerging Present, and Long-Lasting Future<\/a>. Page 8 of the <a href=\"https:\/\/archive.fosdem.org\/2025\/events\/attachments\/fosdem-2025-5002-confidential-computing-s-recent-past-emerging-present-and-long-lasting-future\/slides\/237828\/Confident_fRySvCW.pdf\" rel=\"nofollow noopener\" target=\"_blank\">slide deck<\/a> [PDF] says KSOS was &#8220;among the first security-focused kernels, emphasizing formal verification&#8221; and &#8220;source code was publicly available, rejecting &#8216;security through obscurity.'&#8221;<\/p>\n<p>KSOS was not confined to academic research. It was used in production. Last October, Perrine explained more in another <a href=\"https:\/\/www.tuhs.org\/pipermail\/tuhs\/2025-October\/032635.html\" rel=\"nofollow noopener\" target=\"_blank\">TUHS email<\/a>: &#8220;KSOS \u2013 for PDP-11, originally developed by Ford Aerospace, and then extended at Logicon. It did have a supervisor-mode UNIX-system-call-compatible system. Later, there was also a userland library that implemented something that mostly matched the UNIX system calls. It had no kernel code in common with UNIX. It was written in Modula.<\/p>\n<p>&#8220;KSOS was used in the Trusted Downgrade System of the multi-level-secure &#8216;all-source&#8217; intel fusion system that Logicon built for a few agencies. ACCAT-GUARD and USAFE-GUARD, for example.<\/p>\n<p>&#8220;KSOS-32 \u2013 a VAX &#8216;port&#8217; of KSOS (which was then retconned as &#8216;KSOS-11&#8217;). The Modula code from -11 was run though Emacs macros to produce Modula-2, and then parts were rewritten as needed.<\/p>\n<p>&#8220;I worked on both systems at Logicon.&#8221;<\/p>\n<p>It&#8217;s Perrine we have to thank for KSOS reappearing in public view after 38 years \u2013 he found an old tarball of the source code, and with the help of John O Goyo and Thalia Archibald, it made its way to the <a href=\"https:\/\/www.tuhs.org\/Archive\/Distributions\/Other\/KSOS\/\" rel=\"nofollow noopener\" target=\"_blank\">TUHS code archive<\/a>. Now there\u2019s a new quest: <a href=\"https:\/\/www.tuhs.org\/pipermail\/tuhs\/2025-October\/032675.html\" rel=\"nofollow noopener\" target=\"_blank\">find the original compiler<\/a> used to build it. One thing that may help slightly is that KSOS was not self-hosting: it was compiled under UNIX.<\/p>\n<p>We have mentioned TUHS&#8217;s important work before: for instance, when a <a href=\"https:\/\/www.theregister.com\/software\/2025\/11\/07\/unix-v4-only-known-copy-may-lurk-on-recently-unearthed-tape\/333510\" rel=\"nofollow noopener\" target=\"_blank\">tape of UNIX V4<\/a> was found in <a href=\"https:\/\/discuss.systems\/@ricci\/115096806565494197\" rel=\"nofollow noopener\" target=\"_blank\">University of Utah boffin Robert Ricci<\/a>&#8216;s department \u2014 and <a href=\"https:\/\/www.theregister.com\/on-prem\/2025\/12\/23\/unix-v4-tape-successfully-recovered\/2701023\" rel=\"nofollow noopener\" target=\"_blank\">successfully recovered<\/a>.<\/p>\n<p>Bootnote<\/p>\n<p>Mr Goyo also found time to email The Reg FOSS desk about the recovery, for which we thank him. \u00ae<\/p>\n","protected":false},"excerpt":{"rendered":"OS PLATFORMS Modula-based source code\u00a0resurfaces after nearly four decades For the first time, the source code of KSOS,&hellip;\n","protected":false},"author":2,"featured_media":535550,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[61,60,80],"class_list":["post-535549","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology","tag-ie","tag-ireland","tag-technology"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts\/535549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/comments?post=535549"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts\/535549\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/media\/535550"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/media?parent=535549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/categories?post=535549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/tags?post=535549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}