by ephbit · 4y ago · 0 comments
How so?
Let's say you have one machine holding the actual data for working on it. And some backup server. You could use btrfs send over ssh and regularly btrfs receive the data on the backup machine. Even it they got encrypted by ransomware they wouldn't be lost in the backups. As long as they're not deleted there how could a compromised work machine compromise the data on the backup machine?
That btrfs receive may well be exploitable (because of some bug) if you feed it with malicious data is IMO a different topic.
https://docs.oracle.com/cd/E37670_01/E37355/html/ol_srbackup...
while it doesn't allow you to delete a subvolume (i.e. what a snapshot is built off of), it does seem like one could conceptually just overwrite it via send/recieve? perhaps its a bit smarter and doesn't let snapshots be modified, but I'm now a bit unconvinced that it can be viewed as simply an "append only" interface.
Don't think so.
The man page for btrfs receive states:
> btrfs receive will fail in the following cases:
> 1. receiving subvolume already exists
I also just tried it out. I created some subvol1-ro in a source filesystem, then sent it to the destination filesystem. Then deleted the source subvol1-ro. Then created a new subvol1-ro containing a different file and tried to send it to the same destination.
Result:
> ERROR: creating subvolume subvol1-ro failed: File exists
that would fit with my description (at least in a sense) it enables an "append" only mode to a remote side (where "append" means cant mess with previous snapshots remotely).