Artifacts Associated With Ticket bad6cc213dfe8280
Ticket change [813cbff8b7] (rid 195003) by salmonx on 2021-06-22 07:33:42:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/html"
- comment initialized 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 initialized to: "ALL"
- is_private initialized to: "0"
- login: "salmonx"
- priority initialized to: "5 Medium"
- private_contact initialized to: "1e6726276a059d4157d886e633147205cbd8e399"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "salmonx"
- subsystem initialized to: "69. Other"
- title initialized to:
A format string vulnerability in Tcl nmakehelp.c allows code execution via a crated file.
- type initialized to: "Bug"
Ticket change [b905b3d21a] (rid 195009) by jan.nijtmans on 2021-06-22 09:11:53:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2459387.88325626"
- closer changed to: "jan.nijtmans"
- icomment:
See also [https://sqlite.org/forum/forumpost/47c7eb6802]. Let's repeat the conclusion here: "This Is Not A Tcl Vulnerability"! Same arguments as DRH wrote in the SQLite forum post. That said, it's fixed here: [28ef6c0c741408a2]
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- severity changed to: "Cosmetic"
- status changed to: "Closed"
Ticket change [686a2ddb91] (rid 195118) by jan.nijtmans on 2021-07-01 06:22:34:
- closedate changed to: "2459396.76567512"
- icomment:
This issue has been assigned a CVE number: CVE-2021-35331
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"