Paranoia setups


#1

Intro

Mailpile already has a rather thought-through security model. But as with any other piece of software, there is always (some) room for further improvements. This post on a Github issue sparked my interest:

I’ve done some work toward using firejail to sandbox calls to external utilities. Events in RL conspired to derail my work on that, and I never got back to it. I’d like to finish that work.
I don’t have a lot of time to devote, so I don’t know that I can pledge to contribute in a sustained/consistent way.

(source)

This can be further complimented by sandboxing/jailing/pledging/unveiling the browser - which poses a rather large attack vector. The browser being unable to touch the Mailpile data folder is one extra defense barrier.

Question

Is there any interest for such paranoia setups and tools? Because if so, I (perhaps with the help of others) can write docs and tools to lock Mailpile down even further.


#2

It’s worth mentioning here, that users who want to protect the contents of their Mailpile folder can enable all the local storage encryption options. That’s what they’re for! Hostile local apps can still vandalize by deleting files, but the encryption should protect the data from all sorts of theft.

The trade-off, which is why not all the encryption is enabled by default, is reliability. Encrypted files are much more vulnerable to data corruption, and key loss is a real concern.

Regarding the browser itself, traditional user-account based security works well in this case - since Mailpile’s UI a web server, it’s perfectly feasible to have Mailpile running under a separate Unix (or Windows) account, or in a VPS, or a container - even on separate hardware from the browser. Such hardening approaches are probably easier to reason about and implement than a browser sandbox. More security for less complexity is a winning combination.


#3

Wow, talking about swift replies. You are on fire! :heart:

It’s worth mentioning here, that users who want to protect the contents of their Mailpile folder are can enable all the local storage encryption options. That’s what they’re for! Hostile local apps can still vandalize by deleting files, but the encryption should protect the data from all sorts of theft.

Totally. Mailpile sets a sane and awesome baseline with options like this. And it shows that while security and privacy are two different aspects, they can integrate nicely and smoothly.

The trade-off, which is why not all the encryption is enabled by default, is reliability. Encrypted files are much more vulnerable to data corruption, and key loss is a real concern.

That makes much sense. I’ll be sure to take that thought/remark into account with writing any docs. I have moved my Mailpile instance across a few machines in the past, just making an exact copy of the Mailpile data folder has helped tremendously. Mailpile does have its own tools for backups, I know :smiley:

Regarding the browser itself, traditional user-account based security works well in this case - since Mailpile’s UI a web server, it’s perfectly feasible to have Mailpile running under a separate Unix (or Windows) account, or in a VPS, or a container - even on separate hardware from the browser. Such hardening approaches are probably easier to reason about and implement than a browser sandbox. More security for less complexity is a winning combination.

True that! And if Mailpile runs stable and smooth on a Raspberry Pi, that makes up some neat setup with segmentation and seperation applied. But, I rather write it out in a sidenote, because I think we shouldn’t assume every user has the means to get or have a second system. Even with machines we consider cheap, that is more our society. Remain inclusive :slight_smile:


#4

Regarding the isolation: all users have access to multi-user operating systems these days. So anyone who cares can sandbox their Mailpile by running under a separate user account from what they use for daily browsing and computing. Separate hardware is just the extreme case.

But talking about extremes:

I’ve dreamt about creating/documenting a Rowhammer/Spectre/CPU-bug-resistant Mailpile cluster, where each Mailpile runs on its own Raspberry PI, but storage is a shared NFS volume with proper RAID and backups and such things.

This would physically isolate the processing of cleartext and keys, while still allowing an org to use professional grade managed storage…


#5

Regarding the isolation: all users have access to multi-user operating systems these days. So anyone who cares can sandbox their Mailpile by running under a separate user account from what they use for daily browsing and computing. Separate hardware is just the extreme case.

Yes, it is a extreme case. And Mailpile certainly has splendid to offer to the users looking for a more secure/privacy respecting setup! I think it would be a good move to document the more extreme setups as well, purely for those whom are willing to go through more lengths, perhaps do to a different threat model.

I’ve dreamt about creating/documenting a Rowhammer/Spectre/CPU-bug-resistant Mailpile cluster, where each Mailpile runs on its own Raspberry PI, but storage is a shared NFS volume with proper RAID and backups and such things.
This would physically isolate the processing of cleartext and keys, while still allowing an org to use professional grade managed storage…

That is actually quite neat! If the user has enabled encrypted storage (and perhaps even the stronger search encryption), is there a certain point in time where the $MAILPILE_HOME contains cleartext contents?

Aside from the ARM based RPi, there are some interesting developments, like the RISC-V board by SiFive. While it - right now - doesn’t offer anything for the regular computer user, it might be one of the building blocks for a more secure world :slight_smile: