Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic in decode discovered during fuzz testing #417

Open
DavidLeeds opened this issue Mar 5, 2025 · 1 comment
Open

Panic in decode discovered during fuzz testing #417

DavidLeeds opened this issue Mar 5, 2025 · 1 comment

Comments

@DavidLeeds
Copy link

https://github.com/librasn/rasn/blob/d97c44d4a58076738a2eab345101cc763ccb2178/src/ber/de.rs#L208C49-L208C55

thread fuzz_fail' panicked at .../.cargo/registry/src/index.crates.io-6f17d22bba15001f/rasn-0.24.0/src/ber/de.rs:208:55:
byte index 8 is not a char boundary; it is inside 'Ҡ' (bytes 7..9) of `+Ҡ+++'`

It appears that some additional input validation is needed to screen out unacceptable UTF-8 characters prior to indexing into the string in parse_any_generalized_time_string(). Indexing is also done here.

@XAMPPRocky
Copy link
Collaborator

Thank you for your issue! I don't have the capacity to write the fix, but I'm happy to review a PR 🙂

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

No branches or pull requests

2 participants