Skip to content

fix(parquet): propagate nonce generation failures - #1045

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-nonce-random-errors
Open

fix(parquet): propagate nonce generation failures#1045
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-nonce-random-errors

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

Check the secure-random read used to generate Parquet AES nonces and stop encryption if nonce generation fails.

Why

The encryptor previously ignored the result of crypto/rand.Read. On Go versions where that function returns an error, encryption could continue with an all-zero or partially filled nonce. Reusing a nonce undermines the security guarantees of both AES-GCM and AES-CTR.

The test uses a package-local random-read seam to inject an entropy failure without replacing the process-wide random reader. It covers both supported cipher modes.

Validation

go test ./parquet/internal/encryption

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 28, 2026 22:13
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.

1 participant