#712 Uninitialized pointer read in ipa-join
Closed: Fixed None Opened 13 years ago by jhrozek.

keytab is not initialized at the beginning of ipa-join.c:

613    krb5_context krbctx = NULL;
Declaring variable "keytab" without initializer.
 614    krb5_keytab keytab;

If krb5_init_context() fails:

 659    krberr = krb5_init_context(&krbctx);
At conditional (6): "krberr" taking the true branch.
 660    if (krberr) {
At conditional (7): "!quiet" taking the true branch.
 661        if (!quiet)
 662            fprintf(stderr, _("Unable to join host: "
 663                              "Kerberos context initialization failed\n"));
 664        rval = 1;
 665        goto cleanup;
 666    }

In cleanup, we try to free keytab:

 773cleanup:
 774
Using uninitialized value "keytab" when calling "krb5_kt_close".
 775    krb5_kt_close(krbctx, keytab);

Metadata Update from @jhrozek:
- Issue assigned to mkosek
- Issue set to the milestone: FreeIPA 2.0 - 2011/01 (cleanup)

7 years ago

Login to comment on this ticket.

Metadata