Harman Patil (Editor)

Open source software security

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

Open-source software security is the measure of assurance or guarantee in the freedom from danger and risk inherent to an open-source software system.

Contents

Open-source software versus open algorithms

A software project is in general an implementation of an algorithm. Although implementations can be tested, testing can only prove the presence of errors (and not their absence), while algorithms can be proven correct.

In secret key cryptography, one of the premises is that the algorithm must be known and only a small piece of information must be kept secret: The secret key. That is, for a cypher to be considered secure, the algorithm must be proven to be correct and the proof must be available for whoever party that wants to use the cypher.

Therefore, in computer security, there is a consensus that algorithms must be open, however there is an ensuing debate whether implementations should be open-source (public) or proprietary software (secret).

Implementation debate

Source code is often checked, or audited, by developers to ensure that is has no security flaws. Supporters of open source software submit that the public availability of the source code allows more developers to inspect it, and therefore increases the likelihood of security bugs being located and fixed. Detractors submit that the source code's accessibility allows malicious users to find vulnerabilities more easily. Further benefits and drawbacks of open source software are shown below.

Benefits

  • More people can inspect the source code to find and fix a possible vulnerability. This can lead to both faster discovery of unintentional security vulnerabilities and prevention of intentional vulnerabilities (backdoors) in the code put there by the developers themselves.
  • Proprietary software forces the user to accept the level of security that the software vendor is willing to deliver and to accept the rate that patches and updates are released.
  • The end-user of open-source code has the ability to change and modify source to implement any extra "features" of security they may wish for a specific use, which can extend to the kernel level if they so wish.
  • It is assumed that any compiler that is used creates code that can be trusted, but it has been demonstrated by Ken Thompson that a compiler can be subverted using an eponymous Thompson hack to create faulty executables that are unwittingly produced by a well-intentioned developer. With access to the source code for the compiler, the developer has at least the ability to discover if there is any mal-intention.
  • David A. Wheeler demonstrates that the existence of two different open-source self-compiling compilers (which should be able to compile each other) can be used to establish a binary for one of them that is known not to be subverted by the Thompson hack.
  • Kerckhoffs' principle is based on the idea that an enemy can steal a secure military system and not be able to compromise the information. His ideas were the basis for many modern security practices, and followed that security through obscurity is a bad practice.
  • Drawbacks

  • Attackers can find vulnerabilities more easily with the source code.
  • Simply making source code available does not guarantee review. An example of this occurring is when Marcus Ranum, an expert on security system design and implementation, released his first public firewall toolkit. At one time, there were over 2,000 sites using his toolkit, but only 10 people gave him any feedback or patches.
  • Having a large amount of eyes reviewing code can "lull a user into a false sense of security". Having many users look at source code does not guarantee that security flaws will be found and fixed.
  • Metrics and models

    There are a variety of models and metrics to measure the security of a system. These are a few methods that can be used to measure the security of software systems.

    Number of days between vulnerabilities

    It is argued that a system is most vulnerable after a potential vulnerability is discovered, but before a patch is created. By measuring the number of days between the vulnerability and when the vulnerability is fixed, a basis can be determined on the security of the system. There are a few caveats to such an approach: not every vulnerability is equally bad, and fixing a lot of bugs quickly might not be better than only finding a few and taking a little bit longer to fix them, taking into account the operating system, or the effectiveness of the fix.

    Poisson process

    The Poisson process can be used to measure the rates at which different people find security flaws between open and closed source software. The process can be broken down by the number of volunteers Nv and paid reviewers Np. The rates at which volunteers find a flaw is measured by λv and the rate that paid reviewers find a flaw is measured by λp. The expected time that a volunteer group is expected to find a flaw is 1/(Nv λv) and the expected time that a paid group is expected to find a flaw is 1/(Np λp).

    Morningstar model

    By comparing a large variety of open source and closed source projects a star system could be used to analyze the security of the project similar to how Morningstar, Inc. rates mutual funds. With a large enough data set, statistics could be used to measure the overall effectiveness of one group over the other. An example of such as system is as follows:

  • 1 Star: Many security vulnerabilities.
  • 2 Stars: Reliability issues.
  • 3 Stars: Follows best security practices.
  • 4 Stars: Documented secure development process.
  • 5 Stars: Passed independent security review.
  • Coverity scan

    Coverity in collaboration with Stanford University has established a new baseline for open-source quality and security. The development is being completed through a contract with the Department of Homeland Security. They are utilizing innovations in automated defect detection to identify critical types of bugs found in software. The level of quality and security is measured in rungs. Rungs do not have a definitive meaning, and can change as Coverity releases new tools. Rungs are based on the progress of fixing issues found by the Coverity Analysis results and the degree of collaboration with Coverity. They start with Rung 0 and currently go up to Rung 2.

  • Rung 0
  • The project has been analyzed by Coverity’s Scan infrastructure, but no representatives from the open-source software have come forward for the results.

  • Rung 1
  • At rung 1, there is collaboration between Coverity and the development team. The software is analyzed with a subset of the scanning features to prevent the development team from being overwhelmed.

  • Rung 2
  • There are 11 projects that have been analyzed and upgraded to the status of Rung 2 by reaching zero defects in the first year of the scan. These projects include: AMANDA, ntp, OpenPAM, OpenVPN, Overdose, Perl, PHP, Postfix, Python, Samba, and tcl.

    References

    Open-source software security Wikipedia