#539 LDAP access provider may dereference NULL if ldap_access_filter is unspecified
Closed: Fixed None Opened 13 years ago by sgallagh.

From Coverity:

At conditional (1): "filter == NULL" taking the true branch.
Comparing "filter" to null implies that "filter" might be null.
  237    if (filter == NULL) {
  238        /* It's okay if this is NULL. In that case we will simply act
  239         * like the 'deny' provider.
  240         */
At conditional (2): "0 <= debug_level" taking the true branch.
At conditional (3): "debug_timestamps" taking the true branch.
  241        DEBUG(0, ("Warning: access_provider=ldap set, "
  242                  "but no ldap_access_filter configured. "
  243                  "All domain users will be denied access.\n"));
  244    }
  245
Dereferencing null variable "filter".
  246    if (filter[0] == '(') {
  247        /* This filter is wrapped in parentheses.
  248         * Pass it as-is to the openldap libraries.
  249         */
  250        access_ctx->filter = filter;
  251    }
  252    else {
  253        /* Add parentheses around the filter */
  254        access_ctx->filter = talloc_asprintf(access_ctx, "(%s)", filter);
  255        if (access_ctx->filter == NULL) {
  256            ret = ENOMEM;
  257            goto done;
  258        }
  259    }

Fixed by bdf389a

fixedin: => 1.2.1
resolution: => fixed
status: new => closed

Fields changed

rhbz: => 0

Metadata Update from @sgallagh:
- Issue assigned to sgallagh
- Issue set to the milestone: SSSD 1.2.1

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/1581

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata