Skip to content

Couple of SEGFAULTS - Null pointer dereference #27

Description

@sravan0x00

Hi,

In below code block of ngx_openidc_handler, variable ctx is NULL and this NULL pointer is de-referenced, causing SEGFAULT. I think it can be replaced with NGINX native logging function, until ctx is initialized properly.

	if (cfg == NULL) {
		oauth2_warn(ctx->log,
			    "ngx_http_get_module_loc_conf returned NULL");
		rv = NGX_ERROR;
		goto end;
	}
	ctx = oauth2_nginx_request_context_init(r);
	if (ctx == NULL) {
		oauth2_warn(ctx->log,
			    "openidc_nginx_request_context_init returned NULL");
		rv = NGX_ERROR;
		goto end;
	}

Thanks,
Sravan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions