Overview
| Artifact ID: | 813cbff8b74759f2915b15e01bcfd2b4f3eb6f95a84d715105783bf753d524e0 |
|---|---|
| Ticket: | bad6cc213dfe8280c25b3bfe3e5830e9e2481f91
A format string vulnerability in Tcl nmakehelp.c allows code execution via a crated file. |
| User & Date: | salmonx on 2021-06-22 07:33:42 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/html"
- comment changed to:
<p>Description: The 'printf' in 'SubstituteFile' accepts a format string as an argument, but the format string originates from the argv[3] which is controlled by user. </p> <p>Fix: printf("%s", szBuffer);</p> <hr> <pre> static int SubstituteFile( const char *substitutions, const char *filename) { ... /* * Run the substitutions over each line of the input */ while (fgets(szBuffer, cbBuffer, fp) != NULL) { list_item_t *p = NULL; for (p = substPtr; p != NULL; p = p->nextPtr) { char *m = strstr(szBuffer, p->key); if (m) { char *cp, *op, *sp; cp = szCopy; op = szBuffer; while (op != m) *cp++ = *op++; sp = p->value; while (sp && *sp) *cp++ = *sp++; op += strlen(p->key); while (*op) *cp++ = *op++; *cp = 0; memcpy(szBuffer, szCopy, sizeof(szCopy)); } } printf(szBuffer); // Bug is here, szBuffer can be controlled } list_free(&substPtr); } fclose(fp); return 0; } </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 format string vulnerability in Tcl nmakehelp.c allows code execution via a crated file.
- type changed to: "Bug"