Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.8 KB

README.rst

File metadata and controls

48 lines (34 loc) · 1.8 KB
Root.Security Parent Index
Sibling aspects Metadata Redundancy Smell Spelling

Security

This aspects checks for code with flaws (or security weaknesses) in your codebase.

Subaspects

This aspect does not have any sub aspects.

Example

char buf[1024];
ssizet_t len;
if ((len = readlink("/modules/pass1", buf, sizeof(buf)-1)) != -1)
    buf[len] = '';

Importance

Security weaknesses can enable malicious users to bypass access controls in order to obtain unauthorized privileges, which may result in:

  • Data loss or corruption
  • Denial of access
  • Complete host system takeover

How to fix this

Some few ways to reduce the chance of a vulnerability being used against a system are: the use methods that check on availability of memory prior to writing, the eradication of null field access and null method call, the eradication of redundant condition (condition whose result depends on which part is executed first) etc...