Skip to content

Conversation

@Chand-ra
Copy link

Changelog-None: fuzz-hsm_encryption.c hard codes the lengths sizeof(struct secret) as 32 and crypto_pwhash_argon2id_PASSWD_MAX as 4294967295. Replace the latter with the former to improve readability and maintainability.

While at it, replace the tal_free() call on our secret key with discard_key(). This has the benefit of testing discard_key().

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.

@rustyrussell rustyrussell added this to the v25.12 milestone Nov 7, 2025
@rustyrussell
Copy link
Contributor

This file was replaced, due to the hsm encryption changes, so I altered your test to fit. Maintained the corpora for now, though.

rustyrussell and others added 3 commits November 10, 2025 16:34
We check this now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: `fuzz-hsm_encryption.c` hard codes the lengths
sizeof(struct secret) as 32 and crypto_pwhash_argon2id_PASSWD_MAX
as 4294967295. Replace the latter with the former to improve
readability and maintainability.

While at it, replace the `tal_free()` call on our secret key with
`discard_key()`. This has the benefit of testing `discard_key()`.

[ Changed from fuzz-hsm_encryption to fuzz-hsm_secret --RR ]
Change in the fuzzing scheme of fuzz-hsm_encryption led to the
discovery of test inputs that result in greater in code coverage.
Add these inputs to the test's seed corpus.

[ Changed from fuzz-hsm_encryption to fuzz-hsm_secret --RR ]
@rustyrussell rustyrussell merged commit fa28e07 into ElementsProject:master Nov 10, 2025
6 of 8 checks passed
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