Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-485

Invalid read on authentication failure

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      When PLAIN authentication fails the reply is freed before the errormsg is copied.

      ==9140== Invalid read of size 1
      ==9140== at 0x63869E3: vfprintf (vfprintf.c:1642)
      ==9140== by 0x63B2C48: vsnprintf (vsnprintf.c:119)
      ==9140== by 0x77514FD: bson_vsnprintf (bson-string.c:620)
      ==9140== by 0x77459D6: bson_set_error (bson-error.c:74)
      ==9140== by 0x775E536: _mongoc_cluster_auth_node_plain (mongoc-cluster.c:1649)
      ==9140== by 0x775F052: _mongoc_cluster_auth_node (mongoc-cluster.c:1888)
      ==9140== by 0x775F406: _mongoc_cluster_reconnect_direct (mongoc-cluster.c:1985)
      ==9140== by 0x77606CE: _mongoc_cluster_reconnect (mongoc-cluster.c:2410)
      ==9140== by 0x775C0FA: _mongoc_cluster_preselect (mongoc-cluster.c:881)
      ==9140== by 0x7758662: _mongoc_client_preselect (mongoc-client.c:1158)
      ==9140== by 0x77851E5: _mongoc_write_command_execute (mongoc-write-command.c:773)
      ==9140== by 0x7756239: mongoc_bulk_operation_execute (mongoc-bulk-operation.c:339)
      ==9140== Address 0x7e48e96 is 38 bytes inside a block of size 64 free'd
      ==9140== at 0x4C2BE10: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==9140== by 0x8C264D: _efree (zend_alloc.c:2437)
      ==9140== by 0x7792E90: php_phongo_free (php_phongo.c:1358)
      ==9140== by 0x774EFBF: bson_free (bson-memory.c:216)
      ==9140== by 0x77434F1: bson_destroy (bson.c:2153)
      ==9140== by 0x775E507: _mongoc_cluster_auth_node_plain (mongoc-cluster.c:1648)
      ==9140== by 0x775F052: _mongoc_cluster_auth_node (mongoc-cluster.c:1888)
      ==9140== by 0x775F406: _mongoc_cluster_reconnect_direct (mongoc-cluster.c:1985)
      ==9140== by 0x77606CE: _mongoc_cluster_reconnect (mongoc-cluster.c:2410)
      ==9140== by 0x775C0FA: _mongoc_cluster_preselect (mongoc-cluster.c:881)
      ==9140== by 0x7758662: _mongoc_client_preselect (mongoc-client.c:1158)
      ==9140== by 0x77851E5: _mongoc_write_command_execute (mongoc-write-command.c:773)
      ==9140==

            Assignee:
            Unassigned Unassigned
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: