Skip to content

[WRAPPER] Fix UAF for gpgme_data_new_from_cbs reported in #4214 - #4240

Open
zengdage wants to merge 1 commit into
ptitSeb:mainfrom
zengdage:fix-gpgme-data
Open

[WRAPPER] Fix UAF for gpgme_data_new_from_cbs reported in #4214#4240
zengdage wants to merge 1 commit into
ptitSeb:mainfrom
zengdage:fix-gpgme-data

Conversation

@zengdage

Copy link
Copy Markdown
Contributor

gpgme_data_release is invoked without explicitly passing cbs. As cbs reside inside a union, fetching the cbs is a bit complicated, so no cleanup helper is provided. In practice, there are probably few cbs instances, analogous to cbs->release that only has five available slots.

If you think omitting cleanup for gpgme_data_cbs is not correct way, I can make further changes.

gpgme_data_new_from_cbs in:
https://github.com/gpg/gpgme/blob/master/src/data-user.c#L99

cbs
https://github.com/gpg/gpgme/blob/master/src/data.h#L135

`gpgme_data_release` is invoked without explicitly passing `cbs`. As `cbs`
reside inside a union, fetching the `cbs` is a bit complicated, so no cleanup
helper is provided.

In practice, there are probably few cbs instances, analogous to `cbs->release`
that only has five available slots.

`gpgme_data_new_from_cbs` in:
https://github.com/gpg/gpgme/blob/master/src/data-user.c#L99
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