Skip to content

Fix v2 backup crash when group master key is invalid - #14972

Open
loucass wants to merge 3 commits into
signalapp:mainfrom
loucass:fix/android-backup-v2-invalid-group-masterkey
Open

Fix v2 backup crash when group master key is invalid#14972
loucass wants to merge 3 commits into
signalapp:mainfrom
loucass:fix/android-backup-v2-invalid-group-masterkey

Conversation

@loucass

@loucass loucass commented Aug 30, 2026

Copy link
Copy Markdown

Fixes #14875

Old phones have attachments where DATA_RANDOM is null (classic encryption). The backup query only checked hash/file/key, so those rows slipped through and crashed on requireNonNullBlob. Added DATA_RANDOM IS NOT NULL filter in both places.

Also kept the group master key null check from the first commit - same kind of issue, just defensive.

@mtang-signal mtang-signal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind the change in principle but is the pr description correct on what it was resolving (a NPE in attachments)?

@loucass

loucass commented Aug 31, 2026

Copy link
Copy Markdown
Author

@mtang-signal You're right, my bad I made both fixes but forgot to push the main fix... however I have kept the group guard as a defensive fix but just pushed the missing DATA_RANDOM filter and updated the description

@loucass
loucass force-pushed the fix/android-backup-v2-invalid-group-masterkey branch from cd9ca2a to 8db83a0 Compare September 1, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot create v2 backups: NullPointerException in requireNonNullBlob()

2 participants