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

lldpad: resource leak as not free allocated memory

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-9.6
    • rhel-10.0
    • lldpad
    • None
    • lldpad-1.1.1-3.gitf1dd9eb.el9
    • None
    • Moderate
    • rhel-net-core
    • ssg_networking
    • 5
    • 11
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      Error: RESOURCE_LEAK (CWE-772):
      lldpad-1.1.0/lldp_util.c:1279: alloc_fn: Storage is returned from allocation function "realloc".
      lldpad-1.1.0/lldp_util.c:1279: var_assign: Assigning: "p" = storage returned from "realloc(arglens, (i / 8 + 1) * 8 * 4UL)".
      lldpad-1.1.0/lldp_util.c:1285: var_assign: Assigning: "arglens" = "p".
      lldpad-1.1.0/lldp_util.c:1291: leaked_storage: Variable "arglens" going out of scope leaks the storage it points to.
      # 1289|                           if (!p) {
      # 1290|                                   free(argvallens);
      # 1291|->                                 return 0;
      # 1292|                           } else {
      # 1293|                                   argvallens = p;
      

              haliu@redhat.com Hangbin Liu
              haliu@redhat.com Hangbin Liu
              Hangbin Liu Hangbin Liu
              Fei Liu Fei Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: