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

Load of misaligned address in yh_util_import_wrapped() #414

Open
invd opened this issue Aug 20, 2024 · 0 comments
Open

Load of misaligned address in yh_util_import_wrapped() #414

invd opened this issue Aug 20, 2024 · 0 comments

Comments

@invd
Copy link

invd commented Aug 20, 2024

During fuzzing, I've found the following with -fsanitize=undefined:

runtime error: load of misaligned address 0x7b025caee261 for type 'uint16_t' (aka 'unsigned short'), which requires 2 byte alignment

at the code position in yh_util_import_wrapped():

*target_id = ntohs(*((uint16_t *) (response + 1)));

This is undefined behavior (UB) and therefore a bug.

yh_util_import_rsa_wrapped() appears to have a second instance of this pattern that is also triggered:

*target_id = ntohs(*((uint16_t *) (response + 1)));

@invd invd changed the title load of misaligned address in yh_util_import_wrapped() Load of misaligned address in yh_util_import_wrapped() Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant