JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.0p0 Hot Tips | CONFIDENTIAL | CodeSecure Inc |
The Installation manual section provides instructions for installing CodeSonar.
For Windows users without Administrator privileges, some additional steps are required. The simplest solution is to acquire these privileges, but if this is not possible then the additional steps are as follows. Note that non-Administrators are not able to create Windows services, so it will not be possible to run the CodeSonar hub or launch daemon as services.
A number of new warning classes have been introduced in this version of CodeSonar. Many of the new clases are in support of the "Build Security In" (BSI) Checks.
There are a number of extensions and improvements to the CodeSonar Web GUI.
The warning mnemonic hierarchy has been restructured for additional clarity. The following mnemonics have changed.
| Previous Mnemonic | New Mnemonic | Class Name |
|---|---|---|
| LANG.ALLOC.DF | ALLOC.DF | Double Free |
| LANG.ALLOC.FNH | ALLOC.FNH | Free Non-Heap Variable |
| LANG.ALLOC.FNP | ALLOC.FNP | Free Null Pointer |
| LANG.ALLOC.IOAS | ALLOC.IOAS | Integer Overflow of Allocation Size |
| LANG.ALLOC.LEAK | ALLOC.LEAK | Leak |
| LANG.ALLOC.MO | ALLOC.MO | Misaligned Object |
| LANG.ALLOC.RPF | ALLOC.RPF | Return Pointer To Freed |
| LANG.ALLOC.TM | ALLOC.TM | Type Mismatch |
| LANG.ALLOC.UAF | ALLOC.UAF | Use After Free |
| LANG.TYPE.NEGCHAR | MISC.NEGCHAR | Negative Character Value |
| POSIX.FMT | MISC.FMT | Format String |
| POSIX.FUNCS.INSECURE | BADFUNC.BO.GETS | Use of gets |
| BADFUNC.CRYPT | Use of crypt | |
| BADFUNC.TEMP.MKTEMP | Use of mktemp | |
| BADFUNC.TEMP.TMPFILE | Use of tmpfile | |
| BADFUNC.TEMP.TMPNAM | Use of tmpnam | |
| POSIX.FUNCS.LONGJMP | BADFUNC.LONGJMP | Use of longjmp |
| POSIX.FUNCS.NOEFFECT | MISC.NOEFFECT | Function Call Has No Effect |
| POSIX.FUNCS.SETJMP | BADFUNC.SETJMP | Use of setjmp |
| POSIX.IO.DC | IO.DC | Double Close |
| POSIX.IO.NEGFD | IO.NEGFD | Negative File Descriptor |
| POSIX.IO.UAC | IO.UAC | Use After Close |
| POSIX.MEM.CU | MISC.MEM.SU | Unreasonable Size Argument |
| POSIX.MEM.LU | MISC.MEM.SU | Unreasonable Size Argument |
| POSIX.MEM.OR | MISC.MEM.OR | Overlapping Memory Regions |
| POSIX.RACE.AO | IO.RACE | File System Race Condition |
| POSIX.RACE.TOCTTOU | IO.RACE | File System Race Condition |
| POSIX.SOCK.STATE | IO.SOCK.STATE | Socket In Wrong State |
| POSIX.STRINGS.NTERM | MISC.MEM.NTERM | No Space For Null Terminator |
| POSIX.THREAD.DL | CONCURRENCY.DL | Double Lock |
| POSIX.THREAD.DU | CONCURRENCY.DU | Double Unlock |
| POSIX.THREAD.TL | CONCURRENCY.TL | Try-lock that will never succeed |
| WIN32.SYNC.DEADLOCK | CONCURRENCY.DEADLOCK | Deadlock |
Some classes have been restructured, and some class names changed.
| Previous Class Name | New Class Name |
|---|---|
| accept on socket in wrong state | Socket In Wrong State |
| access After Open | File System Race Condition |
| alloca Buffer Length Unreasonable | Unreasonable Size Argument |
| bcopy Length Unreasonable | Unreasonable Size Argument |
| bind on socket in wrong state | Socket In Wrong State |
| Call to longjmp | Use of longjmp |
| Call to setjmp | Use of setjmp |
| calloc Object Count Unreasonable | Unreasonable Size Argument |
| calloc Object Length Unreasonable | Unreasonable Size Argument |
| chown After Open | File System Race Condition |
| connect on socket in wrong state | Socket In Wrong State |
| Dangerous Function | Use of gets |
| Insecure Randomness | Use of crypt |
| Insecure Temporary File | Use of mktemp |
| Use of tmpfile | |
| Use of tmpnam | |
| listen on socket in wrong state | Socket In Wrong State |
| malloc Buffer Length Unreasonable | Unreasonable Size Argument |
| memccpy Length Unreasonable | Unreasonable Size Argument |
| memccpy With Overlapping Regions | Overlapping Memory Regions |
| memcpy Length Unreasonable | Unreasonable Size Argument |
| memcpy With Overlapping Regions | Overlapping Memory Regions |
| realloc Buffer Length Unreasonable | Unreasonable Size Argument |
| recv on socket in wrong state | Socket In Wrong State |
| recvfrom on socket in wrong state | Socket In Wrong State |
| recvmsg on socket in wrong state | Socket In Wrong State |
| send on socket in wrong state | Socket In Wrong State |
| stat After Open | File System Race Condition |
| strcpy With Overlapping Regions | Overlapping Memory Regions |
| strncpy Does Not Null-terminate | No Space For Null Terminator |
| strncpy Length Unreasonable | Unreasonable Size Argument |
| strncpy With Overlapping Regions | Overlapping Memory Regions |
The normalized form for array assignment has changed. This may affect users who have custom-written code for processing ASTs.
| Normalized Form | RHS Type | Pattern | |
|---|---|---|---|
| Old: | *&ar[0] = ( 1, 2, 3 ) | int (element type) |
(c:ptr
:type ?lhs-type
:1 (c:addr
:1 (c:array-ref
:1 (and (c:variable :type (and (c:array) ?array-type)) ?id)
:2 (c:integer-value :value 0)
)))
))
|
| New: | ar = ( 1, 2, 3 ) | int[3] (expression type) |
(and (c:variable :type (and (c:array) ?lhs-type ?array-type)) ?id) |
The following new normalized AST classes have been added to the hierarchy.
The following normalized AST classes have been modified.