Skip to content

Improve security - #2203

Merged
jubalh merged 3 commits into
masterfrom
dev
Jul 30, 2026
Merged

Improve security#2203
jubalh merged 3 commits into
masterfrom
dev

Conversation

@jubalh

@jubalh jubalh commented Jul 30, 2026

Copy link
Copy Markdown
Member

Protect against heap dump attacks.
Prevent OS from writing sensitive information to SWAP.
Protect against payload spoofing.

@jubalh jubalh added this to the next milestone Jul 30, 2026
@jubalh jubalh self-assigned this Jul 30, 2026
jubalh added 3 commits July 30, 2026 20:13
…ication failure

Delete the decrypted file on disk if GCM decryption or
authentication tag validation fails.
Before unauthenticated plaintexts were left on disk.

Additionally, avoid executing the configured open command template when
decryption fails to prevent remote command execution on
unauthenticated/corrupted payloads.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
… check

Use libgcrypts secure memory functions for plaintext buffers in OMEMO
encryption and decryption.
This ensures decrypted chat messages do not reside in cleartext on the
standard heap or get swapped to disk.
And are zeroed later.

Add safety and bounds checks on PKCS#5 padding during
decryption to prevent potential OOB reads when
processing malformed or truncated ciphertexts.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Scrub sensitive cleartext strings using a `volatile` write pattern
before they are released back to the heap.

Use it in
* Session saved PW
* XMPP account passwords in `account_free()`
* GPG passphrases and passphrase attempts

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh
jubalh merged commit a07def8 into master Jul 30, 2026
12 checks passed
@jubalh
jubalh deleted the dev branch July 30, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant