Skip to content

Fix openssl panic due to missing iv#22

Open
malmeloo wants to merge 1 commit into
OpenBubbles:masterfrom
malmeloo:fix/openssl-panic
Open

Fix openssl panic due to missing iv#22
malmeloo wants to merge 1 commit into
OpenBubbles:masterfrom
malmeloo:fix/openssl-panic

Conversation

@malmeloo
Copy link
Copy Markdown

@malmeloo malmeloo commented May 5, 2026

OpenSSL was causing a panic for me because the iv was missing in AES operations. This fixes that by manually setting the IV to the default constant value.

Not sure why that results in an error now but I guess something changed on OpenSSL's side.

@gregakespret
Copy link
Copy Markdown

+1 — reproduced today on macOS 26 with the Homebrew cargo 1.95.0 toolchain and openssl = 0.10.80. The exact panic point is Crypter::new(...) at src/util.rs:1591 (and the decrypt(...) call at :1621):

thread 'main' panicked at openssl/symm.rs:623:
an IV is required for this cipher

Easy public reproduction: any tool that drives rustpush through a PCS-encrypted CloudKit zone hits it on the first pcs_keys_for_record(...) call (the RFC 6637 unwrap path inside Crypter::new). The chain I hit it on:

  • thisiscam/export-findmythisiscam/rustpush:findmy-export-support → this code → panics on the first BeaconStore record.

openssl 0.10.80 enforces an explicit IV for any cipher with non-zero iv_len() — passing None no longer falls through to the cipher's default. The fix here (the RFC 3394 §2.2.3.1 default constant 0xA6A6A6A6A6A6A6A6) is exactly what older openssl versions filled in internally, so the wire-level bytes are unchanged.

Any chance of a merge? Happy to test additional cases if useful. I had filed thisiscam/rustpush#1 before noticing this PR existed — closed it as a duplicate.

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.

2 participants