<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" encoding="UTF-8" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:atom="http://www.w3.org/2005/Atom/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:fireside="http://fireside.fm/modules/rss/fireside">
  <channel>
    <fireside:hostname>web02.fireside.fm</fireside:hostname>
    <fireside:genDate>Tue, 12 May 2026 22:27:19 -0500</fireside:genDate>
    <generator>Fireside (https://fireside.fm)</generator>
    <title>BSD Now - Episodes Tagged with “Tuxedo”</title>
    <link>https://www.bsdnow.tv/tags/tuxedo</link>
    <pubDate>Thu, 12 Sep 2019 01:45:00 -0400</pubDate>
    <description>Created by three guys who love BSD, we cover the latest news and have an extensive series of tutorials, as well as interviews with various people from all areas of the BSD community. It also serves as a platform for support and questions. We love and advocate FreeBSD, OpenBSD, NetBSD, DragonFlyBSD and TrueOS. Our show aims to be helpful and informative for new users that want to learn about them, but still be entertaining for the people who are already pros.
The show airs on Wednesdays at 2:00PM (US Eastern time) and the edited version is usually up the following day. 
</description>
    <language>en-us</language>
    <itunes:type>episodic</itunes:type>
    <itunes:subtitle>A weekly podcast and the place to B...SD</itunes:subtitle>
    <itunes:author>JT Pennington</itunes:author>
    <itunes:summary>Created by three guys who love BSD, we cover the latest news and have an extensive series of tutorials, as well as interviews with various people from all areas of the BSD community. It also serves as a platform for support and questions. We love and advocate FreeBSD, OpenBSD, NetBSD, DragonFlyBSD and TrueOS. Our show aims to be helpful and informative for new users that want to learn about them, but still be entertaining for the people who are already pros.
The show airs on Wednesdays at 2:00PM (US Eastern time) and the edited version is usually up the following day. 
</itunes:summary>
    <itunes:image href="https://media24.fireside.fm/file/fireside-images-2024/podcasts/images/c/c91b88f1-e824-4815-bcb8-5227818d6010/cover.jpg?v=4"/>
    <itunes:explicit>no</itunes:explicit>
    <itunes:keywords>berkeley,freebsd,openbsd,netbsd,dragonflybsd,trueos,trident,hardenedbsd,tutorial,howto,guide,bsd,interview</itunes:keywords>
    <itunes:owner>
      <itunes:name>JT Pennington</itunes:name>
      <itunes:email>feedback@bsdnow.tv</itunes:email>
    </itunes:owner>
<itunes:category text="News">
  <itunes:category text="Tech News"/>
</itunes:category>
<itunes:category text="Education">
  <itunes:category text="How To"/>
</itunes:category>
<item>
  <title>315: Recapping vBSDcon 2019</title>
  <link>https://www.bsdnow.tv/315</link>
  <guid isPermaLink="false">7b9117e9-57d1-48ae-8ceb-d92cabe2a2bd</guid>
  <pubDate>Thu, 12 Sep 2019 01:45:00 -0400</pubDate>
  <author>JT Pennington</author>
  <enclosure url="https://aphid.fireside.fm/d/1437767933/c91b88f1-e824-4815-bcb8-5227818d6010/7b9117e9-57d1-48ae-8ceb-d92cabe2a2bd.mp3" length="55391213" type="audio/mp3"/>
  <itunes:episodeType>full</itunes:episodeType>
  <itunes:author>JT Pennington</itunes:author>
  <itunes:subtitle>vBSDcon 2019 recap, Unix at 50, OpenBSD on fan-less Tuxedo InfinityBook, humungus - an hg server, how to configure a network dump in FreeBSD, and more.</itunes:subtitle>
  <itunes:duration>1:16:55</itunes:duration>
  <itunes:explicit>no</itunes:explicit>
  <itunes:image href="https://media24.fireside.fm/file/fireside-images-2024/podcasts/images/c/c91b88f1-e824-4815-bcb8-5227818d6010/cover.jpg?v=4"/>
  <description>&lt;p&gt;vBSDcon 2019 recap, Unix at 50, OpenBSD on fan-less Tuxedo InfinityBook, humungus - an hg server, how to configure a network dump in FreeBSD, and more.&lt;/p&gt;

&lt;h2&gt;Headlines&lt;/h2&gt;

&lt;h3&gt;vBSDcon Recap&lt;/h3&gt;

&lt;p&gt;Allan and Benedict attended vBSDcon 2019, which ended last week.&lt;/p&gt;

&lt;p&gt;It was held again at the Hyatt Regency Reston and the main conference was organized by Dan Langille of BSDCan fame.The two day conference was preceded by a one day FreeBSD hackathon, where FreeBSD developers had the chance to work on patches and PRs. In the evening, a reception was held to welcome attendees and give them a chance to chat and get to know each other over food and drinks.&lt;/p&gt;

&lt;p&gt;The first day of the conference was opened with a Keynote by Paul Vixie about DNS over HTTPS (DoH). He explained how we got to the current state and what challenges (technical and social) this entails.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you missed this talk and are dying to see it, it will also be presented at EuroBSDCon next week&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;John Baldwin followed up by giving an overview of the work on “In-Kernel TLS Framing and Encryption for FreeBSD” &lt;a href="https://www.vbsdcon.com/schedule/2019-09-06.html#talk:132615" target="_blank" rel="nofollow noopener"&gt;abstract&lt;/a&gt; and the recent commit we covered in episode 313.&lt;/p&gt;

&lt;p&gt;Meanwhile, Brian Callahan was giving a separate session in another room about “Learning to (Open)BSD through its porting system: an attendee-driven educational session” where people had the chance to learn about how to create ports for the BSDs.&lt;/p&gt;

&lt;p&gt;David Fullard’s talk about “Transitioning from FreeNAS to FreeBSD” was his first talk at a BSD conference and described how he built his own home NAS setup trying to replicate FreeNAS’ functionality on FreeBSD, and why he transitioned from using an appliance to using vanilla FreeBSD.&lt;/p&gt;

&lt;p&gt;Shawn Webb followed with his overview talk about the “State of the Hardened Union”. &lt;/p&gt;

&lt;p&gt;Benedict’s talk about “Replacing an Oracle Server with FreeBSD, OpenZFS, and PostgreSQL” was well received as people are interested in how we liberated ourselves from the clutches of Oracle without compromising functionality.&lt;/p&gt;

&lt;p&gt;Entertaining and educational at the same time, Michael W. Lucas talk about “Twenty Years in Jail: FreeBSD Jails, Then and Now” closed the first day. Lucas also had a table in the hallway with his various tech and non-tech books for sale.&lt;/p&gt;

&lt;p&gt;People formed small groups and went into town for dinner. Some returned later that night to some work in the hacker lounge or talk amongst fellow BSD enthusiasts. &lt;/p&gt;

&lt;p&gt;Colin Percival was the keynote speaker for the second day and had an in-depth look at “23 years of software side channel attacks”.&lt;/p&gt;

&lt;p&gt;Allan reprised his “ELI5: ZFS Caching” talk explaining how the ZFS adaptive replacement cache (ARC) work and how it can be tuned for various workloads.&lt;/p&gt;

&lt;p&gt;“By the numbers: ZFS Performance Results from Six Operating Systems and Their Derivatives” by Michael Dexter followed with his approach to benchmarking OpenZFS on various platforms.&lt;/p&gt;

&lt;p&gt;Conor Beh was also a new speaker to vBSDcon. His talk was about “FreeBSD at Work: Building Network and Storage Infrastructure with pfSense and FreeNAS”.&lt;/p&gt;

&lt;p&gt;Two OpenBSD talks closed the talk session: Kurt Mosiejczuk with “Care and Feeding of OpenBSD Porters” and Aaron Poffenberger with “Road Warrior Disaster Recovery: Secure, Synchronized, and Backed-up”.&lt;/p&gt;

&lt;p&gt;A dinner and reception was enjoyed by the attendees and gave more time to discuss the talks given and other things until late at night.&lt;/p&gt;

&lt;p&gt;We want to thank the vBSDcon organizers and especially Dan Langille for running such a great conference. We are grateful to Verisign as the main sponsor and The FreeBSD Foundation for sponsoring the tote bags. Thanks to all the speakers and attendees!&lt;/p&gt;

&lt;h3&gt;&lt;a href="https://humungus.tedunangst.com/r/humungus" target="_blank" rel="nofollow noopener"&gt;humungus - an hg server&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Features

&lt;ul&gt;
&lt;li&gt;View changes, files, changesets, etc. Some syntax highlighting.&lt;/li&gt;
&lt;li&gt;Read only.&lt;/li&gt;
&lt;li&gt;Serves multiple repositories.&lt;/li&gt;
&lt;li&gt;Allows cloning via the obvious URL. Supports go get.&lt;/li&gt;
&lt;li&gt;Serves files for downloads.&lt;/li&gt;
&lt;li&gt;Online documentation via mandoc.&lt;/li&gt;
&lt;li&gt;Terminal based admin interface.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;h2&gt;News Roundup&lt;/h2&gt;

&lt;h3&gt;&lt;a href="https://hazardous.org/archive/blog/openbsd/2019/09/02/OpenBSD-on-Infinitybook14" target="_blank" rel="nofollow noopener"&gt;OpenBSD on fan-less Tuxedo InfinityBook 14″ v2.&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;&amp;gt; The InfinityBook 14” v2 is a fanless 14” notebook. It is an excellent choice for running OpenBSD - but order it with the supported wireless card (see below.).&lt;/p&gt;

&lt;p&gt;&amp;gt; I’ve set it up in a dual-boot configuration so that I can switch between Linux and OpenBSD - mainly to spot differences in the drivers. TUXEDO allows a variety of configurations through their webshop.&lt;/p&gt;

&lt;p&gt;&amp;gt; The dual boot setup with grub2 and EFI boot will be covered in a separate blogpost. My tests were done with OpenBSD-current - which is as of writing flagged as 6.6-beta.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;See Article for breakdown of CPU, Wireless, Video, Webcam, Audio, ACPI, Battery, Touchpad, and MicroSD Card Reader&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;h3&gt;&lt;a href="https://arstechnica.com/gadgets/2019/08/unix-at-50-it-starts-with-a-mainframe-a-gator-and-three-dedicated-researchers/" target="_blank" rel="nofollow noopener"&gt;Unix at 50: How the OS that powered smartphones started from failure&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;&amp;gt; Maybe its pervasiveness has long obscured its origins. But Unix, the operating system that in one derivative or another powers nearly all smartphones sold worldwide, was born 50 years ago from the failure of an ambitious project that involved titans like Bell Labs, GE, and MIT. Largely the brainchild of a few programmers at Bell Labs, the unlikely story of Unix begins with a meeting on the top floor of an otherwise unremarkable annex at the sprawling Bell Labs complex in Murray Hill, New Jersey.&lt;/p&gt;

&lt;p&gt;&amp;gt; It was a bright, cold Monday, the last day of March 1969, and the computer sciences department was hosting distinguished guests: Bill Baker, a Bell Labs vice president, and Ed David, the director of research. Baker was about to pull the plug on Multics (a condensed form of MULTiplexed Information and Computing Service), a software project that the computer sciences department had been working on for four years. Multics was two years overdue, way over budget, and functional only in the loosest possible understanding of the term.&lt;/p&gt;

&lt;p&gt;&amp;gt; Trying to put the best spin possible on what was clearly an abject failure, Baker gave a speech in which he claimed that Bell Labs had accomplished everything it was trying to accomplish in Multics and that they no longer needed to work on the project. As Berk Tague, a staffer present at the meeting, later told Princeton University, “Like Vietnam, he declared victory and got out of Multics.”&lt;/p&gt;

&lt;p&gt;&amp;gt; Within the department, this announcement was hardly unexpected. The programmers were acutely aware of the various issues with both the scope of the project and the computer they had been asked to build it for.&lt;/p&gt;

&lt;p&gt;&amp;gt; Still, it was something to work on, and as long as Bell Labs was working on Multics, they would also have a $7 million mainframe computer to play around with in their spare time. Dennis Ritchie, one of the programmers working on Multics, later said they all felt some stake in the success of the project, even though they knew the odds of that success were exceedingly remote.&lt;/p&gt;

&lt;p&gt;&amp;gt; Cancellation of Multics meant the end of the only project that the programmers in the Computer science department had to work on—and it also meant the loss of the only computer in the Computer science department. After the GE 645 mainframe was taken apart and hauled off, the computer science department’s resources were reduced to little more than office supplies and a few terminals.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some of Allan’s favourite excerpts:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;gt; In the early '60s, Bill Ninke, a researcher in acoustics, had demonstrated a rudimentary graphical user interface with a DEC PDP-7 minicomputer. Acoustics still had that computer, but they weren’t using it and had stuck it somewhere out of the way up on the sixth floor.&lt;/p&gt;

&lt;p&gt;&amp;gt; And so Thompson, an indefatigable explorer of the labs’ nooks and crannies, finally found that PDP-7 shortly after Davis and Baker cancelled Multics.&lt;/p&gt;

&lt;p&gt;&amp;gt; With the rest of the team’s help, Thompson bundled up the various pieces of the PDP-7—a machine about the size of a refrigerator, not counting the terminal—moved it into a closet assigned to the acoustics department, and got it up and running. One way or another, they convinced acoustics to provide space for the computer and also to pay for the not infrequent repairs to it out of that department’s budget.&lt;/p&gt;

&lt;p&gt;&amp;gt; McIlroy’s programmers suddenly had a computer, kind of. So during the summer of 1969, Thompson, Ritchie, and Canaday hashed out the basics of a file manager that would run on the PDP-7. This was no simple task. Batch computing—running programs one after the other—rarely required that a computer be able to permanently store information, and many mainframes did not have any permanent storage device (whether a tape or a hard disk) attached to them. But the time-sharing environment that these programmers had fallen in love with required attached storage. And with multiple users connected to the same computer at the same time, the file manager had to be written well enough to keep one user’s files from being written over another user’s. When a file was read, the output from that file had to be sent to the user that was opening it.&lt;/p&gt;

&lt;p&gt;&amp;gt; It was a challenge that McIlroy’s team was willing to accept. They had seen the future of computing and wanted to explore it. They knew that Multics was a dead-end, but they had discovered the possibilities opened up by shared development, shared access, and real-time computing. Twenty years later, Ritchie characterized it for Princeton as such: “What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form.”&lt;/p&gt;

&lt;p&gt;&amp;gt; Eventually when they had the file management system more or less fleshed out conceptually, it came time to actually write the code. The trio—all of whom had terrible handwriting—decided to use the Labs’ dictating service. One of them called up a lab extension and dictated the entire code base into a tape recorder. And thus, some unidentified clerical worker or workers soon had the unenviable task of trying to convert that into a typewritten document.&lt;/p&gt;

&lt;p&gt;&amp;gt; Of course, it was done imperfectly. Among various errors, “inode” came back as “eye node,” but the output was still viewed as a decided improvement over their assorted scribbles.&lt;/p&gt;

&lt;p&gt;&amp;gt; In August 1969, Thompson’s wife and son went on a three-week vacation to see her family out in Berkeley, and Thompson decided to spend that time writing an assembler, a file editor, and a kernel to manage the PDP-7 processor. This would turn the group’s file manager into a full-fledged operating system. He generously allocated himself one week for each task.&lt;/p&gt;

&lt;p&gt;&amp;gt; Thompson finished his tasks more or less on schedule. And by September, the computer science department at Bell Labs had an operating system running on a PDP-7—and it wasn’t Multics.&lt;/p&gt;

&lt;p&gt;&amp;gt; By the summer of 1970, the team had attached a tape drive to the PDP-7, and their blossoming OS also had a growing selection of tools for programmers (several of which persist down to this day). But despite the successes, Thompson, Canaday, and Ritchie were still being rebuffed by labs management in their efforts to get a brand-new computer.&lt;/p&gt;

&lt;p&gt;&amp;gt; It wasn’t until late 1971 that the computer science department got a truly modern computer. The Unix team had developed several tools designed to automatically format text files for printing over the past year or so. They had done so to simplify the production of documentation for their pet project, but their tools had escaped and were being used by several researchers elsewhere on the top floor. At the same time, the legal department was prepared to spend a fortune on a mainframe program called “AstroText.” Catching wind of this, the Unix crew realized that they could, with only a little effort, upgrade the tools they had written for their own use into something that the legal department could use to prepare patent applications.&lt;/p&gt;

&lt;p&gt;&amp;gt; The computer science department pitched lab management on the purchase of a DEC PDP-11 for document production purposes, and Max Mathews offered to pay for the machine out of the acoustics department budget. Finally, management gave in and purchased a computer for the Unix team to play with. Eventually, word leaked out about this operating system, and businesses and institutions with PDP-11s began contacting Bell Labs about their new operating system. The Labs made it available for free—requesting only the cost of postage and media from anyone who wanted a copy.&lt;/p&gt;

&lt;p&gt;&amp;gt; The rest has quite literally made tech history.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;See the link for the rest of the article&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;h3&gt;&lt;a href="https://www.oshogbo.vexillium.org/blog/68/" target="_blank" rel="nofollow noopener"&gt;How to configure a network dump in FreeBSD?&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;&amp;gt; A network dump might be very useful for collecting kernel crash dumps from embedded machines and machines with a larger amount of RAM then available swap partition size. Besides net dumps we can also try to compress the core dump. However, often this may still not be enough swap to keep whole core dump. In such situation using network dump is a convenient and reliable way for collecting kernel dump.&lt;/p&gt;

&lt;p&gt;&amp;gt; So, first, let’s talk a little bit about history. The first implementation of the network dumps was implemented around 2000 for the FreeBSD 4.x as a kernel module. The code was implemented in 2010 with the intention of being part of FreeBSD 9.0. However, the code never landed in FreeBSD. Finally, in 2018 with the commit r333283 by Mark Johnston the netdump client code landed in the FreeBSD. Subsequently, many other commitments were then implemented to add support for the different drivers (for example r333289). The first official release of FreeBSD, which support netdump is FreeBSD 12.0.&lt;/p&gt;

&lt;p&gt;&amp;gt; Now, let’s get back to the main topic. How to configure the network dump? Two machines are needed. One machine is to collect core dump, let’s call it server. We will use the second one to send us the core dump - the client. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;See the link for the rest of the article&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;h2&gt;Beastie Bits&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mwl.io/archives/4530" target="_blank" rel="nofollow noopener"&gt;Sudo Mastery 2nd edition is not out&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://users.utu.fi/kakrind/publications/19/vulnfuzz_camera.pdf" target="_blank" rel="nofollow noopener"&gt;Empirical Notes on the Interaction Between Continuous Kernel Fuzzing and Development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ozkl/soso" target="_blank" rel="nofollow noopener"&gt;soso&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/gUqcMs0svNU?t=254" target="_blank" rel="nofollow noopener"&gt;GregKH - OpenBSD was right&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gameoftrees.org/faq.html" target="_blank" rel="nofollow noopener"&gt;Game of Trees&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;h2&gt;Feedback/Questions&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;BostJan - &lt;a href="http://dpaste.com/1ZPCCQY#wrap" target="_blank" rel="nofollow noopener"&gt;Another Question&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Tom - &lt;a href="http://dpaste.com/3ZSCB8N#wrap" target="_blank" rel="nofollow noopener"&gt;PF&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;JohnnyK - &lt;a href="http://dpaste.com/3QZQ7Q5#wrap" target="_blank" rel="nofollow noopener"&gt;Changing VT without keys&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;ul&gt;
&lt;li&gt;Send questions, comments, show ideas/topics, or stories you want mentioned on the show to &lt;a href="mailto:feedback@bsdnow.tv" target="_blank" rel="nofollow noopener"&gt;feedback@bsdnow.tv&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;


    &lt;source src="http://201406.jb-dl.cdn.scaleengine.net/bsdnow/2019/bsd-0315.mp4" type="video/mp4"&gt;
    Your browser does not support the HTML5 video tag.
&lt;/source&gt; 
</description>
  <itunes:keywords>freebsd, openbsd, netbsd, dragonflybsd, trueos, trident, hardenedbsd, tutorial, howto, guide, bsd, interview, vBSDcon 2019, fan-less, fanless, tuxedo, infinitybook, tuxedo infinitybook, humungus, hg, hg server, network dump, configure, configuration</itunes:keywords>
  <content:encoded>
    <![CDATA[<p>vBSDcon 2019 recap, Unix at 50, OpenBSD on fan-less Tuxedo InfinityBook, humungus - an hg server, how to configure a network dump in FreeBSD, and more.</p>

<h2>Headlines</h2>

<h3>vBSDcon Recap</h3>

<p>Allan and Benedict attended vBSDcon 2019, which ended last week.</p>

<p>It was held again at the Hyatt Regency Reston and the main conference was organized by Dan Langille of BSDCan fame.The two day conference was preceded by a one day FreeBSD hackathon, where FreeBSD developers had the chance to work on patches and PRs. In the evening, a reception was held to welcome attendees and give them a chance to chat and get to know each other over food and drinks.</p>

<p>The first day of the conference was opened with a Keynote by Paul Vixie about DNS over HTTPS (DoH). He explained how we got to the current state and what challenges (technical and social) this entails.</p>

<ul>
<li>If you missed this talk and are dying to see it, it will also be presented at EuroBSDCon next week</li>
</ul>

<p>John Baldwin followed up by giving an overview of the work on “In-Kernel TLS Framing and Encryption for FreeBSD” <a href="https://www.vbsdcon.com/schedule/2019-09-06.html#talk:132615" rel="nofollow">abstract</a> and the recent commit we covered in episode 313.</p>

<p>Meanwhile, Brian Callahan was giving a separate session in another room about “Learning to (Open)BSD through its porting system: an attendee-driven educational session” where people had the chance to learn about how to create ports for the BSDs.</p>

<p>David Fullard’s talk about “Transitioning from FreeNAS to FreeBSD” was his first talk at a BSD conference and described how he built his own home NAS setup trying to replicate FreeNAS’ functionality on FreeBSD, and why he transitioned from using an appliance to using vanilla FreeBSD.</p>

<p>Shawn Webb followed with his overview talk about the “State of the Hardened Union”. </p>

<p>Benedict’s talk about “Replacing an Oracle Server with FreeBSD, OpenZFS, and PostgreSQL” was well received as people are interested in how we liberated ourselves from the clutches of Oracle without compromising functionality.</p>

<p>Entertaining and educational at the same time, Michael W. Lucas talk about “Twenty Years in Jail: FreeBSD Jails, Then and Now” closed the first day. Lucas also had a table in the hallway with his various tech and non-tech books for sale.</p>

<p>People formed small groups and went into town for dinner. Some returned later that night to some work in the hacker lounge or talk amongst fellow BSD enthusiasts. </p>

<p>Colin Percival was the keynote speaker for the second day and had an in-depth look at “23 years of software side channel attacks”.</p>

<p>Allan reprised his “ELI5: ZFS Caching” talk explaining how the ZFS adaptive replacement cache (ARC) work and how it can be tuned for various workloads.</p>

<p>“By the numbers: ZFS Performance Results from Six Operating Systems and Their Derivatives” by Michael Dexter followed with his approach to benchmarking OpenZFS on various platforms.</p>

<p>Conor Beh was also a new speaker to vBSDcon. His talk was about “FreeBSD at Work: Building Network and Storage Infrastructure with pfSense and FreeNAS”.</p>

<p>Two OpenBSD talks closed the talk session: Kurt Mosiejczuk with “Care and Feeding of OpenBSD Porters” and Aaron Poffenberger with “Road Warrior Disaster Recovery: Secure, Synchronized, and Backed-up”.</p>

<p>A dinner and reception was enjoyed by the attendees and gave more time to discuss the talks given and other things until late at night.</p>

<p>We want to thank the vBSDcon organizers and especially Dan Langille for running such a great conference. We are grateful to Verisign as the main sponsor and The FreeBSD Foundation for sponsoring the tote bags. Thanks to all the speakers and attendees!</p>

<h3><a href="https://humungus.tedunangst.com/r/humungus" rel="nofollow">humungus - an hg server</a></h3>

<ul>
<li>Features

<ul>
<li>View changes, files, changesets, etc. Some syntax highlighting.</li>
<li>Read only.</li>
<li>Serves multiple repositories.</li>
<li>Allows cloning via the obvious URL. Supports go get.</li>
<li>Serves files for downloads.</li>
<li>Online documentation via mandoc.</li>
<li>Terminal based admin interface.</li>
</ul></li>
</ul>

<hr>

<h2>News Roundup</h2>

<h3><a href="https://hazardous.org/archive/blog/openbsd/2019/09/02/OpenBSD-on-Infinitybook14" rel="nofollow">OpenBSD on fan-less Tuxedo InfinityBook 14″ v2.</a></h3>

<blockquote>
<p>The InfinityBook 14” v2 is a fanless 14” notebook. It is an excellent choice for running OpenBSD - but order it with the supported wireless card (see below.).</p>

<p>I’ve set it up in a dual-boot configuration so that I can switch between Linux and OpenBSD - mainly to spot differences in the drivers. TUXEDO allows a variety of configurations through their webshop.</p>

<p>The dual boot setup with grub2 and EFI boot will be covered in a separate blogpost. My tests were done with OpenBSD-current - which is as of writing flagged as 6.6-beta.</p>
</blockquote>

<ul>
<li>See Article for breakdown of CPU, Wireless, Video, Webcam, Audio, ACPI, Battery, Touchpad, and MicroSD Card Reader</li>
</ul>

<hr>

<h3><a href="https://arstechnica.com/gadgets/2019/08/unix-at-50-it-starts-with-a-mainframe-a-gator-and-three-dedicated-researchers/" rel="nofollow">Unix at 50: How the OS that powered smartphones started from failure</a></h3>

<blockquote>
<p>Maybe its pervasiveness has long obscured its origins. But Unix, the operating system that in one derivative or another powers nearly all smartphones sold worldwide, was born 50 years ago from the failure of an ambitious project that involved titans like Bell Labs, GE, and MIT. Largely the brainchild of a few programmers at Bell Labs, the unlikely story of Unix begins with a meeting on the top floor of an otherwise unremarkable annex at the sprawling Bell Labs complex in Murray Hill, New Jersey.</p>

<p>It was a bright, cold Monday, the last day of March 1969, and the computer sciences department was hosting distinguished guests: Bill Baker, a Bell Labs vice president, and Ed David, the director of research. Baker was about to pull the plug on Multics (a condensed form of MULTiplexed Information and Computing Service), a software project that the computer sciences department had been working on for four years. Multics was two years overdue, way over budget, and functional only in the loosest possible understanding of the term.</p>

<p>Trying to put the best spin possible on what was clearly an abject failure, Baker gave a speech in which he claimed that Bell Labs had accomplished everything it was trying to accomplish in Multics and that they no longer needed to work on the project. As Berk Tague, a staffer present at the meeting, later told Princeton University, “Like Vietnam, he declared victory and got out of Multics.”</p>

<p>Within the department, this announcement was hardly unexpected. The programmers were acutely aware of the various issues with both the scope of the project and the computer they had been asked to build it for.</p>

<p>Still, it was something to work on, and as long as Bell Labs was working on Multics, they would also have a $7 million mainframe computer to play around with in their spare time. Dennis Ritchie, one of the programmers working on Multics, later said they all felt some stake in the success of the project, even though they knew the odds of that success were exceedingly remote.</p>

<p>Cancellation of Multics meant the end of the only project that the programmers in the Computer science department had to work on—and it also meant the loss of the only computer in the Computer science department. After the GE 645 mainframe was taken apart and hauled off, the computer science department’s resources were reduced to little more than office supplies and a few terminals.</p>
</blockquote>

<ul>
<li>Some of Allan’s favourite excerpts:</li>
</ul>

<blockquote>
<p>In the early &#39;60s, Bill Ninke, a researcher in acoustics, had demonstrated a rudimentary graphical user interface with a DEC PDP-7 minicomputer. Acoustics still had that computer, but they weren’t using it and had stuck it somewhere out of the way up on the sixth floor.</p>

<p>And so Thompson, an indefatigable explorer of the labs’ nooks and crannies, finally found that PDP-7 shortly after Davis and Baker cancelled Multics.</p>

<p>With the rest of the team’s help, Thompson bundled up the various pieces of the PDP-7—a machine about the size of a refrigerator, not counting the terminal—moved it into a closet assigned to the acoustics department, and got it up and running. One way or another, they convinced acoustics to provide space for the computer and also to pay for the not infrequent repairs to it out of that department’s budget.</p>

<p>McIlroy’s programmers suddenly had a computer, kind of. So during the summer of 1969, Thompson, Ritchie, and Canaday hashed out the basics of a file manager that would run on the PDP-7. This was no simple task. Batch computing—running programs one after the other—rarely required that a computer be able to permanently store information, and many mainframes did not have any permanent storage device (whether a tape or a hard disk) attached to them. But the time-sharing environment that these programmers had fallen in love with required attached storage. And with multiple users connected to the same computer at the same time, the file manager had to be written well enough to keep one user’s files from being written over another user’s. When a file was read, the output from that file had to be sent to the user that was opening it.</p>

<p>It was a challenge that McIlroy’s team was willing to accept. They had seen the future of computing and wanted to explore it. They knew that Multics was a dead-end, but they had discovered the possibilities opened up by shared development, shared access, and real-time computing. Twenty years later, Ritchie characterized it for Princeton as such: “What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form.”</p>

<p>Eventually when they had the file management system more or less fleshed out conceptually, it came time to actually write the code. The trio—all of whom had terrible handwriting—decided to use the Labs’ dictating service. One of them called up a lab extension and dictated the entire code base into a tape recorder. And thus, some unidentified clerical worker or workers soon had the unenviable task of trying to convert that into a typewritten document.</p>

<p>Of course, it was done imperfectly. Among various errors, “inode” came back as “eye node,” but the output was still viewed as a decided improvement over their assorted scribbles.</p>

<p>In August 1969, Thompson’s wife and son went on a three-week vacation to see her family out in Berkeley, and Thompson decided to spend that time writing an assembler, a file editor, and a kernel to manage the PDP-7 processor. This would turn the group’s file manager into a full-fledged operating system. He generously allocated himself one week for each task.</p>

<p>Thompson finished his tasks more or less on schedule. And by September, the computer science department at Bell Labs had an operating system running on a PDP-7—and it wasn’t Multics.</p>

<p>By the summer of 1970, the team had attached a tape drive to the PDP-7, and their blossoming OS also had a growing selection of tools for programmers (several of which persist down to this day). But despite the successes, Thompson, Canaday, and Ritchie were still being rebuffed by labs management in their efforts to get a brand-new computer.</p>

<p>It wasn’t until late 1971 that the computer science department got a truly modern computer. The Unix team had developed several tools designed to automatically format text files for printing over the past year or so. They had done so to simplify the production of documentation for their pet project, but their tools had escaped and were being used by several researchers elsewhere on the top floor. At the same time, the legal department was prepared to spend a fortune on a mainframe program called “AstroText.” Catching wind of this, the Unix crew realized that they could, with only a little effort, upgrade the tools they had written for their own use into something that the legal department could use to prepare patent applications.</p>

<p>The computer science department pitched lab management on the purchase of a DEC PDP-11 for document production purposes, and Max Mathews offered to pay for the machine out of the acoustics department budget. Finally, management gave in and purchased a computer for the Unix team to play with. Eventually, word leaked out about this operating system, and businesses and institutions with PDP-11s began contacting Bell Labs about their new operating system. The Labs made it available for free—requesting only the cost of postage and media from anyone who wanted a copy.</p>

<p>The rest has quite literally made tech history.</p>
</blockquote>

<ul>
<li>See the link for the rest of the article</li>
</ul>

<hr>

<h3><a href="https://www.oshogbo.vexillium.org/blog/68/" rel="nofollow">How to configure a network dump in FreeBSD?</a></h3>

<blockquote>
<p>A network dump might be very useful for collecting kernel crash dumps from embedded machines and machines with a larger amount of RAM then available swap partition size. Besides net dumps we can also try to compress the core dump. However, often this may still not be enough swap to keep whole core dump. In such situation using network dump is a convenient and reliable way for collecting kernel dump.</p>

<p>So, first, let’s talk a little bit about history. The first implementation of the network dumps was implemented around 2000 for the FreeBSD 4.x as a kernel module. The code was implemented in 2010 with the intention of being part of FreeBSD 9.0. However, the code never landed in FreeBSD. Finally, in 2018 with the commit r333283 by Mark Johnston the netdump client code landed in the FreeBSD. Subsequently, many other commitments were then implemented to add support for the different drivers (for example r333289). The first official release of FreeBSD, which support netdump is FreeBSD 12.0.</p>

<p>Now, let’s get back to the main topic. How to configure the network dump? Two machines are needed. One machine is to collect core dump, let’s call it server. We will use the second one to send us the core dump - the client. </p>
</blockquote>

<ul>
<li>See the link for the rest of the article</li>
</ul>

<hr>

<h2>Beastie Bits</h2>

<ul>
<li><a href="https://mwl.io/archives/4530" rel="nofollow">Sudo Mastery 2nd edition is not out</a></li>
<li><a href="http://users.utu.fi/kakrind/publications/19/vulnfuzz_camera.pdf" rel="nofollow">Empirical Notes on the Interaction Between Continuous Kernel Fuzzing and Development</a></li>
<li><a href="https://github.com/ozkl/soso" rel="nofollow">soso</a></li>
<li><a href="https://youtu.be/gUqcMs0svNU?t=254" rel="nofollow">GregKH - OpenBSD was right</a></li>
<li><a href="https://gameoftrees.org/faq.html" rel="nofollow">Game of Trees</a></li>
</ul>

<hr>

<h2>Feedback/Questions</h2>

<ul>
<li>BostJan - <a href="http://dpaste.com/1ZPCCQY#wrap" rel="nofollow">Another Question</a></li>
<li>Tom - <a href="http://dpaste.com/3ZSCB8N#wrap" rel="nofollow">PF</a></li>
<li>JohnnyK - <a href="http://dpaste.com/3QZQ7Q5#wrap" rel="nofollow">Changing VT without keys</a></li>
</ul>

<hr>

<ul>
<li>Send questions, comments, show ideas/topics, or stories you want mentioned on the show to <a href="mailto:feedback@bsdnow.tv" rel="nofollow">feedback@bsdnow.tv</a></li>
</ul>

<hr>

<video controls preload="metadata" style=" width:426px;  height:240px;">
    <source src="http://201406.jb-dl.cdn.scaleengine.net/bsdnow/2019/bsd-0315.mp4" type="video/mp4">
    Your browser does not support the HTML5 video tag.
</video>]]>
  </content:encoded>
  <itunes:summary>
    <![CDATA[<p>vBSDcon 2019 recap, Unix at 50, OpenBSD on fan-less Tuxedo InfinityBook, humungus - an hg server, how to configure a network dump in FreeBSD, and more.</p>

<h2>Headlines</h2>

<h3>vBSDcon Recap</h3>

<p>Allan and Benedict attended vBSDcon 2019, which ended last week.</p>

<p>It was held again at the Hyatt Regency Reston and the main conference was organized by Dan Langille of BSDCan fame.The two day conference was preceded by a one day FreeBSD hackathon, where FreeBSD developers had the chance to work on patches and PRs. In the evening, a reception was held to welcome attendees and give them a chance to chat and get to know each other over food and drinks.</p>

<p>The first day of the conference was opened with a Keynote by Paul Vixie about DNS over HTTPS (DoH). He explained how we got to the current state and what challenges (technical and social) this entails.</p>

<ul>
<li>If you missed this talk and are dying to see it, it will also be presented at EuroBSDCon next week</li>
</ul>

<p>John Baldwin followed up by giving an overview of the work on “In-Kernel TLS Framing and Encryption for FreeBSD” <a href="https://www.vbsdcon.com/schedule/2019-09-06.html#talk:132615" rel="nofollow">abstract</a> and the recent commit we covered in episode 313.</p>

<p>Meanwhile, Brian Callahan was giving a separate session in another room about “Learning to (Open)BSD through its porting system: an attendee-driven educational session” where people had the chance to learn about how to create ports for the BSDs.</p>

<p>David Fullard’s talk about “Transitioning from FreeNAS to FreeBSD” was his first talk at a BSD conference and described how he built his own home NAS setup trying to replicate FreeNAS’ functionality on FreeBSD, and why he transitioned from using an appliance to using vanilla FreeBSD.</p>

<p>Shawn Webb followed with his overview talk about the “State of the Hardened Union”. </p>

<p>Benedict’s talk about “Replacing an Oracle Server with FreeBSD, OpenZFS, and PostgreSQL” was well received as people are interested in how we liberated ourselves from the clutches of Oracle without compromising functionality.</p>

<p>Entertaining and educational at the same time, Michael W. Lucas talk about “Twenty Years in Jail: FreeBSD Jails, Then and Now” closed the first day. Lucas also had a table in the hallway with his various tech and non-tech books for sale.</p>

<p>People formed small groups and went into town for dinner. Some returned later that night to some work in the hacker lounge or talk amongst fellow BSD enthusiasts. </p>

<p>Colin Percival was the keynote speaker for the second day and had an in-depth look at “23 years of software side channel attacks”.</p>

<p>Allan reprised his “ELI5: ZFS Caching” talk explaining how the ZFS adaptive replacement cache (ARC) work and how it can be tuned for various workloads.</p>

<p>“By the numbers: ZFS Performance Results from Six Operating Systems and Their Derivatives” by Michael Dexter followed with his approach to benchmarking OpenZFS on various platforms.</p>

<p>Conor Beh was also a new speaker to vBSDcon. His talk was about “FreeBSD at Work: Building Network and Storage Infrastructure with pfSense and FreeNAS”.</p>

<p>Two OpenBSD talks closed the talk session: Kurt Mosiejczuk with “Care and Feeding of OpenBSD Porters” and Aaron Poffenberger with “Road Warrior Disaster Recovery: Secure, Synchronized, and Backed-up”.</p>

<p>A dinner and reception was enjoyed by the attendees and gave more time to discuss the talks given and other things until late at night.</p>

<p>We want to thank the vBSDcon organizers and especially Dan Langille for running such a great conference. We are grateful to Verisign as the main sponsor and The FreeBSD Foundation for sponsoring the tote bags. Thanks to all the speakers and attendees!</p>

<h3><a href="https://humungus.tedunangst.com/r/humungus" rel="nofollow">humungus - an hg server</a></h3>

<ul>
<li>Features

<ul>
<li>View changes, files, changesets, etc. Some syntax highlighting.</li>
<li>Read only.</li>
<li>Serves multiple repositories.</li>
<li>Allows cloning via the obvious URL. Supports go get.</li>
<li>Serves files for downloads.</li>
<li>Online documentation via mandoc.</li>
<li>Terminal based admin interface.</li>
</ul></li>
</ul>

<hr>

<h2>News Roundup</h2>

<h3><a href="https://hazardous.org/archive/blog/openbsd/2019/09/02/OpenBSD-on-Infinitybook14" rel="nofollow">OpenBSD on fan-less Tuxedo InfinityBook 14″ v2.</a></h3>

<blockquote>
<p>The InfinityBook 14” v2 is a fanless 14” notebook. It is an excellent choice for running OpenBSD - but order it with the supported wireless card (see below.).</p>

<p>I’ve set it up in a dual-boot configuration so that I can switch between Linux and OpenBSD - mainly to spot differences in the drivers. TUXEDO allows a variety of configurations through their webshop.</p>

<p>The dual boot setup with grub2 and EFI boot will be covered in a separate blogpost. My tests were done with OpenBSD-current - which is as of writing flagged as 6.6-beta.</p>
</blockquote>

<ul>
<li>See Article for breakdown of CPU, Wireless, Video, Webcam, Audio, ACPI, Battery, Touchpad, and MicroSD Card Reader</li>
</ul>

<hr>

<h3><a href="https://arstechnica.com/gadgets/2019/08/unix-at-50-it-starts-with-a-mainframe-a-gator-and-three-dedicated-researchers/" rel="nofollow">Unix at 50: How the OS that powered smartphones started from failure</a></h3>

<blockquote>
<p>Maybe its pervasiveness has long obscured its origins. But Unix, the operating system that in one derivative or another powers nearly all smartphones sold worldwide, was born 50 years ago from the failure of an ambitious project that involved titans like Bell Labs, GE, and MIT. Largely the brainchild of a few programmers at Bell Labs, the unlikely story of Unix begins with a meeting on the top floor of an otherwise unremarkable annex at the sprawling Bell Labs complex in Murray Hill, New Jersey.</p>

<p>It was a bright, cold Monday, the last day of March 1969, and the computer sciences department was hosting distinguished guests: Bill Baker, a Bell Labs vice president, and Ed David, the director of research. Baker was about to pull the plug on Multics (a condensed form of MULTiplexed Information and Computing Service), a software project that the computer sciences department had been working on for four years. Multics was two years overdue, way over budget, and functional only in the loosest possible understanding of the term.</p>

<p>Trying to put the best spin possible on what was clearly an abject failure, Baker gave a speech in which he claimed that Bell Labs had accomplished everything it was trying to accomplish in Multics and that they no longer needed to work on the project. As Berk Tague, a staffer present at the meeting, later told Princeton University, “Like Vietnam, he declared victory and got out of Multics.”</p>

<p>Within the department, this announcement was hardly unexpected. The programmers were acutely aware of the various issues with both the scope of the project and the computer they had been asked to build it for.</p>

<p>Still, it was something to work on, and as long as Bell Labs was working on Multics, they would also have a $7 million mainframe computer to play around with in their spare time. Dennis Ritchie, one of the programmers working on Multics, later said they all felt some stake in the success of the project, even though they knew the odds of that success were exceedingly remote.</p>

<p>Cancellation of Multics meant the end of the only project that the programmers in the Computer science department had to work on—and it also meant the loss of the only computer in the Computer science department. After the GE 645 mainframe was taken apart and hauled off, the computer science department’s resources were reduced to little more than office supplies and a few terminals.</p>
</blockquote>

<ul>
<li>Some of Allan’s favourite excerpts:</li>
</ul>

<blockquote>
<p>In the early &#39;60s, Bill Ninke, a researcher in acoustics, had demonstrated a rudimentary graphical user interface with a DEC PDP-7 minicomputer. Acoustics still had that computer, but they weren’t using it and had stuck it somewhere out of the way up on the sixth floor.</p>

<p>And so Thompson, an indefatigable explorer of the labs’ nooks and crannies, finally found that PDP-7 shortly after Davis and Baker cancelled Multics.</p>

<p>With the rest of the team’s help, Thompson bundled up the various pieces of the PDP-7—a machine about the size of a refrigerator, not counting the terminal—moved it into a closet assigned to the acoustics department, and got it up and running. One way or another, they convinced acoustics to provide space for the computer and also to pay for the not infrequent repairs to it out of that department’s budget.</p>

<p>McIlroy’s programmers suddenly had a computer, kind of. So during the summer of 1969, Thompson, Ritchie, and Canaday hashed out the basics of a file manager that would run on the PDP-7. This was no simple task. Batch computing—running programs one after the other—rarely required that a computer be able to permanently store information, and many mainframes did not have any permanent storage device (whether a tape or a hard disk) attached to them. But the time-sharing environment that these programmers had fallen in love with required attached storage. And with multiple users connected to the same computer at the same time, the file manager had to be written well enough to keep one user’s files from being written over another user’s. When a file was read, the output from that file had to be sent to the user that was opening it.</p>

<p>It was a challenge that McIlroy’s team was willing to accept. They had seen the future of computing and wanted to explore it. They knew that Multics was a dead-end, but they had discovered the possibilities opened up by shared development, shared access, and real-time computing. Twenty years later, Ritchie characterized it for Princeton as such: “What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form.”</p>

<p>Eventually when they had the file management system more or less fleshed out conceptually, it came time to actually write the code. The trio—all of whom had terrible handwriting—decided to use the Labs’ dictating service. One of them called up a lab extension and dictated the entire code base into a tape recorder. And thus, some unidentified clerical worker or workers soon had the unenviable task of trying to convert that into a typewritten document.</p>

<p>Of course, it was done imperfectly. Among various errors, “inode” came back as “eye node,” but the output was still viewed as a decided improvement over their assorted scribbles.</p>

<p>In August 1969, Thompson’s wife and son went on a three-week vacation to see her family out in Berkeley, and Thompson decided to spend that time writing an assembler, a file editor, and a kernel to manage the PDP-7 processor. This would turn the group’s file manager into a full-fledged operating system. He generously allocated himself one week for each task.</p>

<p>Thompson finished his tasks more or less on schedule. And by September, the computer science department at Bell Labs had an operating system running on a PDP-7—and it wasn’t Multics.</p>

<p>By the summer of 1970, the team had attached a tape drive to the PDP-7, and their blossoming OS also had a growing selection of tools for programmers (several of which persist down to this day). But despite the successes, Thompson, Canaday, and Ritchie were still being rebuffed by labs management in their efforts to get a brand-new computer.</p>

<p>It wasn’t until late 1971 that the computer science department got a truly modern computer. The Unix team had developed several tools designed to automatically format text files for printing over the past year or so. They had done so to simplify the production of documentation for their pet project, but their tools had escaped and were being used by several researchers elsewhere on the top floor. At the same time, the legal department was prepared to spend a fortune on a mainframe program called “AstroText.” Catching wind of this, the Unix crew realized that they could, with only a little effort, upgrade the tools they had written for their own use into something that the legal department could use to prepare patent applications.</p>

<p>The computer science department pitched lab management on the purchase of a DEC PDP-11 for document production purposes, and Max Mathews offered to pay for the machine out of the acoustics department budget. Finally, management gave in and purchased a computer for the Unix team to play with. Eventually, word leaked out about this operating system, and businesses and institutions with PDP-11s began contacting Bell Labs about their new operating system. The Labs made it available for free—requesting only the cost of postage and media from anyone who wanted a copy.</p>

<p>The rest has quite literally made tech history.</p>
</blockquote>

<ul>
<li>See the link for the rest of the article</li>
</ul>

<hr>

<h3><a href="https://www.oshogbo.vexillium.org/blog/68/" rel="nofollow">How to configure a network dump in FreeBSD?</a></h3>

<blockquote>
<p>A network dump might be very useful for collecting kernel crash dumps from embedded machines and machines with a larger amount of RAM then available swap partition size. Besides net dumps we can also try to compress the core dump. However, often this may still not be enough swap to keep whole core dump. In such situation using network dump is a convenient and reliable way for collecting kernel dump.</p>

<p>So, first, let’s talk a little bit about history. The first implementation of the network dumps was implemented around 2000 for the FreeBSD 4.x as a kernel module. The code was implemented in 2010 with the intention of being part of FreeBSD 9.0. However, the code never landed in FreeBSD. Finally, in 2018 with the commit r333283 by Mark Johnston the netdump client code landed in the FreeBSD. Subsequently, many other commitments were then implemented to add support for the different drivers (for example r333289). The first official release of FreeBSD, which support netdump is FreeBSD 12.0.</p>

<p>Now, let’s get back to the main topic. How to configure the network dump? Two machines are needed. One machine is to collect core dump, let’s call it server. We will use the second one to send us the core dump - the client. </p>
</blockquote>

<ul>
<li>See the link for the rest of the article</li>
</ul>

<hr>

<h2>Beastie Bits</h2>

<ul>
<li><a href="https://mwl.io/archives/4530" rel="nofollow">Sudo Mastery 2nd edition is not out</a></li>
<li><a href="http://users.utu.fi/kakrind/publications/19/vulnfuzz_camera.pdf" rel="nofollow">Empirical Notes on the Interaction Between Continuous Kernel Fuzzing and Development</a></li>
<li><a href="https://github.com/ozkl/soso" rel="nofollow">soso</a></li>
<li><a href="https://youtu.be/gUqcMs0svNU?t=254" rel="nofollow">GregKH - OpenBSD was right</a></li>
<li><a href="https://gameoftrees.org/faq.html" rel="nofollow">Game of Trees</a></li>
</ul>

<hr>

<h2>Feedback/Questions</h2>

<ul>
<li>BostJan - <a href="http://dpaste.com/1ZPCCQY#wrap" rel="nofollow">Another Question</a></li>
<li>Tom - <a href="http://dpaste.com/3ZSCB8N#wrap" rel="nofollow">PF</a></li>
<li>JohnnyK - <a href="http://dpaste.com/3QZQ7Q5#wrap" rel="nofollow">Changing VT without keys</a></li>
</ul>

<hr>

<ul>
<li>Send questions, comments, show ideas/topics, or stories you want mentioned on the show to <a href="mailto:feedback@bsdnow.tv" rel="nofollow">feedback@bsdnow.tv</a></li>
</ul>

<hr>

<video controls preload="metadata" style=" width:426px;  height:240px;">
    <source src="http://201406.jb-dl.cdn.scaleengine.net/bsdnow/2019/bsd-0315.mp4" type="video/mp4">
    Your browser does not support the HTML5 video tag.
</video>]]>
  </itunes:summary>
</item>
<item>
  <title>Episode 256: Because Computers | BSD Now 2^8</title>
  <link>https://www.bsdnow.tv/256</link>
  <guid isPermaLink="false">http://feed.jupiter.zone/bsdnow#entry-2304</guid>
  <pubDate>Wed, 25 Jul 2018 01:00:00 -0400</pubDate>
  <author>JT Pennington</author>
  <enclosure url="https://aphid.fireside.fm/d/1437767933/c91b88f1-e824-4815-bcb8-5227818d6010/d5ca53c5-7144-4ce4-9189-591a8ac5767b.mp3" length="63008930" type="audio/mp3"/>
  <itunes:episodeType>full</itunes:episodeType>
  <itunes:author>JT Pennington</itunes:author>
  <itunes:subtitle>FreeBSD ULE vs. Linux CFS, OpenBSD on Tuxedo InfinityBook, how zfs diff reports filenames efficiently, why choose FreeBSD over Linux, PS4 double free exploit, OpenBSD’s wifi autojoin, and FreeBSD jails the hard way.</itunes:subtitle>
  <itunes:duration>1:44:42</itunes:duration>
  <itunes:explicit>no</itunes:explicit>
  <itunes:image href="https://media24.fireside.fm/file/fireside-images-2024/podcasts/images/c/c91b88f1-e824-4815-bcb8-5227818d6010/cover.jpg?v=4"/>
  <description>&lt;p&gt;FreeBSD ULE vs. Linux CFS, OpenBSD on Tuxedo InfinityBook, how zfs diff reports filenames efficiently, why choose FreeBSD over Linux, PS4 double free exploit, OpenBSD’s wifi autojoin, and FreeBSD jails the hard way.&lt;/p&gt;

&lt;h2&gt;Win&lt;/h2&gt;

&lt;p&gt;Celebrate our 256th episode with us. You can win a Mogics Power Bagel (not sponsored).&lt;/p&gt;

&lt;p&gt;To enter, go find the 4 episodes we did in December of 2017. In the opening, find the 4 letters in the bookshelf behind me. They spell different words in each of the 4 episodes. Send us these words in order to &lt;a href="mailto:feedback@bsdnow.tv" target="_blank" rel="nofollow noopener"&gt;feedback@bsdnow.tv&lt;/a&gt; with the subject “bsdnow256” until August 8th, 2018 18:00 UTC and we’ll randomly draw the winner on the live show. We’ll then contact you to ship the item.&lt;br&gt;
Only one item to win. All decisions are final. Better luck next time.&lt;/p&gt;

&lt;h2&gt;Headlines&lt;/h2&gt;

&lt;h3&gt;Battle of the Schedulers: FreeBSD ULE vs. Linux CFS&lt;/h3&gt;

&lt;p&gt;Introduction&lt;br&gt;
This paper analyzes the impact on application performance of the design and implementation choices made in two widely used open-source schedulers: ULE, the default FreeBSD scheduler, and CFS, the default Linux scheduler. We compare ULE and CFS in otherwise identical circumstances. We have ported ULE to Linux, and use it to schedule all threads that are normally scheduled by CFS. We compare the performance of a large suite of applications on the modified kernel running ULE and on the standard Linux kernel running CFS. The observed performance differences are solely the result of scheduling decisions, and do not reflect differences in other subsystems between FreeBSD and Linux. There is no overall winner. On many workloads the two schedulers perform similarly, but for some workloads there are significant and even surprising differences. ULE may cause starvation, even when executing a single application with identical threads, but this starvation may actually lead to better application performance for some workloads. The more complex load balancing mechanism of CFS reacts more quickly to workload changes, but ULE achieves better load balance in the long run.&lt;br&gt;
Operating system kernel schedulers are responsible for maintaining high utilization of hardware resources (CPU cores, memory, I/O devices) while providing fast response time to latency-sensitive applications. They have to react to workload changes, and handle large numbers of cores and threads with minimal overhead [12]. This paper provides a comparison between the default schedulers of two of the most widely deployed open-source operating systems: the Completely Fair Scheduler (CFS) used in Linux, and the ULE scheduler used in FreeBSD. Our goal is not to declare an overall winner.&lt;br&gt;
In fact, we find that for some workloads ULE is better and for others CFS is better. Instead, our goal is to illustrate how differences in the design and the implementation of the two schedulers are reflected in application performance under different workloads. ULE and CFS are both designed to schedule large numbers of threads on large multicore machines. Scalability considerations have led both schedulers to adopt per-core run-queues. On a context switch, a core accesses only its local run-queue to find the next thread to run. Periodically and at select times, e.g., when a thread wakes up, both ULE and CFS perform load balancing, i.e., they try to balance the amount of work waiting in the run-queues of different cores.&lt;br&gt;
ULE and CFS, however, differ greatly in their design and implementation choices. FreeBSD ULE is a simple scheduler (2,950 lines of code in FreeBSD 11.1), while Linux CFS is much more complex (17,900 lines of code in the latest LTS Linux kernel, Linux 4.9). FreeBSD run-queues are FIFO. For load balancing, FreeBSD strives to even out the number of threads per core. In Linux, a core decides which thread to run next based on prior execution time, priority, and perceived cache behavior of the threads in its runqueue. Instead of evening out the number of threads between cores, Linux strives to even out the average amount of pending work.&lt;/p&gt;

&lt;p&gt;Performance analysis&lt;br&gt;
We now analyze the impact of the per-core scheduling on the performance of 37 applications. We define “performance” as follows: for database workloads and NAS applications, we compare the number of operations per second, and for the other applications we compare “execution time”. The higher the “performance”, the better a scheduler performs. Figure 5 presents the performance difference between CFS and ULE on a single core, with percentages above 0 meaning that the application executes faster with ULE than CFS.&lt;br&gt;
Overall, the scheduler has little influence on most workloads. Indeed, most applications use threads that all perform the same work, thus both CFS and ULE endup scheduling all of the threads in a round-robin fashion. The average performance difference is 1.5%, in favor of ULE. Still, scimark is 36% slower on ULE than CFS, and apache is 40% faster on ULE than CFS. Scimark is a single-threaded Java application. It launches one compute thread, and the Java runtime executes other Java system threads in the background (for the garbage collector, I/O, etc.).&lt;br&gt;
When the application is executed with ULE, the compute thread can be delayed, because Java system threads are considered interactive and get priority over the computation thread. The apache workload consists of two applications: the main server (httpd) running 100 threads, and ab, a single-threaded load injector.&lt;br&gt;
The performance difference between ULE and CFS is explained by different choices regarding thread preemption. In ULE, full preemption is disabled, while CFS preempts the running thread when the thread that has just been woken up has a vruntime that is much smaller than the vruntime of the currently executing thread (1ms difference in practice). In CFS, ab is preempted 2 million times during the benchmark, while it never preempted with ULE.&lt;br&gt;
This behavior is explained as follows: ab starts by sending 100 requests to the httpd server, and then waits for the server to answer. When ab is woken up, it checks which requests have been processed and sends new requests to the server. Since ab is single-threaded, all requests sent to the server are sent sequentially. In ULE, ab is able to send as many new requests as it has received responses. In CFS, every request sent by ab wakes up a httpd thread, which preempts ab.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Scheduling threads on a multicore machine is hard. In this paper, we perform a fair comparison of the design choices of two widely used schedulers: the ULE scheduler from FreeBSD and CFS from Linux. We show that they behave differently even on simple workloads, and that no scheduler performs better than the other on all workloads.&lt;/p&gt;

&lt;h3&gt;OpenBSD 6.3 on Tuxedo InfinityBook&lt;/h3&gt;

&lt;p&gt;Disclaimer:&lt;br&gt;
I came across the Tuxedo Computers InfinityBook last year at the Open! Conference where Tuxedo had a small booth. Previously they came to my attention since they’re a member of the OSB Alliance on whose board I’m a member. Furthermore Tuxedo Computers are a sponsor of the OSBAR which I’m part of the organizational team.&lt;/p&gt;

&lt;p&gt;OpenBSD on the Tuxedo InfinityBook&lt;br&gt;
I’ve asked the guys over at Tuxedo Computers whether they would be interested to have some tests with *BSD done and that I could test drive one of their machines and give feedback on what works and what does not - and possibly look into it.+&lt;/p&gt;

&lt;p&gt;Within a few weeks they shipped me a machine and last week the InfinityBook Pro 14” arrived. Awesome. Thanks already to the folks at Tuxedo Computers. The machine arrived accompanied by lot’s of swag :)&lt;/p&gt;

&lt;p&gt;The InfinityBook is a very nice machine and allows a wide range of configuration. The configuration that was shipped to me:&lt;/p&gt;

&lt;p&gt;Intel Core i7-8550U&lt;br&gt;
1x 16GB RAM 2400Mhz Crucial Ballistix Sport LT&lt;br&gt;
250 GB Samsung 860 EVO (M.2 SATAIII)&lt;/p&gt;

&lt;p&gt;I used a USB-stick to boot install63.fs and re-installed the machine with OpenBSD. Full dmesg.&lt;/p&gt;

&lt;p&gt;The installation went flawlessly, the needed intel firmware is being installed after installation automatically via fw_update(1).&lt;/p&gt;

&lt;p&gt;Out of the box the graphics works and once installed the machine presents the login.&lt;/p&gt;

&lt;p&gt;Video&lt;br&gt;
When X starts the display is turned off for some reason. You will need to hit fn+f12 (the key with the moon on it) then the display will go on. Aside from that little nit, X works just fine and presents one the expected resolution.&lt;/p&gt;

&lt;p&gt;External video is working just fine as well. Either via hdmi output or via the mini displayport connector.&lt;/p&gt;

&lt;p&gt;The buttons for adjusting brightness (fn+f8 and fn+f9) are not working. Instead one has to use wsconsctl(8) to adjust the brightness.&lt;/p&gt;

&lt;p&gt;Networking&lt;br&gt;
The infinityBook has built-in ethernet, driven by re(4) And for the wireless interface the iwm(4) driver is being used. Both work as expected.&lt;/p&gt;

&lt;p&gt;ACPI&lt;br&gt;
Neither suspend nor hibernate work. Reporting of battery status is bogus as well. Some of the keyboard function keys work:&lt;/p&gt;

&lt;p&gt;LCD on/off works (fn+f2)&lt;br&gt;
Keyboard backlight dimming works (fn+f4)&lt;br&gt;
Volume (fn+f5 / fn+f6) works&lt;/p&gt;

&lt;p&gt;Sound&lt;br&gt;
The azalia chipset is being used for audio processing. Works as expected, volume can be controlled via buttons (fn+f5, fn+f6) or via mixerctl.&lt;/p&gt;

&lt;p&gt;Touchpad&lt;br&gt;
Can be controlled via wsconsctl(8).&lt;br&gt;
So far I must say, that the InfinityBook makes a nice machine - and I’m enjoying working with it.&lt;/p&gt;

&lt;p&gt;iXsystems&lt;br&gt;
iXsystems - Its all NAS&lt;/p&gt;

&lt;h3&gt;How ZFS makes things like ‘zfs diff’ report filenames efficiently&lt;/h3&gt;

&lt;p&gt;As a copy on write (file)system, ZFS can use the transaction group (txg) numbers that are embedded in ZFS block pointers to efficiently find the differences between two txgs; this is used in, for example, ZFS bookmarks. However, as I noted at the end of my entry on block pointers, this doesn’t give us a filesystem level difference; instead, it essentially gives us a list of inodes (okay, dnodes) that changed.&lt;br&gt;
In theory, turning an inode or dnode number into the path to a file is an expensive operation; you basically have to search the entire filesystem until you find it. In practice, if you’ve ever run ‘zfs diff’, you’ve likely noticed that it runs pretty fast. Nor is this the only place that ZFS quickly turns dnode numbers into full paths, as it comes up in ‘zpool status’ reports about permanent errors. At one level, zfs diff and zpool status do this so rapidly because they ask the ZFS code in the kernel to do it for them. At another level, the question is how the kernel’s ZFS code can be so fast.&lt;br&gt;
The interesting and surprising answer is that ZFS cheats, in a way that makes things very fast when it works and almost always works in normal filesystems and with normal usage patterns. The cheat is that ZFS dnodes record their parent’s object number.&lt;br&gt;
If you’re familiar with the twists and turns of Unix filesystems, you’re now wondering how ZFS deals with hardlinks, which can cause a file to be in several directories at once and so have several parents (and then it can be removed from some of the directories). The answer is that ZFS doesn’t; a dnode only ever tracks a single parent, and ZFS accepts that this parent information can be inaccurate. I’ll quote the comment in zfs_obj_to_pobj:&lt;br&gt;
When a link is removed [the file’s] parent pointer is not changed and will be invalid. There are two cases where a link is removed but the file stays around, when it goes to the delete queue and when there are additional links.&lt;br&gt;
Before I get into the details, I want to say that I appreciate the brute force elegance of this cheat. The practical reality is that most Unix files today don’t have extra hardlinks, and when they do most hardlinks are done in ways that won’t break ZFS’s parent stuff. The result is that ZFS has picked an efficient implementation that works almost all of the time; in my opinion, the great benefit we get from having it around are more than worth the infrequent cases where it fails or malfunctions. Both zfs diff and having filenames show up in zpool status permanent error reports are very useful (and there may be other cases where this gets used).&lt;br&gt;
The current details are that any time you hardlink a file to somewhere or rename it, ZFS updates the file’s parent to point to the new directory. Often this will wind up with a correct parent even after all of the dust settles; for example, a common pattern is to write a file to an initial location, hardlink it to its final destination, and then remove the initial location version. In this case, the parent will be correct and you’ll get the right name.&lt;/p&gt;

&lt;h2&gt;News Roundup&lt;/h2&gt;

&lt;h3&gt;What is FreeBSD? Why Should You Choose It Over Linux?&lt;/h3&gt;

&lt;p&gt;Not too long ago I wondered if and in what situations FreeBSD could be faster than Linux and we received a good amount of informative feedback. So far, Linux rules the desktop space and FreeBSD rules the server space.&lt;/p&gt;

&lt;p&gt;In the meantime, though, what exactly is FreeBSD? And at what times should you choose it over a GNU/Linux installation? Let’s tackle these questions.&lt;/p&gt;

&lt;p&gt;FreeBSD is a free and open source derivative of BSD (Berkeley Software Distribution) with a focus on speed, stability, security, and consistency, among other features. It has been developed and maintained by a large community ever since its initial release many years ago on November 1, 1993.&lt;/p&gt;

&lt;p&gt;BSD is the version of UNIX® that was developed at the University of California in Berkeley. And being a free and open source version, “Free” being a prefix to BSD is a no-brainer.&lt;/p&gt;

&lt;p&gt;What’s FreeBSD Good For?&lt;/p&gt;

&lt;p&gt;FreeBSD offers a plethora of advanced features and even boasts some not available in some commercial Operating Systems. It makes an excellent Internet and Intranet server thanks to its robust network services that allow it to maximize memory and work with heavy loads to deliver and maintain good response times for thousands of simultaneous user processes.&lt;/p&gt;

&lt;p&gt;FreeBSD runs a huge number of applications with ease. At the moment, it has over 32,000 ported applications and libraries with support for desktop, server, and embedded environments. with that being said, let me also add that FreeBSD is excellent for working with advanced embedded platforms. Mail and web appliances, timer servers, routers, MIPS hardware platforms, etc. You name it!&lt;/p&gt;

&lt;p&gt;FreeBSD is available to install in several ways and there are directions to follow for any method you want to use; be it via CD-ROM, over a network using NFS or FTP, or DVD.&lt;/p&gt;

&lt;p&gt;FreeBSD is easy to contribute to and all you have to do is to locate the section of the FreeBSD code base to modify and carefully do a neat job. Potential contributors are also free to improve on its artwork and documentation, among other project aspects.&lt;/p&gt;

&lt;p&gt;FreeBSD is backed by the FreeBSD Foundation, a non-profit organization that you can contribute to financially and all direct contributions are tax deductible.&lt;/p&gt;

&lt;p&gt;FreeBSD’s license allows users to incorporate the use of proprietary software which is ideal for companies interested in generating revenues. Netflix, for example, could cite this as one of the reasons for using FreeBSD servers.&lt;/p&gt;

&lt;p&gt;Why Should You Choose It over Linux?&lt;/p&gt;

&lt;p&gt;From what I’ve gathered about both FreeBSD and Linux, FreeBSD has a better performance on servers than Linux does. Yes, its packaged applications are configured to offer better a performance than Linux and it is usually running fewer services by default, there really isn’t a way to certify which is faster because the answer is dependent on the running hardware and applications and how the system is tuned.&lt;/p&gt;

&lt;p&gt;FreeBSD is reportedly more secure than Linux because of the way the whole project is developed and maintained.&lt;/p&gt;

&lt;p&gt;Unlike with Linux, the FreeBSD project is controlled by a large community of developers around the world who fall into any of these categories; core team, contributors, and committers.&lt;/p&gt;

&lt;p&gt;FreeBSD is much easier to learn and use because there aren’t a thousand and one distros to choose from with different package managers, DEs, etc.&lt;/p&gt;

&lt;p&gt;FreeBSD is more convenient to contribute to because it is the entire OS that is preserved and not just the kernel and a repo as is the case with Linux. You can easily access all of its versions since they are sorted by release numbers.&lt;/p&gt;

&lt;p&gt;Apart from the many documentations and guides that you can find online, FreeBSD has a single official documentation wherein you can find the solution to virtually any issue you will come across. So, you’re sure to find it resourceful.&lt;/p&gt;

&lt;p&gt;FreeBSD has close to no software issues compared to Linux because it has Java, is capable of running Windows programs using Wine, and can run .NET programs using Mono.&lt;/p&gt;

&lt;p&gt;FreeBSD’s ports/packages system allows you to compile software with specific configurations, thereby avoiding conflicting dependency and version issues.&lt;/p&gt;

&lt;p&gt;Both the FreeBSD and GNU/Linux project are always receiving updates. The platform you decide to go with is largely dependent on what you want to use it for, your technical know-how, willingness to learn new stuff, and ultimately your preference.&lt;br&gt;
What is your take on the topic? For what reasons would you choose FreeBSD over Linux if you would? Let us know what you think about both platforms in the comments section below.&lt;/p&gt;

&lt;h3&gt;PS4 5.05 BPF Double Free Kernel Exploit Writeup&lt;/h3&gt;

&lt;p&gt;Introduction&lt;br&gt;
Welcome to the 5.0x kernel exploit write-up. A few months ago, a kernel vulnerability was discovered by qwertyoruiopz and an exploit was released for BPF which involved crafting an out-of-bounds (OOB) write via use-after-free (UAF) due to the lack of proper locking. It was a fun bug, and a very trivial exploit. Sony then removed the write functionality from BPF, so that exploit was patched. However, the core issue still remained (being the lack of locking). A very similar race condition still exists in BPF past 4.55, which we will go into detail below on. The full source of the exploit can be found here.&lt;br&gt;
This bug is no longer accessible however past 5.05 firmware, because the BPF driver has finally been blocked from unprivileged processes - WebKit can no longer open it. Sony also introduced a new security mitigation in 5.0x firmwares to prevent the stack pointer from pointing into user space, however we’ll go more in detail on this a bit further down.&lt;/p&gt;

&lt;p&gt;Assumptions&lt;br&gt;
Some assumptions are made of the reader’s knowledge for the writeup. The avid reader should have a basic understanding of how memory allocators work - more specifically, how malloc() and free() allocate and deallocate memory respectively. They should also be aware that devices can be issued commands concurrently, as in, one command could be received while another one is being processed via threading. An understanding of C, x86, and exploitation basics is also very helpful, though not necessarily required.&lt;/p&gt;

&lt;p&gt;Background&lt;br&gt;
This section contains some helpful information to those newer to exploitation, or are unfamiliar with device drivers, or various exploit techniques such as heap spraying and race conditions. Feel free to skip to the “A Tale of Two Free()'s” section if you’re already familiar with this material.&lt;/p&gt;

&lt;p&gt;What Are Drivers?&lt;br&gt;
There are a few ways that applications can directly communicate with the operating system. One of which is system calls, which there are over 600 of in the PS4 kernel, ~500 of which are FreeBSD - the rest are Sony-implemented. Another method is through something called “Device Drivers”. Drivers are typically used to bridge the gap between software and hardware devices (usb drives, keyboard/mouse, webcams, etc) - though they can also be used just for software purposes.&lt;br&gt;
There are a few operations that a userland application can perform on a driver (if it has sufficient permissions) to interface with it after opening it. In some instances, one can read from it, write to it, or in some cases, issue more complex commands to it via the ioctl() system call. The handlers for these commands are implemented in kernel space - this is important, because any bugs that could be exploited in an ioctl handler can be used as a privilege escalation straight to ring0 - typically the most privileged state.&lt;br&gt;
Drivers are often the more weaker points of an operating system for attackers, because sometimes these drivers are written by developers who don’t understand how the kernel works, or the drivers are older and thus not wise to newer attack methods.&lt;/p&gt;

&lt;p&gt;The BPF Device Driver&lt;br&gt;
If we take a look around inside of WebKit’s sandbox, we’ll find a /dev directory. While this may seem like the root device driver path, it’s a lie. Many of the drivers that the PS4 has are not exposed to this directory, but rather only ones that are needed for WebKit’s operation (for the most part). For some reason though, BPF (aka. the “Berkely Packet Filter”) device is not only exposed to WebKit’s sandbox - it also has the privileges to open the device as R/W. This is very odd, because on most systems this driver is root-only (and for good reason). If you want to read more into this, refer to my previous write-up with 4.55FW.&lt;/p&gt;

&lt;p&gt;What Are Packet Filters?&lt;br&gt;
Below is an excerpt from the 4.55 bpfwrite writeup.&lt;br&gt;
Since the bug is directly in the filter system, it is important to know the basics of what packet filters are. Filters are essentially sets of pseudo-instructions that are parsed by bpf_filter() (which are ran when packets are received). While the pseudo-instruction set is fairly minimal, it allows you to do things like perform basic arithmetic operations and copy values around inside it’s buffer. Breaking down the BPF VM in it’s entirety is far beyond the scope of this write-up, just know that the code produced by it is ran in kernel mode - this is why read/write access to /dev/bpf should be privileged.&lt;/p&gt;

&lt;p&gt;Race Conditions&lt;br&gt;
Race conditions occur when two processes/threads try to access a shared resource at the same time without mutual exclusion. The problem was ultimately solved by introducing concepts such as the “mutex” or “lock”. The idea is when one thread/process tries to access a resource, it will first acquire a lock, access it, then unlock it once it’s finished. If another thread/process tries to access it while the other has the lock, it will wait until the other thread is finished. This works fairly well - when it’s used properly.&lt;br&gt;
Locking is hard to get right, especially when you try to implement fine-grained locking for performance. One single instruction or line of code outside the locking window could introduce a race condition. Not all race conditions are exploitable, but some are (such as this one) - and they can give an attacker very powerful bugs to work with.&lt;/p&gt;

&lt;p&gt;Heap Spraying&lt;br&gt;
The process of heap spraying is fairly simple - allocate a bunch of memory and fill it with controlled data in a loop and pray your allocation doesn’t get stolen from underneath you. It’s a very useful technique when exploiting something such as a use-after-free(), as you can use it to get controlled data into your target object’s backing memory.&lt;br&gt;
By extension, it’s useful to do this for a double free() as well, because once we have a stale reference, we can use a heap spray to control the data. Since the object will be marked “free” - the allocator will eventually provide us with control over this memory, even though something else is still using it. That is, unless, something else has already stolen the pointer from you and corrupts it - then you’ll likely get a system crash, and that’s no fun. This is one factor that adds to the variance of exploits, and typically, the smaller the object, the more likely this is to happen.&lt;/p&gt;

&lt;p&gt;Follow the link to read more of the article&lt;br&gt;
DigitalOcean&lt;br&gt;
&lt;a href="http://do.co/bsdnow" target="_blank" rel="nofollow noopener"&gt;http://do.co/bsdnow&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;OpenBSD gains Wi-Fi “auto-join”&lt;/h3&gt;

&lt;p&gt;In a change which is bound to be welcomed widely, -current has gained “auto-join” for Wi-Fi networks. Peter Hessler (phessler@) has been working on this for quite some time and he wrote about it in his p2k18 hackathon report. He has committed the work from the g2k18 hackathon in Ljubljana:&lt;/p&gt;

&lt;p&gt;CVSROOT:    /cvs&lt;br&gt;
Module name:    src&lt;br&gt;
Changes by: &lt;a href="mailto:phessler@cvs.openbsd.org" target="_blank" rel="nofollow noopener"&gt;phessler@cvs.openbsd.org&lt;/a&gt;    2018/07/11 14:18:09&lt;/p&gt;

&lt;p&gt;Modified files:&lt;br&gt;
    sbin/ifconfig  : ifconfig.8 ifconfig.c &lt;br&gt;
    sys/net80211   : ieee80211_ioctl.c ieee80211_ioctl.h &lt;br&gt;
                     ieee80211_node.c ieee80211_node.h &lt;br&gt;
                     ieee80211_var.h &lt;/p&gt;

&lt;p&gt;Log message:&lt;br&gt;
Introduce 'auto-join' to the wifi 802.11 stack.&lt;/p&gt;

&lt;p&gt;This allows a system to remember which ESSIDs it wants to connect to, any&lt;br&gt;
relevant security configuration, and switch to it when the network we are&lt;br&gt;
currently connected to is no longer available.&lt;br&gt;
Works when connecting and switching between WPA2/WPA1/WEP/clear encryptions.&lt;/p&gt;

&lt;p&gt;example hostname.if:&lt;br&gt;
join home wpakey password&lt;br&gt;
join work wpakey mekmitasdigoat&lt;br&gt;
join open-lounge&lt;br&gt;
join cafe wpakey cafe2018&lt;br&gt;
join "wepnetwork" nwkey "12345"&lt;br&gt;
dhcp&lt;br&gt;
inet6 autoconf&lt;br&gt;
up&lt;/p&gt;

&lt;p&gt;OK stsp@ reyk@&lt;br&gt;
and enthusiasm from every hackroom I've been in for the last 3 years&lt;br&gt;
The usage should be clear from the commit message, but basically you ‘join’ all the networks you want to auto-join as you would previously use ‘nwid’ to connect to one specific network. Then the kernel will join the network that’s actually in range and do the rest automagically for you. When you move out of range of that network you lose connectivity until you come in range of the original (where things will continue to work as you’ve been used to) or one of the other networks (where you will associate and then get a new lease).&lt;/p&gt;

&lt;p&gt;Thanks to Peter for working on this feature - something many a Wi-Fi using OpenBSD user will be able to benefit from.&lt;/p&gt;

&lt;h3&gt;FreeBSD Jails the hard way&lt;/h3&gt;

&lt;p&gt;There are many great options for managing FreeBSD Jails. iocage, warden and ez-jail aim to streamline the process and make it quick an easy to get going. But sometimes the tools built right into the OS are overlooked.&lt;/p&gt;

&lt;p&gt;This post goes over what is involved in creating and managing jails using only the tools built into FreeBSD.&lt;/p&gt;

&lt;p&gt;For this guide, I’m going to be putting my jails in /usr/local/jails.&lt;/p&gt;

&lt;p&gt;I’ll start with a very simple, isolated jail. Then I’ll go over how to use ZFS snapshots, and lastly nullfs mounts to share the FreeBSD base files with multiple jails.&lt;/p&gt;

&lt;p&gt;I’ll also show some examples of how to use the templating power of jail.conf to apply similar settings to all your jails.&lt;/p&gt;

&lt;p&gt;Full Jail&lt;br&gt;
Make a directory for the jail, or a zfs dataset if you prefer.&lt;br&gt;
Download the FreeBSD base files, and any other parts of FreeBSD you want. In this example I’ll include the 32 bit libraries as well.&lt;br&gt;
Update your FreeBSD base install.&lt;br&gt;
Verify your download. We’re downloading these archives over FTP after all, we should confirm that this download is valid and not tampered with. The freebsd-update IDS command verifies the installation using a PGP key which is in your base system, which was presumably installed with an ISO that you verified using the FreeBSD signed checksums. Admittedly this step is a bit of paranoia, but I think it’s prudent.&lt;br&gt;
Make sure you jail has the right timezone and dns servers and a hostname in rc.conf.&lt;br&gt;
Edit jail.conf with the details about your jail.&lt;br&gt;
Start and login to your jail.&lt;br&gt;
11 commands and a config file, but this is the most tedious way to make a jail. With a little bit of templating it can be even easier. So I’ll start by making a template. Making a template is basically the same as steps 1, 2 and 3 above, but with a different destination folder, I’ll condense them here.&lt;/p&gt;

&lt;p&gt;Creating a template&lt;br&gt;
Create a template or a ZFS dataset. If you’d like to use the zfs clone method of deploying templates, you’ll need to create a zfs dataset instead of a folder.&lt;br&gt;
Update your template with freebsd-update.&lt;br&gt;
Verify your install&lt;br&gt;
And that’s it, now you have a fully up to date jail template. If you’ve made this template with zfs, you can easily deploy it using zfs snapshots.&lt;/p&gt;

&lt;p&gt;Deploying a template with ZFS snapshots&lt;br&gt;
Create a snapshot. My last freebsd-update to my template brought it to patch level 17, so I’ll call my snapshot p10.&lt;br&gt;
Clone the snapshot to a new jail.&lt;br&gt;
Configure the jail hostname.&lt;br&gt;
Add the jail definition to jail.conf, make sure you have the global jail settings from jail.conf listed in the fulljail example.&lt;br&gt;
Start the jail.&lt;br&gt;
The downside with the zfs approach is that each jail is now a fully independent, and if you need to update your jails, you have to update them all individually. By sharing a template using nullfs mounts you can have only one copy of the base system that only needs to be updated once.&lt;/p&gt;

&lt;p&gt;Follow the link to see the rest of the article about&lt;br&gt;
Thin jails using NullFS mounts&lt;br&gt;
Simplifying jail.conf&lt;br&gt;
Hopefully this has helped you understand the process of how to create and manage FreeBSD jails without tools that abstract away all the details. Those tools are often quite useful, but there is always benefit in learning to do things the hard way. And in this case, the hard way doesn’t seem to be that hard after all.&lt;/p&gt;

&lt;h2&gt;Beastie Bits&lt;/h2&gt;

&lt;p&gt;Meetup in Zurich #4, July edition (July 19) – Which you likely missed, but now you know to look for the August edition!&lt;br&gt;
The next two BSD-PL User group meetings in Warsaw have been scheduled for July 30th and Aug 9th @ 1830 CEST – Submit your topic proposals now&lt;br&gt;
Linux Geek Books - Humble Bundle&lt;br&gt;
Extend loader(8) geli support to all architectures and all disk-like devices&lt;br&gt;
Upgrading from a bootpool to a single encrypted pool – skip the gptzfsboot part, and manually update your EFI partition with loader.efi&lt;br&gt;
The pkgsrc 2018Q2 for Illumos is available with 18500+ binary packages&lt;br&gt;
NetBSD ARM64 Images Available with SMP for RPi3 / NanoPi / Pine64 Boards&lt;br&gt;
Recently released CDE 2.3.0 running on Tribblix (Illumos)&lt;br&gt;
An Interview With Tech &amp;amp; Science Fiction Author Michael W Lucas&lt;br&gt;
A reminder : MeetBSD CFP&lt;br&gt;
EuroBSDCon talk acceptances have gone out, and once the tutorials are confirmed, registration will open. That will likely have happened by time you see this episode, so go register! See you in Romania&lt;br&gt;
Tarsnap&lt;/p&gt;

&lt;h2&gt;Feedback/Questions&lt;/h2&gt;

&lt;p&gt;Wilyarti - Adblocked on FreeBSD Continued…&lt;br&gt;
Andrew - A Question and a Story&lt;br&gt;
Matthew - Thanks&lt;br&gt;
Brian - PCI-E Controller&lt;br&gt;
Send questions, comments, show ideas/topics, or stories you want mentioned on the show to &lt;a href="mailto:feedback@bsdnow.tv" target="_blank" rel="nofollow noopener"&gt;feedback@bsdnow.tv&lt;/a&gt; &lt;/p&gt;
</description>
  <itunes:keywords>freebsd, openbsd, netbsd, dragonflybsd, trueos, trident, hardenedbsd, tutorial, howto, guide, bsd, interview, ule, cfs, tuxedo, infinitybook, ps4, jails</itunes:keywords>
  <content:encoded>
    <![CDATA[<p>FreeBSD ULE vs. Linux CFS, OpenBSD on Tuxedo InfinityBook, how zfs diff reports filenames efficiently, why choose FreeBSD over Linux, PS4 double free exploit, OpenBSD’s wifi autojoin, and FreeBSD jails the hard way.</p>

<h2>Win</h2>

<p>Celebrate our 256th episode with us. You can win a Mogics Power Bagel (not sponsored).</p>

<p>To enter, go find the 4 episodes we did in December of 2017. In the opening, find the 4 letters in the bookshelf behind me. They spell different words in each of the 4 episodes. Send us these words in order to <a href="mailto:feedback@bsdnow.tv" rel="nofollow">feedback@bsdnow.tv</a> with the subject “bsdnow256” until August 8th, 2018 18:00 UTC and we’ll randomly draw the winner on the live show. We’ll then contact you to ship the item.<br>
Only one item to win. All decisions are final. Better luck next time.</p>

<h2>Headlines</h2>

<h3>Battle of the Schedulers: FreeBSD ULE vs. Linux CFS</h3>

<p>Introduction<br>
This paper analyzes the impact on application performance of the design and implementation choices made in two widely used open-source schedulers: ULE, the default FreeBSD scheduler, and CFS, the default Linux scheduler. We compare ULE and CFS in otherwise identical circumstances. We have ported ULE to Linux, and use it to schedule all threads that are normally scheduled by CFS. We compare the performance of a large suite of applications on the modified kernel running ULE and on the standard Linux kernel running CFS. The observed performance differences are solely the result of scheduling decisions, and do not reflect differences in other subsystems between FreeBSD and Linux. There is no overall winner. On many workloads the two schedulers perform similarly, but for some workloads there are significant and even surprising differences. ULE may cause starvation, even when executing a single application with identical threads, but this starvation may actually lead to better application performance for some workloads. The more complex load balancing mechanism of CFS reacts more quickly to workload changes, but ULE achieves better load balance in the long run.<br>
Operating system kernel schedulers are responsible for maintaining high utilization of hardware resources (CPU cores, memory, I/O devices) while providing fast response time to latency-sensitive applications. They have to react to workload changes, and handle large numbers of cores and threads with minimal overhead [12]. This paper provides a comparison between the default schedulers of two of the most widely deployed open-source operating systems: the Completely Fair Scheduler (CFS) used in Linux, and the ULE scheduler used in FreeBSD. Our goal is not to declare an overall winner.<br>
In fact, we find that for some workloads ULE is better and for others CFS is better. Instead, our goal is to illustrate how differences in the design and the implementation of the two schedulers are reflected in application performance under different workloads. ULE and CFS are both designed to schedule large numbers of threads on large multicore machines. Scalability considerations have led both schedulers to adopt per-core run-queues. On a context switch, a core accesses only its local run-queue to find the next thread to run. Periodically and at select times, e.g., when a thread wakes up, both ULE and CFS perform load balancing, i.e., they try to balance the amount of work waiting in the run-queues of different cores.<br>
ULE and CFS, however, differ greatly in their design and implementation choices. FreeBSD ULE is a simple scheduler (2,950 lines of code in FreeBSD 11.1), while Linux CFS is much more complex (17,900 lines of code in the latest LTS Linux kernel, Linux 4.9). FreeBSD run-queues are FIFO. For load balancing, FreeBSD strives to even out the number of threads per core. In Linux, a core decides which thread to run next based on prior execution time, priority, and perceived cache behavior of the threads in its runqueue. Instead of evening out the number of threads between cores, Linux strives to even out the average amount of pending work.</p>

<p>Performance analysis<br>
We now analyze the impact of the per-core scheduling on the performance of 37 applications. We define “performance” as follows: for database workloads and NAS applications, we compare the number of operations per second, and for the other applications we compare “execution time”. The higher the “performance”, the better a scheduler performs. Figure 5 presents the performance difference between CFS and ULE on a single core, with percentages above 0 meaning that the application executes faster with ULE than CFS.<br>
Overall, the scheduler has little influence on most workloads. Indeed, most applications use threads that all perform the same work, thus both CFS and ULE endup scheduling all of the threads in a round-robin fashion. The average performance difference is 1.5%, in favor of ULE. Still, scimark is 36% slower on ULE than CFS, and apache is 40% faster on ULE than CFS. Scimark is a single-threaded Java application. It launches one compute thread, and the Java runtime executes other Java system threads in the background (for the garbage collector, I/O, etc.).<br>
When the application is executed with ULE, the compute thread can be delayed, because Java system threads are considered interactive and get priority over the computation thread. The apache workload consists of two applications: the main server (httpd) running 100 threads, and ab, a single-threaded load injector.<br>
The performance difference between ULE and CFS is explained by different choices regarding thread preemption. In ULE, full preemption is disabled, while CFS preempts the running thread when the thread that has just been woken up has a vruntime that is much smaller than the vruntime of the currently executing thread (1ms difference in practice). In CFS, ab is preempted 2 million times during the benchmark, while it never preempted with ULE.<br>
This behavior is explained as follows: ab starts by sending 100 requests to the httpd server, and then waits for the server to answer. When ab is woken up, it checks which requests have been processed and sends new requests to the server. Since ab is single-threaded, all requests sent to the server are sent sequentially. In ULE, ab is able to send as many new requests as it has received responses. In CFS, every request sent by ab wakes up a httpd thread, which preempts ab.</p>

<p>Conclusion<br>
Scheduling threads on a multicore machine is hard. In this paper, we perform a fair comparison of the design choices of two widely used schedulers: the ULE scheduler from FreeBSD and CFS from Linux. We show that they behave differently even on simple workloads, and that no scheduler performs better than the other on all workloads.</p>

<h3>OpenBSD 6.3 on Tuxedo InfinityBook</h3>

<p>Disclaimer:<br>
I came across the Tuxedo Computers InfinityBook last year at the Open! Conference where Tuxedo had a small booth. Previously they came to my attention since they’re a member of the OSB Alliance on whose board I’m a member. Furthermore Tuxedo Computers are a sponsor of the OSBAR which I’m part of the organizational team.</p>

<p>OpenBSD on the Tuxedo InfinityBook<br>
I’ve asked the guys over at Tuxedo Computers whether they would be interested to have some tests with *BSD done and that I could test drive one of their machines and give feedback on what works and what does not - and possibly look into it.+</p>

<p>Within a few weeks they shipped me a machine and last week the InfinityBook Pro 14” arrived. Awesome. Thanks already to the folks at Tuxedo Computers. The machine arrived accompanied by lot’s of swag :)</p>

<p>The InfinityBook is a very nice machine and allows a wide range of configuration. The configuration that was shipped to me:</p>

<p>Intel Core i7-8550U<br>
1x 16GB RAM 2400Mhz Crucial Ballistix Sport LT<br>
250 GB Samsung 860 EVO (M.2 SATAIII)</p>

<p>I used a USB-stick to boot install63.fs and re-installed the machine with OpenBSD. Full dmesg.</p>

<p>The installation went flawlessly, the needed intel firmware is being installed after installation automatically via fw_update(1).</p>

<p>Out of the box the graphics works and once installed the machine presents the login.</p>

<p>Video<br>
When X starts the display is turned off for some reason. You will need to hit fn+f12 (the key with the moon on it) then the display will go on. Aside from that little nit, X works just fine and presents one the expected resolution.</p>

<p>External video is working just fine as well. Either via hdmi output or via the mini displayport connector.</p>

<p>The buttons for adjusting brightness (fn+f8 and fn+f9) are not working. Instead one has to use wsconsctl(8) to adjust the brightness.</p>

<p>Networking<br>
The infinityBook has built-in ethernet, driven by re(4) And for the wireless interface the iwm(4) driver is being used. Both work as expected.</p>

<p>ACPI<br>
Neither suspend nor hibernate work. Reporting of battery status is bogus as well. Some of the keyboard function keys work:</p>

<p>LCD on/off works (fn+f2)<br>
Keyboard backlight dimming works (fn+f4)<br>
Volume (fn+f5 / fn+f6) works</p>

<p>Sound<br>
The azalia chipset is being used for audio processing. Works as expected, volume can be controlled via buttons (fn+f5, fn+f6) or via mixerctl.</p>

<p>Touchpad<br>
Can be controlled via wsconsctl(8).<br>
So far I must say, that the InfinityBook makes a nice machine - and I’m enjoying working with it.</p>

<p>iXsystems<br>
iXsystems - Its all NAS</p>

<h3>How ZFS makes things like ‘zfs diff’ report filenames efficiently</h3>

<p>As a copy on write (file)system, ZFS can use the transaction group (txg) numbers that are embedded in ZFS block pointers to efficiently find the differences between two txgs; this is used in, for example, ZFS bookmarks. However, as I noted at the end of my entry on block pointers, this doesn’t give us a filesystem level difference; instead, it essentially gives us a list of inodes (okay, dnodes) that changed.<br>
In theory, turning an inode or dnode number into the path to a file is an expensive operation; you basically have to search the entire filesystem until you find it. In practice, if you’ve ever run ‘zfs diff’, you’ve likely noticed that it runs pretty fast. Nor is this the only place that ZFS quickly turns dnode numbers into full paths, as it comes up in ‘zpool status’ reports about permanent errors. At one level, zfs diff and zpool status do this so rapidly because they ask the ZFS code in the kernel to do it for them. At another level, the question is how the kernel’s ZFS code can be so fast.<br>
The interesting and surprising answer is that ZFS cheats, in a way that makes things very fast when it works and almost always works in normal filesystems and with normal usage patterns. The cheat is that ZFS dnodes record their parent’s object number.<br>
If you’re familiar with the twists and turns of Unix filesystems, you’re now wondering how ZFS deals with hardlinks, which can cause a file to be in several directories at once and so have several parents (and then it can be removed from some of the directories). The answer is that ZFS doesn’t; a dnode only ever tracks a single parent, and ZFS accepts that this parent information can be inaccurate. I’ll quote the comment in zfs_obj_to_pobj:<br>
When a link is removed [the file’s] parent pointer is not changed and will be invalid. There are two cases where a link is removed but the file stays around, when it goes to the delete queue and when there are additional links.<br>
Before I get into the details, I want to say that I appreciate the brute force elegance of this cheat. The practical reality is that most Unix files today don’t have extra hardlinks, and when they do most hardlinks are done in ways that won’t break ZFS’s parent stuff. The result is that ZFS has picked an efficient implementation that works almost all of the time; in my opinion, the great benefit we get from having it around are more than worth the infrequent cases where it fails or malfunctions. Both zfs diff and having filenames show up in zpool status permanent error reports are very useful (and there may be other cases where this gets used).<br>
The current details are that any time you hardlink a file to somewhere or rename it, ZFS updates the file’s parent to point to the new directory. Often this will wind up with a correct parent even after all of the dust settles; for example, a common pattern is to write a file to an initial location, hardlink it to its final destination, and then remove the initial location version. In this case, the parent will be correct and you’ll get the right name.</p>

<h2>News Roundup</h2>

<h3>What is FreeBSD? Why Should You Choose It Over Linux?</h3>

<p>Not too long ago I wondered if and in what situations FreeBSD could be faster than Linux and we received a good amount of informative feedback. So far, Linux rules the desktop space and FreeBSD rules the server space.</p>

<p>In the meantime, though, what exactly is FreeBSD? And at what times should you choose it over a GNU/Linux installation? Let’s tackle these questions.</p>

<p>FreeBSD is a free and open source derivative of BSD (Berkeley Software Distribution) with a focus on speed, stability, security, and consistency, among other features. It has been developed and maintained by a large community ever since its initial release many years ago on November 1, 1993.</p>

<p>BSD is the version of UNIX® that was developed at the University of California in Berkeley. And being a free and open source version, “Free” being a prefix to BSD is a no-brainer.</p>

<p>What’s FreeBSD Good For?</p>

<p>FreeBSD offers a plethora of advanced features and even boasts some not available in some commercial Operating Systems. It makes an excellent Internet and Intranet server thanks to its robust network services that allow it to maximize memory and work with heavy loads to deliver and maintain good response times for thousands of simultaneous user processes.</p>

<p>FreeBSD runs a huge number of applications with ease. At the moment, it has over 32,000 ported applications and libraries with support for desktop, server, and embedded environments. with that being said, let me also add that FreeBSD is excellent for working with advanced embedded platforms. Mail and web appliances, timer servers, routers, MIPS hardware platforms, etc. You name it!</p>

<p>FreeBSD is available to install in several ways and there are directions to follow for any method you want to use; be it via CD-ROM, over a network using NFS or FTP, or DVD.</p>

<p>FreeBSD is easy to contribute to and all you have to do is to locate the section of the FreeBSD code base to modify and carefully do a neat job. Potential contributors are also free to improve on its artwork and documentation, among other project aspects.</p>

<p>FreeBSD is backed by the FreeBSD Foundation, a non-profit organization that you can contribute to financially and all direct contributions are tax deductible.</p>

<p>FreeBSD’s license allows users to incorporate the use of proprietary software which is ideal for companies interested in generating revenues. Netflix, for example, could cite this as one of the reasons for using FreeBSD servers.</p>

<p>Why Should You Choose It over Linux?</p>

<p>From what I’ve gathered about both FreeBSD and Linux, FreeBSD has a better performance on servers than Linux does. Yes, its packaged applications are configured to offer better a performance than Linux and it is usually running fewer services by default, there really isn’t a way to certify which is faster because the answer is dependent on the running hardware and applications and how the system is tuned.</p>

<p>FreeBSD is reportedly more secure than Linux because of the way the whole project is developed and maintained.</p>

<p>Unlike with Linux, the FreeBSD project is controlled by a large community of developers around the world who fall into any of these categories; core team, contributors, and committers.</p>

<p>FreeBSD is much easier to learn and use because there aren’t a thousand and one distros to choose from with different package managers, DEs, etc.</p>

<p>FreeBSD is more convenient to contribute to because it is the entire OS that is preserved and not just the kernel and a repo as is the case with Linux. You can easily access all of its versions since they are sorted by release numbers.</p>

<p>Apart from the many documentations and guides that you can find online, FreeBSD has a single official documentation wherein you can find the solution to virtually any issue you will come across. So, you’re sure to find it resourceful.</p>

<p>FreeBSD has close to no software issues compared to Linux because it has Java, is capable of running Windows programs using Wine, and can run .NET programs using Mono.</p>

<p>FreeBSD’s ports/packages system allows you to compile software with specific configurations, thereby avoiding conflicting dependency and version issues.</p>

<p>Both the FreeBSD and GNU/Linux project are always receiving updates. The platform you decide to go with is largely dependent on what you want to use it for, your technical know-how, willingness to learn new stuff, and ultimately your preference.<br>
What is your take on the topic? For what reasons would you choose FreeBSD over Linux if you would? Let us know what you think about both platforms in the comments section below.</p>

<h3>PS4 5.05 BPF Double Free Kernel Exploit Writeup</h3>

<p>Introduction<br>
Welcome to the 5.0x kernel exploit write-up. A few months ago, a kernel vulnerability was discovered by qwertyoruiopz and an exploit was released for BPF which involved crafting an out-of-bounds (OOB) write via use-after-free (UAF) due to the lack of proper locking. It was a fun bug, and a very trivial exploit. Sony then removed the write functionality from BPF, so that exploit was patched. However, the core issue still remained (being the lack of locking). A very similar race condition still exists in BPF past 4.55, which we will go into detail below on. The full source of the exploit can be found here.<br>
This bug is no longer accessible however past 5.05 firmware, because the BPF driver has finally been blocked from unprivileged processes - WebKit can no longer open it. Sony also introduced a new security mitigation in 5.0x firmwares to prevent the stack pointer from pointing into user space, however we’ll go more in detail on this a bit further down.</p>

<p>Assumptions<br>
Some assumptions are made of the reader’s knowledge for the writeup. The avid reader should have a basic understanding of how memory allocators work - more specifically, how malloc() and free() allocate and deallocate memory respectively. They should also be aware that devices can be issued commands concurrently, as in, one command could be received while another one is being processed via threading. An understanding of C, x86, and exploitation basics is also very helpful, though not necessarily required.</p>

<p>Background<br>
This section contains some helpful information to those newer to exploitation, or are unfamiliar with device drivers, or various exploit techniques such as heap spraying and race conditions. Feel free to skip to the “A Tale of Two Free()&#39;s” section if you’re already familiar with this material.</p>

<p>What Are Drivers?<br>
There are a few ways that applications can directly communicate with the operating system. One of which is system calls, which there are over 600 of in the PS4 kernel, ~500 of which are FreeBSD - the rest are Sony-implemented. Another method is through something called “Device Drivers”. Drivers are typically used to bridge the gap between software and hardware devices (usb drives, keyboard/mouse, webcams, etc) - though they can also be used just for software purposes.<br>
There are a few operations that a userland application can perform on a driver (if it has sufficient permissions) to interface with it after opening it. In some instances, one can read from it, write to it, or in some cases, issue more complex commands to it via the ioctl() system call. The handlers for these commands are implemented in kernel space - this is important, because any bugs that could be exploited in an ioctl handler can be used as a privilege escalation straight to ring0 - typically the most privileged state.<br>
Drivers are often the more weaker points of an operating system for attackers, because sometimes these drivers are written by developers who don’t understand how the kernel works, or the drivers are older and thus not wise to newer attack methods.</p>

<p>The BPF Device Driver<br>
If we take a look around inside of WebKit’s sandbox, we’ll find a /dev directory. While this may seem like the root device driver path, it’s a lie. Many of the drivers that the PS4 has are not exposed to this directory, but rather only ones that are needed for WebKit’s operation (for the most part). For some reason though, BPF (aka. the “Berkely Packet Filter”) device is not only exposed to WebKit’s sandbox - it also has the privileges to open the device as R/W. This is very odd, because on most systems this driver is root-only (and for good reason). If you want to read more into this, refer to my previous write-up with 4.55FW.</p>

<p>What Are Packet Filters?<br>
Below is an excerpt from the 4.55 bpfwrite writeup.<br>
Since the bug is directly in the filter system, it is important to know the basics of what packet filters are. Filters are essentially sets of pseudo-instructions that are parsed by bpf_filter() (which are ran when packets are received). While the pseudo-instruction set is fairly minimal, it allows you to do things like perform basic arithmetic operations and copy values around inside it’s buffer. Breaking down the BPF VM in it’s entirety is far beyond the scope of this write-up, just know that the code produced by it is ran in kernel mode - this is why read/write access to /dev/bpf should be privileged.</p>

<p>Race Conditions<br>
Race conditions occur when two processes/threads try to access a shared resource at the same time without mutual exclusion. The problem was ultimately solved by introducing concepts such as the “mutex” or “lock”. The idea is when one thread/process tries to access a resource, it will first acquire a lock, access it, then unlock it once it’s finished. If another thread/process tries to access it while the other has the lock, it will wait until the other thread is finished. This works fairly well - when it’s used properly.<br>
Locking is hard to get right, especially when you try to implement fine-grained locking for performance. One single instruction or line of code outside the locking window could introduce a race condition. Not all race conditions are exploitable, but some are (such as this one) - and they can give an attacker very powerful bugs to work with.</p>

<p>Heap Spraying<br>
The process of heap spraying is fairly simple - allocate a bunch of memory and fill it with controlled data in a loop and pray your allocation doesn’t get stolen from underneath you. It’s a very useful technique when exploiting something such as a use-after-free(), as you can use it to get controlled data into your target object’s backing memory.<br>
By extension, it’s useful to do this for a double free() as well, because once we have a stale reference, we can use a heap spray to control the data. Since the object will be marked “free” - the allocator will eventually provide us with control over this memory, even though something else is still using it. That is, unless, something else has already stolen the pointer from you and corrupts it - then you’ll likely get a system crash, and that’s no fun. This is one factor that adds to the variance of exploits, and typically, the smaller the object, the more likely this is to happen.</p>

<p>Follow the link to read more of the article<br>
DigitalOcean<br>
<a href="http://do.co/bsdnow" rel="nofollow">http://do.co/bsdnow</a></p>

<h3>OpenBSD gains Wi-Fi “auto-join”</h3>

<p>In a change which is bound to be welcomed widely, -current has gained “auto-join” for Wi-Fi networks. Peter Hessler (phessler@) has been working on this for quite some time and he wrote about it in his p2k18 hackathon report. He has committed the work from the g2k18 hackathon in Ljubljana:</p>

<p>CVSROOT:    /cvs<br>
Module name:    src<br>
Changes by: <a href="mailto:phessler@cvs.openbsd.org" rel="nofollow">phessler@cvs.openbsd.org</a>    2018/07/11 14:18:09</p>

<p>Modified files:<br>
    sbin/ifconfig  : ifconfig.8 ifconfig.c <br>
    sys/net80211   : ieee80211_ioctl.c ieee80211_ioctl.h <br>
                     ieee80211_node.c ieee80211_node.h <br>
                     ieee80211_var.h </p>

<p>Log message:<br>
Introduce &#39;auto-join&#39; to the wifi 802.11 stack.</p>

<p>This allows a system to remember which ESSIDs it wants to connect to, any<br>
relevant security configuration, and switch to it when the network we are<br>
currently connected to is no longer available.<br>
Works when connecting and switching between WPA2/WPA1/WEP/clear encryptions.</p>

<p>example hostname.if:<br>
join home wpakey password<br>
join work wpakey mekmitasdigoat<br>
join open-lounge<br>
join cafe wpakey cafe2018<br>
join &quot;wepnetwork&quot; nwkey &quot;12345&quot;<br>
dhcp<br>
inet6 autoconf<br>
up</p>

<p>OK stsp@ reyk@<br>
and enthusiasm from every hackroom I&#39;ve been in for the last 3 years<br>
The usage should be clear from the commit message, but basically you ‘join’ all the networks you want to auto-join as you would previously use ‘nwid’ to connect to one specific network. Then the kernel will join the network that’s actually in range and do the rest automagically for you. When you move out of range of that network you lose connectivity until you come in range of the original (where things will continue to work as you’ve been used to) or one of the other networks (where you will associate and then get a new lease).</p>

<p>Thanks to Peter for working on this feature - something many a Wi-Fi using OpenBSD user will be able to benefit from.</p>

<h3>FreeBSD Jails the hard way</h3>

<p>There are many great options for managing FreeBSD Jails. iocage, warden and ez-jail aim to streamline the process and make it quick an easy to get going. But sometimes the tools built right into the OS are overlooked.</p>

<p>This post goes over what is involved in creating and managing jails using only the tools built into FreeBSD.</p>

<p>For this guide, I’m going to be putting my jails in /usr/local/jails.</p>

<p>I’ll start with a very simple, isolated jail. Then I’ll go over how to use ZFS snapshots, and lastly nullfs mounts to share the FreeBSD base files with multiple jails.</p>

<p>I’ll also show some examples of how to use the templating power of jail.conf to apply similar settings to all your jails.</p>

<p>Full Jail<br>
Make a directory for the jail, or a zfs dataset if you prefer.<br>
Download the FreeBSD base files, and any other parts of FreeBSD you want. In this example I’ll include the 32 bit libraries as well.<br>
Update your FreeBSD base install.<br>
Verify your download. We’re downloading these archives over FTP after all, we should confirm that this download is valid and not tampered with. The freebsd-update IDS command verifies the installation using a PGP key which is in your base system, which was presumably installed with an ISO that you verified using the FreeBSD signed checksums. Admittedly this step is a bit of paranoia, but I think it’s prudent.<br>
Make sure you jail has the right timezone and dns servers and a hostname in rc.conf.<br>
Edit jail.conf with the details about your jail.<br>
Start and login to your jail.<br>
11 commands and a config file, but this is the most tedious way to make a jail. With a little bit of templating it can be even easier. So I’ll start by making a template. Making a template is basically the same as steps 1, 2 and 3 above, but with a different destination folder, I’ll condense them here.</p>

<p>Creating a template<br>
Create a template or a ZFS dataset. If you’d like to use the zfs clone method of deploying templates, you’ll need to create a zfs dataset instead of a folder.<br>
Update your template with freebsd-update.<br>
Verify your install<br>
And that’s it, now you have a fully up to date jail template. If you’ve made this template with zfs, you can easily deploy it using zfs snapshots.</p>

<p>Deploying a template with ZFS snapshots<br>
Create a snapshot. My last freebsd-update to my template brought it to patch level 17, so I’ll call my snapshot p10.<br>
Clone the snapshot to a new jail.<br>
Configure the jail hostname.<br>
Add the jail definition to jail.conf, make sure you have the global jail settings from jail.conf listed in the fulljail example.<br>
Start the jail.<br>
The downside with the zfs approach is that each jail is now a fully independent, and if you need to update your jails, you have to update them all individually. By sharing a template using nullfs mounts you can have only one copy of the base system that only needs to be updated once.</p>

<p>Follow the link to see the rest of the article about<br>
Thin jails using NullFS mounts<br>
Simplifying jail.conf<br>
Hopefully this has helped you understand the process of how to create and manage FreeBSD jails without tools that abstract away all the details. Those tools are often quite useful, but there is always benefit in learning to do things the hard way. And in this case, the hard way doesn’t seem to be that hard after all.</p>

<h2>Beastie Bits</h2>

<p>Meetup in Zurich #4, July edition (July 19) – Which you likely missed, but now you know to look for the August edition!<br>
The next two BSD-PL User group meetings in Warsaw have been scheduled for July 30th and Aug 9th @ 1830 CEST – Submit your topic proposals now<br>
Linux Geek Books - Humble Bundle<br>
Extend loader(8) geli support to all architectures and all disk-like devices<br>
Upgrading from a bootpool to a single encrypted pool – skip the gptzfsboot part, and manually update your EFI partition with loader.efi<br>
The pkgsrc 2018Q2 for Illumos is available with 18500+ binary packages<br>
NetBSD ARM64 Images Available with SMP for RPi3 / NanoPi / Pine64 Boards<br>
Recently released CDE 2.3.0 running on Tribblix (Illumos)<br>
An Interview With Tech &amp; Science Fiction Author Michael W Lucas<br>
A reminder : MeetBSD CFP<br>
EuroBSDCon talk acceptances have gone out, and once the tutorials are confirmed, registration will open. That will likely have happened by time you see this episode, so go register! See you in Romania<br>
Tarsnap</p>

<h2>Feedback/Questions</h2>

<p>Wilyarti - Adblocked on FreeBSD Continued…<br>
Andrew - A Question and a Story<br>
Matthew - Thanks<br>
Brian - PCI-E Controller<br>
Send questions, comments, show ideas/topics, or stories you want mentioned on the show to <a href="mailto:feedback@bsdnow.tv" rel="nofollow">feedback@bsdnow.tv</a></p>]]>
  </content:encoded>
  <itunes:summary>
    <![CDATA[<p>FreeBSD ULE vs. Linux CFS, OpenBSD on Tuxedo InfinityBook, how zfs diff reports filenames efficiently, why choose FreeBSD over Linux, PS4 double free exploit, OpenBSD’s wifi autojoin, and FreeBSD jails the hard way.</p>

<h2>Win</h2>

<p>Celebrate our 256th episode with us. You can win a Mogics Power Bagel (not sponsored).</p>

<p>To enter, go find the 4 episodes we did in December of 2017. In the opening, find the 4 letters in the bookshelf behind me. They spell different words in each of the 4 episodes. Send us these words in order to <a href="mailto:feedback@bsdnow.tv" rel="nofollow">feedback@bsdnow.tv</a> with the subject “bsdnow256” until August 8th, 2018 18:00 UTC and we’ll randomly draw the winner on the live show. We’ll then contact you to ship the item.<br>
Only one item to win. All decisions are final. Better luck next time.</p>

<h2>Headlines</h2>

<h3>Battle of the Schedulers: FreeBSD ULE vs. Linux CFS</h3>

<p>Introduction<br>
This paper analyzes the impact on application performance of the design and implementation choices made in two widely used open-source schedulers: ULE, the default FreeBSD scheduler, and CFS, the default Linux scheduler. We compare ULE and CFS in otherwise identical circumstances. We have ported ULE to Linux, and use it to schedule all threads that are normally scheduled by CFS. We compare the performance of a large suite of applications on the modified kernel running ULE and on the standard Linux kernel running CFS. The observed performance differences are solely the result of scheduling decisions, and do not reflect differences in other subsystems between FreeBSD and Linux. There is no overall winner. On many workloads the two schedulers perform similarly, but for some workloads there are significant and even surprising differences. ULE may cause starvation, even when executing a single application with identical threads, but this starvation may actually lead to better application performance for some workloads. The more complex load balancing mechanism of CFS reacts more quickly to workload changes, but ULE achieves better load balance in the long run.<br>
Operating system kernel schedulers are responsible for maintaining high utilization of hardware resources (CPU cores, memory, I/O devices) while providing fast response time to latency-sensitive applications. They have to react to workload changes, and handle large numbers of cores and threads with minimal overhead [12]. This paper provides a comparison between the default schedulers of two of the most widely deployed open-source operating systems: the Completely Fair Scheduler (CFS) used in Linux, and the ULE scheduler used in FreeBSD. Our goal is not to declare an overall winner.<br>
In fact, we find that for some workloads ULE is better and for others CFS is better. Instead, our goal is to illustrate how differences in the design and the implementation of the two schedulers are reflected in application performance under different workloads. ULE and CFS are both designed to schedule large numbers of threads on large multicore machines. Scalability considerations have led both schedulers to adopt per-core run-queues. On a context switch, a core accesses only its local run-queue to find the next thread to run. Periodically and at select times, e.g., when a thread wakes up, both ULE and CFS perform load balancing, i.e., they try to balance the amount of work waiting in the run-queues of different cores.<br>
ULE and CFS, however, differ greatly in their design and implementation choices. FreeBSD ULE is a simple scheduler (2,950 lines of code in FreeBSD 11.1), while Linux CFS is much more complex (17,900 lines of code in the latest LTS Linux kernel, Linux 4.9). FreeBSD run-queues are FIFO. For load balancing, FreeBSD strives to even out the number of threads per core. In Linux, a core decides which thread to run next based on prior execution time, priority, and perceived cache behavior of the threads in its runqueue. Instead of evening out the number of threads between cores, Linux strives to even out the average amount of pending work.</p>

<p>Performance analysis<br>
We now analyze the impact of the per-core scheduling on the performance of 37 applications. We define “performance” as follows: for database workloads and NAS applications, we compare the number of operations per second, and for the other applications we compare “execution time”. The higher the “performance”, the better a scheduler performs. Figure 5 presents the performance difference between CFS and ULE on a single core, with percentages above 0 meaning that the application executes faster with ULE than CFS.<br>
Overall, the scheduler has little influence on most workloads. Indeed, most applications use threads that all perform the same work, thus both CFS and ULE endup scheduling all of the threads in a round-robin fashion. The average performance difference is 1.5%, in favor of ULE. Still, scimark is 36% slower on ULE than CFS, and apache is 40% faster on ULE than CFS. Scimark is a single-threaded Java application. It launches one compute thread, and the Java runtime executes other Java system threads in the background (for the garbage collector, I/O, etc.).<br>
When the application is executed with ULE, the compute thread can be delayed, because Java system threads are considered interactive and get priority over the computation thread. The apache workload consists of two applications: the main server (httpd) running 100 threads, and ab, a single-threaded load injector.<br>
The performance difference between ULE and CFS is explained by different choices regarding thread preemption. In ULE, full preemption is disabled, while CFS preempts the running thread when the thread that has just been woken up has a vruntime that is much smaller than the vruntime of the currently executing thread (1ms difference in practice). In CFS, ab is preempted 2 million times during the benchmark, while it never preempted with ULE.<br>
This behavior is explained as follows: ab starts by sending 100 requests to the httpd server, and then waits for the server to answer. When ab is woken up, it checks which requests have been processed and sends new requests to the server. Since ab is single-threaded, all requests sent to the server are sent sequentially. In ULE, ab is able to send as many new requests as it has received responses. In CFS, every request sent by ab wakes up a httpd thread, which preempts ab.</p>

<p>Conclusion<br>
Scheduling threads on a multicore machine is hard. In this paper, we perform a fair comparison of the design choices of two widely used schedulers: the ULE scheduler from FreeBSD and CFS from Linux. We show that they behave differently even on simple workloads, and that no scheduler performs better than the other on all workloads.</p>

<h3>OpenBSD 6.3 on Tuxedo InfinityBook</h3>

<p>Disclaimer:<br>
I came across the Tuxedo Computers InfinityBook last year at the Open! Conference where Tuxedo had a small booth. Previously they came to my attention since they’re a member of the OSB Alliance on whose board I’m a member. Furthermore Tuxedo Computers are a sponsor of the OSBAR which I’m part of the organizational team.</p>

<p>OpenBSD on the Tuxedo InfinityBook<br>
I’ve asked the guys over at Tuxedo Computers whether they would be interested to have some tests with *BSD done and that I could test drive one of their machines and give feedback on what works and what does not - and possibly look into it.+</p>

<p>Within a few weeks they shipped me a machine and last week the InfinityBook Pro 14” arrived. Awesome. Thanks already to the folks at Tuxedo Computers. The machine arrived accompanied by lot’s of swag :)</p>

<p>The InfinityBook is a very nice machine and allows a wide range of configuration. The configuration that was shipped to me:</p>

<p>Intel Core i7-8550U<br>
1x 16GB RAM 2400Mhz Crucial Ballistix Sport LT<br>
250 GB Samsung 860 EVO (M.2 SATAIII)</p>

<p>I used a USB-stick to boot install63.fs and re-installed the machine with OpenBSD. Full dmesg.</p>

<p>The installation went flawlessly, the needed intel firmware is being installed after installation automatically via fw_update(1).</p>

<p>Out of the box the graphics works and once installed the machine presents the login.</p>

<p>Video<br>
When X starts the display is turned off for some reason. You will need to hit fn+f12 (the key with the moon on it) then the display will go on. Aside from that little nit, X works just fine and presents one the expected resolution.</p>

<p>External video is working just fine as well. Either via hdmi output or via the mini displayport connector.</p>

<p>The buttons for adjusting brightness (fn+f8 and fn+f9) are not working. Instead one has to use wsconsctl(8) to adjust the brightness.</p>

<p>Networking<br>
The infinityBook has built-in ethernet, driven by re(4) And for the wireless interface the iwm(4) driver is being used. Both work as expected.</p>

<p>ACPI<br>
Neither suspend nor hibernate work. Reporting of battery status is bogus as well. Some of the keyboard function keys work:</p>

<p>LCD on/off works (fn+f2)<br>
Keyboard backlight dimming works (fn+f4)<br>
Volume (fn+f5 / fn+f6) works</p>

<p>Sound<br>
The azalia chipset is being used for audio processing. Works as expected, volume can be controlled via buttons (fn+f5, fn+f6) or via mixerctl.</p>

<p>Touchpad<br>
Can be controlled via wsconsctl(8).<br>
So far I must say, that the InfinityBook makes a nice machine - and I’m enjoying working with it.</p>

<p>iXsystems<br>
iXsystems - Its all NAS</p>

<h3>How ZFS makes things like ‘zfs diff’ report filenames efficiently</h3>

<p>As a copy on write (file)system, ZFS can use the transaction group (txg) numbers that are embedded in ZFS block pointers to efficiently find the differences between two txgs; this is used in, for example, ZFS bookmarks. However, as I noted at the end of my entry on block pointers, this doesn’t give us a filesystem level difference; instead, it essentially gives us a list of inodes (okay, dnodes) that changed.<br>
In theory, turning an inode or dnode number into the path to a file is an expensive operation; you basically have to search the entire filesystem until you find it. In practice, if you’ve ever run ‘zfs diff’, you’ve likely noticed that it runs pretty fast. Nor is this the only place that ZFS quickly turns dnode numbers into full paths, as it comes up in ‘zpool status’ reports about permanent errors. At one level, zfs diff and zpool status do this so rapidly because they ask the ZFS code in the kernel to do it for them. At another level, the question is how the kernel’s ZFS code can be so fast.<br>
The interesting and surprising answer is that ZFS cheats, in a way that makes things very fast when it works and almost always works in normal filesystems and with normal usage patterns. The cheat is that ZFS dnodes record their parent’s object number.<br>
If you’re familiar with the twists and turns of Unix filesystems, you’re now wondering how ZFS deals with hardlinks, which can cause a file to be in several directories at once and so have several parents (and then it can be removed from some of the directories). The answer is that ZFS doesn’t; a dnode only ever tracks a single parent, and ZFS accepts that this parent information can be inaccurate. I’ll quote the comment in zfs_obj_to_pobj:<br>
When a link is removed [the file’s] parent pointer is not changed and will be invalid. There are two cases where a link is removed but the file stays around, when it goes to the delete queue and when there are additional links.<br>
Before I get into the details, I want to say that I appreciate the brute force elegance of this cheat. The practical reality is that most Unix files today don’t have extra hardlinks, and when they do most hardlinks are done in ways that won’t break ZFS’s parent stuff. The result is that ZFS has picked an efficient implementation that works almost all of the time; in my opinion, the great benefit we get from having it around are more than worth the infrequent cases where it fails or malfunctions. Both zfs diff and having filenames show up in zpool status permanent error reports are very useful (and there may be other cases where this gets used).<br>
The current details are that any time you hardlink a file to somewhere or rename it, ZFS updates the file’s parent to point to the new directory. Often this will wind up with a correct parent even after all of the dust settles; for example, a common pattern is to write a file to an initial location, hardlink it to its final destination, and then remove the initial location version. In this case, the parent will be correct and you’ll get the right name.</p>

<h2>News Roundup</h2>

<h3>What is FreeBSD? Why Should You Choose It Over Linux?</h3>

<p>Not too long ago I wondered if and in what situations FreeBSD could be faster than Linux and we received a good amount of informative feedback. So far, Linux rules the desktop space and FreeBSD rules the server space.</p>

<p>In the meantime, though, what exactly is FreeBSD? And at what times should you choose it over a GNU/Linux installation? Let’s tackle these questions.</p>

<p>FreeBSD is a free and open source derivative of BSD (Berkeley Software Distribution) with a focus on speed, stability, security, and consistency, among other features. It has been developed and maintained by a large community ever since its initial release many years ago on November 1, 1993.</p>

<p>BSD is the version of UNIX® that was developed at the University of California in Berkeley. And being a free and open source version, “Free” being a prefix to BSD is a no-brainer.</p>

<p>What’s FreeBSD Good For?</p>

<p>FreeBSD offers a plethora of advanced features and even boasts some not available in some commercial Operating Systems. It makes an excellent Internet and Intranet server thanks to its robust network services that allow it to maximize memory and work with heavy loads to deliver and maintain good response times for thousands of simultaneous user processes.</p>

<p>FreeBSD runs a huge number of applications with ease. At the moment, it has over 32,000 ported applications and libraries with support for desktop, server, and embedded environments. with that being said, let me also add that FreeBSD is excellent for working with advanced embedded platforms. Mail and web appliances, timer servers, routers, MIPS hardware platforms, etc. You name it!</p>

<p>FreeBSD is available to install in several ways and there are directions to follow for any method you want to use; be it via CD-ROM, over a network using NFS or FTP, or DVD.</p>

<p>FreeBSD is easy to contribute to and all you have to do is to locate the section of the FreeBSD code base to modify and carefully do a neat job. Potential contributors are also free to improve on its artwork and documentation, among other project aspects.</p>

<p>FreeBSD is backed by the FreeBSD Foundation, a non-profit organization that you can contribute to financially and all direct contributions are tax deductible.</p>

<p>FreeBSD’s license allows users to incorporate the use of proprietary software which is ideal for companies interested in generating revenues. Netflix, for example, could cite this as one of the reasons for using FreeBSD servers.</p>

<p>Why Should You Choose It over Linux?</p>

<p>From what I’ve gathered about both FreeBSD and Linux, FreeBSD has a better performance on servers than Linux does. Yes, its packaged applications are configured to offer better a performance than Linux and it is usually running fewer services by default, there really isn’t a way to certify which is faster because the answer is dependent on the running hardware and applications and how the system is tuned.</p>

<p>FreeBSD is reportedly more secure than Linux because of the way the whole project is developed and maintained.</p>

<p>Unlike with Linux, the FreeBSD project is controlled by a large community of developers around the world who fall into any of these categories; core team, contributors, and committers.</p>

<p>FreeBSD is much easier to learn and use because there aren’t a thousand and one distros to choose from with different package managers, DEs, etc.</p>

<p>FreeBSD is more convenient to contribute to because it is the entire OS that is preserved and not just the kernel and a repo as is the case with Linux. You can easily access all of its versions since they are sorted by release numbers.</p>

<p>Apart from the many documentations and guides that you can find online, FreeBSD has a single official documentation wherein you can find the solution to virtually any issue you will come across. So, you’re sure to find it resourceful.</p>

<p>FreeBSD has close to no software issues compared to Linux because it has Java, is capable of running Windows programs using Wine, and can run .NET programs using Mono.</p>

<p>FreeBSD’s ports/packages system allows you to compile software with specific configurations, thereby avoiding conflicting dependency and version issues.</p>

<p>Both the FreeBSD and GNU/Linux project are always receiving updates. The platform you decide to go with is largely dependent on what you want to use it for, your technical know-how, willingness to learn new stuff, and ultimately your preference.<br>
What is your take on the topic? For what reasons would you choose FreeBSD over Linux if you would? Let us know what you think about both platforms in the comments section below.</p>

<h3>PS4 5.05 BPF Double Free Kernel Exploit Writeup</h3>

<p>Introduction<br>
Welcome to the 5.0x kernel exploit write-up. A few months ago, a kernel vulnerability was discovered by qwertyoruiopz and an exploit was released for BPF which involved crafting an out-of-bounds (OOB) write via use-after-free (UAF) due to the lack of proper locking. It was a fun bug, and a very trivial exploit. Sony then removed the write functionality from BPF, so that exploit was patched. However, the core issue still remained (being the lack of locking). A very similar race condition still exists in BPF past 4.55, which we will go into detail below on. The full source of the exploit can be found here.<br>
This bug is no longer accessible however past 5.05 firmware, because the BPF driver has finally been blocked from unprivileged processes - WebKit can no longer open it. Sony also introduced a new security mitigation in 5.0x firmwares to prevent the stack pointer from pointing into user space, however we’ll go more in detail on this a bit further down.</p>

<p>Assumptions<br>
Some assumptions are made of the reader’s knowledge for the writeup. The avid reader should have a basic understanding of how memory allocators work - more specifically, how malloc() and free() allocate and deallocate memory respectively. They should also be aware that devices can be issued commands concurrently, as in, one command could be received while another one is being processed via threading. An understanding of C, x86, and exploitation basics is also very helpful, though not necessarily required.</p>

<p>Background<br>
This section contains some helpful information to those newer to exploitation, or are unfamiliar with device drivers, or various exploit techniques such as heap spraying and race conditions. Feel free to skip to the “A Tale of Two Free()&#39;s” section if you’re already familiar with this material.</p>

<p>What Are Drivers?<br>
There are a few ways that applications can directly communicate with the operating system. One of which is system calls, which there are over 600 of in the PS4 kernel, ~500 of which are FreeBSD - the rest are Sony-implemented. Another method is through something called “Device Drivers”. Drivers are typically used to bridge the gap between software and hardware devices (usb drives, keyboard/mouse, webcams, etc) - though they can also be used just for software purposes.<br>
There are a few operations that a userland application can perform on a driver (if it has sufficient permissions) to interface with it after opening it. In some instances, one can read from it, write to it, or in some cases, issue more complex commands to it via the ioctl() system call. The handlers for these commands are implemented in kernel space - this is important, because any bugs that could be exploited in an ioctl handler can be used as a privilege escalation straight to ring0 - typically the most privileged state.<br>
Drivers are often the more weaker points of an operating system for attackers, because sometimes these drivers are written by developers who don’t understand how the kernel works, or the drivers are older and thus not wise to newer attack methods.</p>

<p>The BPF Device Driver<br>
If we take a look around inside of WebKit’s sandbox, we’ll find a /dev directory. While this may seem like the root device driver path, it’s a lie. Many of the drivers that the PS4 has are not exposed to this directory, but rather only ones that are needed for WebKit’s operation (for the most part). For some reason though, BPF (aka. the “Berkely Packet Filter”) device is not only exposed to WebKit’s sandbox - it also has the privileges to open the device as R/W. This is very odd, because on most systems this driver is root-only (and for good reason). If you want to read more into this, refer to my previous write-up with 4.55FW.</p>

<p>What Are Packet Filters?<br>
Below is an excerpt from the 4.55 bpfwrite writeup.<br>
Since the bug is directly in the filter system, it is important to know the basics of what packet filters are. Filters are essentially sets of pseudo-instructions that are parsed by bpf_filter() (which are ran when packets are received). While the pseudo-instruction set is fairly minimal, it allows you to do things like perform basic arithmetic operations and copy values around inside it’s buffer. Breaking down the BPF VM in it’s entirety is far beyond the scope of this write-up, just know that the code produced by it is ran in kernel mode - this is why read/write access to /dev/bpf should be privileged.</p>

<p>Race Conditions<br>
Race conditions occur when two processes/threads try to access a shared resource at the same time without mutual exclusion. The problem was ultimately solved by introducing concepts such as the “mutex” or “lock”. The idea is when one thread/process tries to access a resource, it will first acquire a lock, access it, then unlock it once it’s finished. If another thread/process tries to access it while the other has the lock, it will wait until the other thread is finished. This works fairly well - when it’s used properly.<br>
Locking is hard to get right, especially when you try to implement fine-grained locking for performance. One single instruction or line of code outside the locking window could introduce a race condition. Not all race conditions are exploitable, but some are (such as this one) - and they can give an attacker very powerful bugs to work with.</p>

<p>Heap Spraying<br>
The process of heap spraying is fairly simple - allocate a bunch of memory and fill it with controlled data in a loop and pray your allocation doesn’t get stolen from underneath you. It’s a very useful technique when exploiting something such as a use-after-free(), as you can use it to get controlled data into your target object’s backing memory.<br>
By extension, it’s useful to do this for a double free() as well, because once we have a stale reference, we can use a heap spray to control the data. Since the object will be marked “free” - the allocator will eventually provide us with control over this memory, even though something else is still using it. That is, unless, something else has already stolen the pointer from you and corrupts it - then you’ll likely get a system crash, and that’s no fun. This is one factor that adds to the variance of exploits, and typically, the smaller the object, the more likely this is to happen.</p>

<p>Follow the link to read more of the article<br>
DigitalOcean<br>
<a href="http://do.co/bsdnow" rel="nofollow">http://do.co/bsdnow</a></p>

<h3>OpenBSD gains Wi-Fi “auto-join”</h3>

<p>In a change which is bound to be welcomed widely, -current has gained “auto-join” for Wi-Fi networks. Peter Hessler (phessler@) has been working on this for quite some time and he wrote about it in his p2k18 hackathon report. He has committed the work from the g2k18 hackathon in Ljubljana:</p>

<p>CVSROOT:    /cvs<br>
Module name:    src<br>
Changes by: <a href="mailto:phessler@cvs.openbsd.org" rel="nofollow">phessler@cvs.openbsd.org</a>    2018/07/11 14:18:09</p>

<p>Modified files:<br>
    sbin/ifconfig  : ifconfig.8 ifconfig.c <br>
    sys/net80211   : ieee80211_ioctl.c ieee80211_ioctl.h <br>
                     ieee80211_node.c ieee80211_node.h <br>
                     ieee80211_var.h </p>

<p>Log message:<br>
Introduce &#39;auto-join&#39; to the wifi 802.11 stack.</p>

<p>This allows a system to remember which ESSIDs it wants to connect to, any<br>
relevant security configuration, and switch to it when the network we are<br>
currently connected to is no longer available.<br>
Works when connecting and switching between WPA2/WPA1/WEP/clear encryptions.</p>

<p>example hostname.if:<br>
join home wpakey password<br>
join work wpakey mekmitasdigoat<br>
join open-lounge<br>
join cafe wpakey cafe2018<br>
join &quot;wepnetwork&quot; nwkey &quot;12345&quot;<br>
dhcp<br>
inet6 autoconf<br>
up</p>

<p>OK stsp@ reyk@<br>
and enthusiasm from every hackroom I&#39;ve been in for the last 3 years<br>
The usage should be clear from the commit message, but basically you ‘join’ all the networks you want to auto-join as you would previously use ‘nwid’ to connect to one specific network. Then the kernel will join the network that’s actually in range and do the rest automagically for you. When you move out of range of that network you lose connectivity until you come in range of the original (where things will continue to work as you’ve been used to) or one of the other networks (where you will associate and then get a new lease).</p>

<p>Thanks to Peter for working on this feature - something many a Wi-Fi using OpenBSD user will be able to benefit from.</p>

<h3>FreeBSD Jails the hard way</h3>

<p>There are many great options for managing FreeBSD Jails. iocage, warden and ez-jail aim to streamline the process and make it quick an easy to get going. But sometimes the tools built right into the OS are overlooked.</p>

<p>This post goes over what is involved in creating and managing jails using only the tools built into FreeBSD.</p>

<p>For this guide, I’m going to be putting my jails in /usr/local/jails.</p>

<p>I’ll start with a very simple, isolated jail. Then I’ll go over how to use ZFS snapshots, and lastly nullfs mounts to share the FreeBSD base files with multiple jails.</p>

<p>I’ll also show some examples of how to use the templating power of jail.conf to apply similar settings to all your jails.</p>

<p>Full Jail<br>
Make a directory for the jail, or a zfs dataset if you prefer.<br>
Download the FreeBSD base files, and any other parts of FreeBSD you want. In this example I’ll include the 32 bit libraries as well.<br>
Update your FreeBSD base install.<br>
Verify your download. We’re downloading these archives over FTP after all, we should confirm that this download is valid and not tampered with. The freebsd-update IDS command verifies the installation using a PGP key which is in your base system, which was presumably installed with an ISO that you verified using the FreeBSD signed checksums. Admittedly this step is a bit of paranoia, but I think it’s prudent.<br>
Make sure you jail has the right timezone and dns servers and a hostname in rc.conf.<br>
Edit jail.conf with the details about your jail.<br>
Start and login to your jail.<br>
11 commands and a config file, but this is the most tedious way to make a jail. With a little bit of templating it can be even easier. So I’ll start by making a template. Making a template is basically the same as steps 1, 2 and 3 above, but with a different destination folder, I’ll condense them here.</p>

<p>Creating a template<br>
Create a template or a ZFS dataset. If you’d like to use the zfs clone method of deploying templates, you’ll need to create a zfs dataset instead of a folder.<br>
Update your template with freebsd-update.<br>
Verify your install<br>
And that’s it, now you have a fully up to date jail template. If you’ve made this template with zfs, you can easily deploy it using zfs snapshots.</p>

<p>Deploying a template with ZFS snapshots<br>
Create a snapshot. My last freebsd-update to my template brought it to patch level 17, so I’ll call my snapshot p10.<br>
Clone the snapshot to a new jail.<br>
Configure the jail hostname.<br>
Add the jail definition to jail.conf, make sure you have the global jail settings from jail.conf listed in the fulljail example.<br>
Start the jail.<br>
The downside with the zfs approach is that each jail is now a fully independent, and if you need to update your jails, you have to update them all individually. By sharing a template using nullfs mounts you can have only one copy of the base system that only needs to be updated once.</p>

<p>Follow the link to see the rest of the article about<br>
Thin jails using NullFS mounts<br>
Simplifying jail.conf<br>
Hopefully this has helped you understand the process of how to create and manage FreeBSD jails without tools that abstract away all the details. Those tools are often quite useful, but there is always benefit in learning to do things the hard way. And in this case, the hard way doesn’t seem to be that hard after all.</p>

<h2>Beastie Bits</h2>

<p>Meetup in Zurich #4, July edition (July 19) – Which you likely missed, but now you know to look for the August edition!<br>
The next two BSD-PL User group meetings in Warsaw have been scheduled for July 30th and Aug 9th @ 1830 CEST – Submit your topic proposals now<br>
Linux Geek Books - Humble Bundle<br>
Extend loader(8) geli support to all architectures and all disk-like devices<br>
Upgrading from a bootpool to a single encrypted pool – skip the gptzfsboot part, and manually update your EFI partition with loader.efi<br>
The pkgsrc 2018Q2 for Illumos is available with 18500+ binary packages<br>
NetBSD ARM64 Images Available with SMP for RPi3 / NanoPi / Pine64 Boards<br>
Recently released CDE 2.3.0 running on Tribblix (Illumos)<br>
An Interview With Tech &amp; Science Fiction Author Michael W Lucas<br>
A reminder : MeetBSD CFP<br>
EuroBSDCon talk acceptances have gone out, and once the tutorials are confirmed, registration will open. That will likely have happened by time you see this episode, so go register! See you in Romania<br>
Tarsnap</p>

<h2>Feedback/Questions</h2>

<p>Wilyarti - Adblocked on FreeBSD Continued…<br>
Andrew - A Question and a Story<br>
Matthew - Thanks<br>
Brian - PCI-E Controller<br>
Send questions, comments, show ideas/topics, or stories you want mentioned on the show to <a href="mailto:feedback@bsdnow.tv" rel="nofollow">feedback@bsdnow.tv</a></p>]]>
  </itunes:summary>
</item>
  </channel>
</rss>
