Overview
| Artifact ID: | 2bb7aed66ad4c8cb8cf127bf3983a6a54ef6ea1f1c5edb8cd6dffa724363956d |
|---|---|
| Ticket: | 7079e4f91601e9c784e151e86c9d7821afdd45fe
A stack overflow vulnerability in Tcl nmakehelp.c allows code execution via a crated file |
| User & Date: | salmonx on 2021-06-22 07:49:25 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/html"
- comment changed to:
<p> A stack overflow vulnerability in Tcl nmakehelp.c allows code execution via a crated file </p> <p> The length of local variable 'szBuffer' in GetVersionFromFile is 100. szBuffer can be controlled via crafted argv. </p> <hr> <pre> static const char * GetVersionFromFile( const char *filename, const char *match, int numdots) { size_t cbBuffer = 100; static char szBuffer[100]; char *szResult = NULL; FILE *fp = fopen(filename, "rt"); if (fp != NULL) { /* * Read data until we see our match string. */ while (fgets(szBuffer, cbBuffer, fp) != NULL) { LPSTR p, q; p = strstr(szBuffer, match); if (p != NULL) { /* * Skip to first digit after the match. */ p += strlen(match); while (*p && !isdigit(*p)) { ++p; } /* * Find ending whitespace. */ q = p; while (*q && (strchr("0123456789.ab", *q)) && ((!strchr(".ab", *q) && (!strchr("ab", q[-1])) || --numdots))) { ++q; } memcpy(szBuffer, p, q - p); // Bug is here szBuffer[q-p] = 0; szResult = szBuffer; break; } } fclose(fp); } return szResult; } </pre> - foundin changed to: "ALL"
- is_private changed to: "0"
- login: "salmonx"
- priority changed to: "5 Medium"
- private_contact changed to: "1e6726276a059d4157d886e633147205cbd8e399"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "salmonx"
- subsystem changed to: "69. Other"
- title changed to:
A stack overflow vulnerability in Tcl nmakehelp.c allows code execution via a crated file
- type changed to: "Bug"