Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Root/Security/README.rst
Binary file not shown.
47 changes: 47 additions & 0 deletions Root/Security/README2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
+-------------------+----------------------------+------------------------------------------------------------------+
| ``Root.Security`` | `Parent <../README.rst>`_ | `Index <//github.com/coala/aspect-docs/blob/master/README.rst>`_ |
+-------------------+----------------------------+------------------------------------------------------------------+

+---------------------+--------------------------------------+------------------------------------------+--------------------------------+--------------------------------------+
| **Sibling aspects** | `Metadata <../Metadata/README.rst>`_ | `Redundancy <../Redundancy/README.rst>`_ | `Smell <../Smell/README.rst>`_ | `Spelling <../Spelling/README.rst>`_ |
+---------------------+--------------------------------------+------------------------------------------+--------------------------------+--------------------------------------+

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

Subaspects
==========

This aspect does not have any sub aspects.

Example
=======

.. code-block:: C

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...