Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content by Label
showLabelsfalse
maxResults99
label+int,+rule,-void
showSpacefalse
sorttitle
spacecom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@3bbaf8c
cqllabel = "rule" and label = "int" and label != "void" and space = currentSpace()

Info

Information for Editors
To have a new guideline automatically listed above be sure to label it int and rule.

Risk Assessment Summary

Rule

Severity

Likelihood

Detectable

Repairable

Priority

Level

INT30-CHighLikelyNoNo

P9

L2

INT31-CHighProbableNoYes

P12

L1

INT32-CHighLikelyNoYes

P18

L1

INT33-CLowLikelyNoYes

P6

L2

INT34-CLowUnlikelyNoYes

P2

L3

INT35-CLowUnlikelyNoNo

P1

L3

INT36-CLowProbableYesNo

P4

L3

Related Rules and Recommendations

Navigation Map
integer
integer
cellWidth700
wrapAfter1
cellHeight15

...

Image Added Image Added Image Added

Integer values that originate from untrusted sources must be guaranteed correct if they are used in any of the following ways:

  • as an array index
  • in any pointer arithmetic
  • as a length or size of an object
  • as the bound of an array (for example, a loop counter)
  • as an argument to a memory allocation function
  • in security critical code

Integer values can be invalidated due to excpetional conditions such as overflow, truncation, or sign error leading to exploitable vulnerabilities. Failure to provide proper range checking can also lead to exploitable vulnerabilities.

Recommendations

INT01-A. Use size_t for all integer values representing the size of an object

INT02-A. Understand integer conversion rules

INT03-A. Use a secure integer library

INT04-A. Enforce limits on integer values originating from untrusted sources

Rules

INT30-C. Do not make assumptions about the type of a bit-field when used in an expression

INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data

INT32-C. Ensure that integer operations do not result in an overflow

INT33-C. Ensure that division and modulo operations do not result in divide-by-zero errors

INT34-C. Ensure integer values are within valid ranges

INT35. Do not truncate the return value from a character input function