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

Potential use of unitialized struct members in key import

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • rhel-10.0.beta
    • rhel-10.0.beta
    • rpm
    • rpm-4.19.1.1-3.el10
    • None
    • Moderate
    • sst_cs_software_management
    • ssg_core_services
    • 24
    • 26
    • 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:
            4 Start watching this issue

              Created:
              Updated: