Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-70562

MemorySanitizer: use-of-uninitialized-value in util/net_help.c:709:10

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.4, rhel-9.5
    • unbound
    • None
    • No
    • None
    • rhel-sst-cs-net-perf-services
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      Running Open vSwitch tests under memory sanitizer reports use of uninitialized memory inside unbound library while calling ub_resolve_async():

      Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x70b0000000cc, 4)
      ==524460==WARNING: MemorySanitizer: use-of-uninitialized-value
          #0 0x473039 in memcmp (/root/ovs/vswitchd/ovs-vswitchd+0x473039) (BuildId: 60e1f1ef4406f29b734c60c71c8226e131618652)
          #1 0x7f337fa2ba31  /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/util/net_help.c:709:10
          #2 0x7f337fa2ba31  /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/util/net_help.c:690:1
          #3 0x7f337fa2ba31  /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/iterator/iter_delegpt.c:163:6
          #4 0x7f337f97eb66  /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/iterator/iter_delegpt.c:657:10
          #5 0x7f337fa0c893  /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/iterator/iter_delegpt.c:713:9
          #6 0x7f337f97f10f in ah /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/iterator/iter_hints.c:104:6
          #7 0x7f337f966461  /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/iterator/iter_hints.c:132:6
          #8 0x7f337f966461  /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/iterator/iter_hints.c:454:24
          #9 0x7f337f966461 in libworker_setup /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/libunbound/libworker.c:167:23
          #10 0x7f337f95d126 in libworker_bg /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/libunbound/libworker.c:395:7
          #11 0x7f337f95d126 in ub_resolve_async /usr/src/debug/unbound-1.16.2-3.el9_3.5.x86_64/unbound-1.16.2/libunbound/libunbound.c:807:7
          #12 0x132001d in resolve_async__ /root/ovs/lib/dns-resolve.c:245:18
          #13 0x131eba0 in dns_resolve /root/ovs/lib/dns-resolve.c:177:19
          #14 0x109c6d4 in parse_sockaddr_components_dns /root/ovs/lib/socket-util.c:439:5
          #15 0x109195d in parse_sockaddr_components /root/ovs/lib/socket-util.c:510:13
          #16 0x10902c3 in inet_parse_active /root/ovs/lib/socket-util.c:559:14
          #17 0x1091f4a in inet_open_active /root/ovs/lib/socket-util.c:597:10
          #18 0x15980ab in tcp_open /root/ovs/lib/stream-tcp.c:56:13
          #19 0x10bd41a in stream_open /root/ovs/lib/stream.c:233:13
          #20 0x10c3080 in stream_open_with_default_port /root/ovs/lib/stream.c:749:13
          #21 0x159a8e4 in vconn_stream_open /root/ovs/lib/vconn-stream.c:81:13
          #22 0x1144bbd in vconn_open /root/ovs/lib/vconn.c:250:13
          #23 0x1016ff4 in reconnect /root/ovs/lib/rconn.c:467:14
          #24 0x10164a9 in rconn_connect /root/ovs/lib/rconn.c:352:5
          #25 0x7fa693 in ofservice_create /root/ovs/ofproto/connmgr.c:1930:9
          #26 0x7f8e6a in connmgr_set_controllers /root/ovs/ofproto/connmgr.c:589:13
          #27 0x562a4f in ofproto_set_controllers /root/ovs/ofproto/ofproto.c:656:5
          #28 0x4edac0 in bridge_configure_remotes /root/ovs/vswitchd/bridge.c:4099:5
          #29 0x4d565d in bridge_reconfigure /root/ovs/vswitchd/bridge.c:993:9
          #30 0x4d1746 in bridge_run /root/ovs/vswitchd/bridge.c:3439:9
          #31 0x52f517 in main /root/ovs/vswitchd/ovs-vswitchd.c:137:9
          #32 0x7f337f6295cf in __libc_start_call_main /usr/src/debug/glibc-2.34-125.el9_5.1.x86_64/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #33 0x7f337f62967f in __libc_start_main@GLIBC_2.2.5 /usr/src/debug/glibc-2.34-125.el9_5.1.x86_64/csu/../csu/libc-start.c:389:3
          #34 0x432b54 in _start (/root/ovs/vswitchd/ovs-vswitchd+0x432b54) (BuildId: 60e1f1ef4406f29b734c60c71c8226e131618652)
      
      SUMMARY: MemorySanitizer: use-of-uninitialized-value (/root/ovs/vswitchd/ovs-vswitchd+0x473039) (BuildId: 60e1f1ef4406f29b734c60c71c8226e131618652) in memcmp
      

      What is the impact of this issue to you?

      This doesn't allow us to run OVS tests under memory sanitizer properly as we get unrelated errors that stop the process execution.

      Please provide the package NVR for which the bug is seen:

      unbound-1.16.2-3.el9_3.5.x86_64

      How reproducible is this bug?: 100%

      Steps to reproduce

      1.  Build an application that uses ub_resolve_async() with CC=clang CFLAGS='-fsanitize=memory'
      2.  Run it.
      3.  Observe the memory sanitizer error.

      Expected results

      No use of uninitialized memory.

      Actual results

      Use of uninitialized memory.

              pemensik@redhat.com Petr Mensik
              imaximet@redhat.com Ilya Maximets
              Petr Mensik Petr Mensik
              rhel-cs-infra-services-qe rhel-cs-infra-services-qe rhel-cs-infra-services-qe rhel-cs-infra-services-qe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: