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

lldpad: strdup is not freed

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_8021qaz_cmds.c:1153: alloc_fn: Storage is returned from allocation function "strdup".
      lldpad-1.1.0/lldp_8021qaz_cmds.c:1153: var_assign: Assigning: "parse" = storage returned from "strdup(app)".
      lldpad-1.1.0/lldp_8021qaz_cmds.c:1156: noescape: Resource "parse" is not freed or pointed-to in "strtok".
      lldpad-1.1.0/lldp_8021qaz_cmds.c:1162: leaked_storage: Variable "parse" going out of scope leaks the storage it points to.
      # 1160|                   app_tuple = strtok(NULL, ",");
      # 1161|                   if (!app_tuple)
      # 1162|->                         break;
      # 1163|                   sel = atoi(app_tuple);
      # 1164|
      

              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: