Repository navigation
resolve: fix heap-use-after-free and uninitialized memory - #9572
Merged
Merged
Conversation
This fixes the following valgrind warning: ``` Syscall param sendmsg(msg.msg_name) points to uninitialised byte(s) at 0x6189CC1: sendmsg (in /usr/lib64/libpthread-2.27.so) by 0x153082: dns_stream_writev (resolved-dns-stream.c:235) by 0x153343: dns_stream_tls_writev (resolved-dns-stream.c:299) by 0x5B30343: ??? (in /usr/lib64/libgnutls.so.30.20.2) by 0x5B3158F: ??? (in /usr/lib64/libgnutls.so.30.20.2) by 0x5B33190: ??? (in /usr/lib64/libgnutls.so.30.20.2) by 0x5B36307: ??? (in /usr/lib64/libgnutls.so.30.20.2) by 0x5B37D47: gnutls_handshake (in /usr/lib64/libgnutls.so.30.20.2) by 0x154591: dns_stream_connect_tls (resolved-dns-stream.c:596) by 0x13A889: dns_transaction_emit_tcp (resolved-dns-transaction.c:676) by 0x13D901: dns_transaction_go (resolved-dns-transaction.c:1761) by 0x1330C8: dns_query_candidate_go (resolved-dns-query.c:156) Address 0xa9ac268 is 312 bytes inside a block of size 592 alloc'd at 0x4C30B06: calloc (vg_replace_malloc.c:711) by 0x1541F8: dns_stream_new (resolved-dns-stream.c:545) by 0x13A662: dns_transaction_emit_tcp (resolved-dns-transaction.c:642) by 0x13D901: dns_transaction_go (resolved-dns-transaction.c:1761) by 0x1330C8: dns_query_candidate_go (resolved-dns-query.c:156) by 0x134E16: dns_query_go (resolved-dns-query.c:757) by 0x11F3FB: bus_method_resolve_hostname (resolved-bus.c:353) by 0x4F947A7: method_callbacks_run (bus-objects.c:402) by 0x4F97266: object_find_and_run (bus-objects.c:1260) by 0x4F978B1: bus_process_object (bus-objects.c:1376) by 0x4FAF82C: process_message (sd-bus.c:2661) by 0x4FAFA1B: process_running (sd-bus.c:2703) ```
Contributor
|
@yuwata thank you! Just out of curiosity, what version of |
Member
Author
|
I've investigated this with
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9511.
cc @evverx and @irtimmer.