Coverity TOCTOU - CID 12544 - compizconfig/libcompizconfig/src/compiz.cpp - in function: loadOptionsStringExtensionsFromXML(_CCSPlugin *, void *, stat *) - Calling function "stat(char const *, stat *)" to perform check on "pPrivate->xmlFile" in line 3174, 3 lines later calling function "fopen(char const *, char const *)" that uses "pPrivate->xmlFile" after a check function. This can cause a time-of-check, time-of-use race condition.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Compiz |
Fix Released
|
Low
|
Stephen M. Webb | ||
0.9.9 |
Won't Fix
|
Low
|
Unassigned | ||
compiz (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This bug is exported from the Coverity Integration Manager on Canonical's servers. For information on how this is done please see this website: https:/
CID: 12544
Checker: TOCTOU
Category: No category available
CWE definition: http://
File: /tmp/buildd/
Function: loadOptionsStri
Code snippet:
3170 xmlDoc *doc = NULL;
3171 xmlNode **nodes;
3172 int num;
3173
CID 12544 - TOCTOU
Calling function "stat(char const *, stat *)" to perform check on "pPrivate-
3174 if (stat (pPrivate->xmlFile, xmlStat))
3175 return;
3176
CID 12544 - TOCTOU
Calling function "fopen(char const *, char const *)" that uses "pPrivate->xmlFile" after a check function. This can cause a time-of-check, time-of-use race condition.
3177 FILE *fp = fopen (pPrivate->xmlFile, "r");
3178 if (!fp)
3179 return;
Related branches
- Christopher Townsend (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 126 lines (+52/-30)1 file modifiedcompizconfig/libcompizconfig/src/compiz.cpp (+52/-30)
summary: |
- Coverity TOCTOU - CID 12544 + Coverity TOCTOU - CID 12544 - + compizconfig/libcompizconfig/src/compiz.cpp - in function: + loadOptionsStringExtensionsFromXML(_CCSPlugin *, void *, stat *) - + Calling function "stat(char const *, stat *)" to perform check on + "pPrivate->xmlFile" in line 3174, 3 lines later calling function + "fopen(char const *, char const *)" that uses "pPrivate->xmlFile" after + a check function. This can cause a time-of-check, time-of-use race + condition. |
Changed in compiz: | |
milestone: | none → 0.9.10.0 |
Changed in compiz: | |
milestone: | 0.9.10.0 → 0.9.10.2 |
Changed in compiz: | |
milestone: | 0.9.10.2 → 0.9.11.0 |
Changed in compiz: | |
milestone: | 0.9.11.0 → 0.9.12.1 |
status: | New → Triaged |
Changed in compiz: | |
assignee: | nobody → Stephen M. Webb (bregma) |
status: | Triaged → In Progress |
Changed in compiz: | |
status: | In Progress → Fix Committed |
Changed in compiz: | |
status: | Fix Committed → Fix Released |
Source file with Coverity annotations.