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

Potential use of unitialized struct members in key import

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Critical Critical
    • rhel-9.5
    • rhel-9.5
    • rpm
    • rpm-4.16.1.3-31.el9
    • None
    • Moderate
    • rhel-sst-cs-software-management
    • ssg_core_services
    • 20
    • 22
    • None
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • Release Note Not Required
    • All
    • None

      Findings from https://issues.redhat.com/browse/RHEL-22390:

      Error: UNINIT (CWE-457):
      rpm-4.16.1.3/lib/rpmts.c:478: var_decl: Declaring variable "kd" without initializer.
      rpm-4.16.1.3/lib/rpmts.c:537: uninit_use_in_call: Using uninitialized value "kd.signid" when calling "finiPgpData".
      rpm-4.16.1.3/lib/rpmts.c:537: uninit_use_in_call: Using uninitialized value "kd.timestr" when calling "finiPgpData".
      rpm-4.16.1.3/lib/rpmts.c:537: uninit_use_in_call: Using uninitialized value "kd.verid" when calling "finiPgpData".

      1. 535| headerFree(h);
      2. 536| pgpFreeDig(dig);
      3. 537|-> finiPgpData(&kd);
      4. 538| free(enc);
      5. 539| free(d);

       

      In the unlikely case that base64 encoding of a pubkey data fails, the code will try to free uninitialized pointers.

              mdomonko@redhat.com Michal Domonkos
              rhn-support-pmatilai Panu Matilainen
              packaging-team-maint packaging-team-maint
              Tomas Bajer Tomas Bajer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: