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

dnsmasq SAST: Error: UNINIT (CWE-457): dnsmasq-2.85/src/forward.c:65: var_decl: Declaring variable "p" without initializer.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-10.0
    • rhel-9.3.0
    • dnsmasq
    • None
    • None
    • 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?

      Error: UNINIT (CWE-457):
      dnsmasq-2.85/src/forward.c:65: var_decl: Declaring variable "p" without initializer.
      dnsmasq-2.85/src/forward.c:69: uninit_use_in_call: Using uninitialized value "p". Field "p.ipi_addr" is uninitialized when calling "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.]
      #   67|             p.ipi_spec_dst = source->addr4;
      #   68|             msg.msg_controllen = CMSG_SPACE(sizeof(struct in_pktinfo));
      #   69|->           memcpy(CMSG_DATA(cmptr), &p, sizeof(p));
      #   70|             cmptr->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo));
      #   71|             cmptr->cmsg_level = IPPROTO_IP;
      

      Please provide the package NVR for which bug is seen:

      How reproducible:

      Steps to reproduce

      Expected results

      Actual results

              pemensik@redhat.com Petr Mensik
              pemensik@redhat.com Petr Mensik
              Petr Mensik Petr Mensik
              Petr Sklenar Petr Sklenar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: