Skip to content

Use of uninitialized variable in dns_resource_record_to_string #11733

@mrc0mmand

Description

@mrc0mmand

Another result of #11730.

WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7fd96a3dcd11 in base64_append /build/build/../src/basic/hexdecoct.c:637:30
    #1 0x510cac in dns_resource_record_to_string /build/build/../src/resolve/resolved-dns-rr.c:975:21
    #2 0x49bf6e in verify_rr_copy /build/build/../src/resolve/test-dns-packet.c:30:9
    #3 0x49a0b5 in test_packet_from_file /build/build/../src/resolve/test-dns-packet.c:69:17
    #4 0x498217 in main /build/build/../src/resolve/test-dns-packet.c:113:17
    #5 0x7fd96961909a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #6 0x420849 in _start (/build/build/test-dns-packet+0x420849)

  Uninitialized value was stored to memory at
    #0 0x7fd96a3dcaeb in base64_append /build/build/../src/basic/hexdecoct.c:635
    #1 0x510cac in dns_resource_record_to_string /build/build/../src/resolve/resolved-dns-rr.c:975:21
    #2 0x49bf6e in verify_rr_copy /build/build/../src/resolve/test-dns-packet.c:30:9
    #3 0x49a0b5 in test_packet_from_file /build/build/../src/resolve/test-dns-packet.c:69:17
    #4 0x498217 in main /build/build/../src/resolve/test-dns-packet.c:113:17
    #5 0x7fd96961909a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)

  Uninitialized value was created by an allocation of 'n' in the stack frame of function 'dns_resource_record_to_string'
    #0 0x50b700 in dns_resource_record_to_string /build/build/../src/resolve/resolved-dns-rr.c:810

SUMMARY: MemorySanitizer: use-of-uninitialized-value /build/build/../src/basic/hexdecoct.c:637:30 in base64_append
Exiting

https://github.com/systemd/systemd/blob/master/src/resolve/resolved-dns-rr.c#L954-L995

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions