Uploaded image for project: 'OpenDNSSEC TRAC Import'
  1. OpenDNSSEC TRAC Import
  2. ODSTRACIMPORT-111

Missing sanity check in hsm_get_dnskey()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: None
    • Component/s: Unknown
    • Labels:
      None

      Description

      If a HSM has a private key but not a public key, and the key was imported with ods-ksmutil key import, ods-ksmutil key list -verbose propagates error to ldns where it aborts with a meaningless assert:

      # ods-ksmutil key list --verbose 
      SQLite database set to: /var/opendnssec/kasp.db
      Keys:
      Zone:                           Keytype:      State:    Date of next transition:  CKA_ID:                           Repository:                       Keytag:
      ....
      ods-ksmutil: rdata.c:26: ldns_rdf_size: Assertion `rd != ((void *)0)' failed.
      cz                              ZSK           publish   2010-03-13 04:00:00       Aborted
      

      One culprit is in hsm_get_dnskey() in libhsm, as it does not check return code from hsm_get_key_rdata().

      2301	    ldns_rr_push_rdf(dnskey, hsm_get_key_rdata(ctx, session, key));
      

        Attachments

          Activity

            People

            Assignee:
            jakob Jakob Schlyter
            Reporter:
            jaroslav.benkovsky@nic.cz jaroslav.benkovsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: