The Illusion of Secrecy: Scrutinizing NetBSD's Disk Encryption Approach

AI-generated image · US National Wire
As NetBSD users navigate the trade-offs between usability and security, the reliance on unencrypted root partitions raises critical questions about the actual efficacy of their threat models.
In the world of cybersecurity, encryption is often treated as a binary: either your data is encrypted or it is exposed. But for those of us with a defender mindset, we know that implementation is where the real battle is fought. A leaky implementation transforms a robust cryptographic promise into a hollow one. This is the tension at the heart of the disk encryption strategies currently discussed for NetBSD.
According to documentation hosted on netbsd.org, as first reported by the outlet, the primary threat model being addressed is the loss or theft of a device where the contents must remain secret. To achieve this, the proposed approach involves a strategic compromise. Because "true" full disk encryption is difficult to implement without specialized hardware—given that the system needs software to run in order to allow a user to enter a password—the suggested method involves installing NetBSD to a small, unencrypted root file system.
From a threat-modeling perspective, this is a precarious pivot. The guide suggests that a 4 GB unencrypted root partition is sufficient, arguing that most system files are open-source and unmodified, and therefore not sensitive. However, this assumes a level of isolation that may not hold up under scrutiny. While the documentation notes that many system daemons do not run as root and thus cannot modify `/bin`, the fact remains that a significant portion of the OS resides in the clear.
The proposed solution is to isolate sensitive data into an encrypted partition using NetBSD’s encrypted device driver, known as `cgd`. The strategy identifies specific directories as high-risk: `/home` for user files, `/var` for log files and crash dumps, `/root` for root user configuration, `/usr/pkg` and `/usr/local` for third-party software, and `/etc` for system-wide configuration.
But here is where the "leaky" nature of the implementation becomes apparent. The documentation admits that `/etc` is a "harder problem to solve" because it contains files necessary for booting. While it suggests that passwords in `/etc` are generally hashed, it explicitly mentions that Wi-Fi access points and certain VPN configurations may store sensitive data there in plain text, unless the user manually reconfigures `wpa_supplicant_flags` to use a different file.
Furthermore, the risk of memory leakage is highlighted. The source notes that crash dumps contain snapshots of system memory which might be sensitive. While the crash directory can be moved via `sysctl`, any failure to properly secure these logs or the mail notifications sent to users could reveal sensitive file names or system states.
When we look at the installation process described—where a user might allocate a 4096 MB root file system and an 11 GB `cgd` partition—we are seeing a system designed for convenience. The alternative, a `cgdroot` approach using an unencrypted ramdisk to pivot to an encrypted file system, is acknowledged as being more complex and potentially hindering rescue options.
Ultimately, if the goal is absolute secrecy, relying on the assumption that `/etc` or the root partition doesn't contain "enough" sensitive data to be useful to an attacker is a gamble. Encryption is only as strong as the perimeter around the keys and the data; if the boot process and configuration files are left in the clear, we aren't eliminating the threat—we are just narrowing the window of exposure and hoping the attacker doesn't look through it.

