Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.92 KB

README.rst

File metadata and controls

48 lines (34 loc) · 1.92 KB
+-------------------+----------------------------+------------------------------------------------------------------+ | ``Root.Security`` | `Parent <../README.rst>`_ | `Index `_ | +-------------------+----------------------------+------------------------------------------------------------------+ +---------------------+------------------------------------------+--------------------------------------+------------------------------------------+--------------------------------+--------------------------------------+ | **Sibling aspects** | `Formatting <../Formatting/README.rst>`_ | `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...