Skip to content

The channel binding data dynbuf was not set correctly #15685

@galen11

Description

@galen11

I did this

‎lib/http_negotiate.c

/* Check if the connection is using SSL and get the channel binding data */
#ifdef HAVE_GSSAPI
  if(conn->handler->flags & PROTOPT_SSL) {
    Curl_dyn_init(&neg_ctx->channel_binding_data, SSL_CB_MAX_SIZE);
    result = Curl_ssl_get_channel_binding(
      data, FIRSTSOCKET, &neg_ctx->channel_binding_data);
    if(result) {
      Curl_http_auth_cleanup_negotiate(conn);
      return result;
    }
  }
#endif

The channel binding data dynbuf was not set correctly. toobig should be set to the actual data length plus 1. Otherwise, dyn_nappend will fail with CURLE_TOO_LARGE.
To address this, toobig should be set to SSL_CB_MAX_SIZE + 1 when Curl_dyn_init.

The issue was from an enhancement of cURL, see 0a5ea09

I expected the following

No response

curl/libcurl version

curl 8.10.1

operating system

RedHat / Rocky Linux

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions