Why Nostr? What is Njump?
2025-03-25 16:33:43

Asahi Lina (朝日リナ) on Nostr: This probably goes without saying but I wanted to log it for reference: Restoring an ...

This probably goes without saying but I wanted to log it for reference: Restoring an untrusted PostgreSQL raw data (base) dump is not safe!

Besides the obvious reason (stored procedures that could run arbitrary untrusted code), the server trusts the binary data files and will go out of bounds and access arbitrary memory if they are corrupted/inconsistent.

I don't think this is really a vulnerability or anything worth worrying about, it should just be known/documented (that if you need to restore a raw data dump from someone else, you should make sure the postgres daemon is sandboxed). This does not apply to SQL dumps, only the raw cluster data directory.

Mentioning this because I helped debug a crashing server due to a corrupted DB and confirmed the code makes data integrity assumptions ^^
Author Public Key
npub14w78207els8vs5fxduhhval0r9zgujpf2khcqyfuhmkt2tlyvcyq2zuequ