Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Security policies in open source software

Defining a context for software to allow users to consume them more safely

February 6, 2024
Siddhesh Poyarekar
Related topics:
LinuxOpen sourceSecurity
Related products:
Red Hat Enterprise Linux

    The open source community saw a number of new advances in security processes in the last year. One of those advances was the GNU toolchain community rallying around the idea of adopting security policies, with GCC and binutils already adopting one, guided by the precedent set by the glibc project as early as in 2014. The idea of a security policy in the context of software is not new; many large open source projects understand the need to define policies and procedures for reporting security issues. Some even have dedicated teams to handle security issues. Forges like GitHub actively promote the idea of adding a SECURITY.md file in the code repository that explains how to report security issues.

    However, while the idea is not new, the usage of the security policy across open source communities has been sketchy at best. Few communities actually do anything with their SECURITY.md beyond pointing users to procedures used in filing security issues. Most importantly, many projects fail to actually set a context in which their reports may be evaluated for security impact. This is fast becoming a problem as more organizations become increasingly focused on security and governments start making laws that require organizations to provide certain guarantees with respect to software security.

    In this post I hope to provide some insight on how we adopted security policies in GNU toolchain projects to help security researchers and users better understand how to use their software securely and how other open source projects could emulate that.

    What is a software security issue?

    This is the first question that must be answered when discussing processes around security issues. Strictly speaking, a security issue in software is any defect or design flaw that compromises the confidentiality, integrity or availability of the software or the data it manages. Depending on the circles in which this question is asked, this answer for a specific open source project could range from "almost everything" to "almost nothing." This is because the concept of security does not exist in a vacuum, it needs a context. An authentication bypass needs the software to actually implement an interface that requires authentication. A privilege escalation needs the execution environment of the target software to be in a lower privilege state. A Denial of Service needs the software to be, um, a service!

    For most software, this context is defined by its use, i.e. the environment in which it is deployed. A good security policy defines model contexts so that users know how to use the software without compromising on security.

    Setting security boundaries

    One way to identify this context is to build a threat model for the software. It does not have to be a detailed exercise, listing every possible attack vector and weaknesses in the software in the context of those vectors. For the purposes of the security policy, maintainers could at least explicitly list out use cases that they have the resources to support.

    The binutils example is probably the most pertinent one in this case. In addition to the assembler and linker, the binutils project also distributes a number of tools to analyze binary objects. There is a legitimate threat vector where an attacker could trick a user into downloading and analyzing a malicious binary and through that, execute arbitrary code on their system.  This attack vector can easily be neutralized by making sure that untrusted binaries are only analyzed in a sandbox, such as a container or a virtual machine.

    The code for binary object analysis tools in binutils is written in C and has significant technical debt, resulting in many memory safety issues when analyzing binaries without executing them.  Further, most binary formats are extremely flexible and at least one study has shown that it's possible to get ELF interpreters to execute arbitrary code. While the study focuses on dynamic loaders, the question of similar issues with static linkers is still open. As a result, the responsible approach was to make it clear in the binutils security policy that analysis of untrusted binaries must be done in a sandbox.

    Another model example of a security policy setting security boundaries is the QEMU project, which clearly defines what a trusted context is for various modules within QEMU as well as external software that QEMU interacts with.

    Finally, not all projects restrict context in the same way. For example, while glibc does not consider bugs due to untrusted regular expression inputs as security issues in most cases, the Go project accepts untrusted regular expression induced bugs as security issues. Likewise, while the binutils project discourages static analysis of binaries without sandboxing, the GDB community is leaning towards treating memory safety bugs encountered during static analysis of binaries as security issues.

    Not all security issues are vulnerabilities

    Another aspect of identifying security issues is actually understanding its impact. The CVE program maintains a scoring system called Common Vulnerability Scoring System (CVSS), which helps you do that, but that is explicitly catered towards vulnerabilities. There is another class of security issues that goes unnoticed or worst, incorrectly categorized and those are issues in security hardening.

    Security hardening is quite different in nature to vulnerabilities, because of which they need to be treated differently. A vulnerability is a bug that has potential to be used as a starting point to attack a target system. A buffer overflow in an internet facing service is an example of a vulnerability. The CVE program was made to make wide communication of such vulnerabilities possible because these have potential to directly threaten the safety of computer systems across the world.

    A hardening bug on the other hand, does not have that property.  An example hardening feature is source code fortification, which recently got marked improvements in the GNU toolchain. The correct working of this feature mitigates the impact of buffer overflow bugs, thus reducing the attack surface for applications.  However if the compiler fails to add fortification to the application source, it does not open a security hole in the application or systems it runs on. While it may be important to improve the fortification so that it works, there is no urgency to fix the problem.

    A security policy should determine which security features implemented by the project fall under the first line of defence (i.e. their failure is a direct threat and should be communicated by the CVE program) and which ones are issues that should be given importance for fixing, but not necessary for urgent communication. Again, like security boundaries, classifying security issues as hardening issues or vulnerabilities can sometimes be subjective, based on what the community and the underlying technology for the hardening can reasonably support.

    How does this help everyone?

    A security policy can often be quite an effort to write up, evolve and support, but it is a worthwhile effort for everyone. With computer systems becoming more and more central to our existence and security becoming an increasing focus, it is only natural that we think harder about our security posture as open source maintainers. The process of security policy design forced us to think about the security of all of the modules in our projects in the GNU toolchain. It also raised important questions about what can and cannot be reasonably supported by that community of maintainers and in many cases, helped us think beyond the ideal, to what's practically doable so as to give users a more real view of what is good security practice when using our software.

    From a user's perspective, the security policy helps calibrate expectations, helping them set up their environments more securely and help them be better prepared to protect their systems from misuse. From the broader perspective of the CVE program, the security policy helps improve the signal to noise ratio in communication of vulnerabilities to users so that they're not inundated with security advisories that are not urgent but merely masquerading as urgent.

    Such bogus CVEs are not just a burden for users, they are an even bigger issue for open source maintainers and downstream distribution developers, as they have to scramble to backport fixes to appease the many new security requirements that have been mushrooming in the industry. Cutting down on these, benefits these developers too because they can then focus on improving the security design of their software.

    There is, however, a missing link in this whole picture, which is communication of hardening issues. We probably need a mechanism similar to the CVE program to identify and communicate software hardening issues that do not make systems directly vulnerable, but are nevertheless important to make widely known and subsequently addressed.

    Conclusion

    I hope I've been able to lay out a clearer picture on the motivation of setting up security policies for the GNU toolchain project and also made a case for more open source communities to set up security policies for their projects. A security policy not only improves the precision of CVE advisories, it also sets the stage for net improvement of the security position of open source projects.

    Last updated: February 7, 2024

    Related Posts

    • New C features in GCC 13

    • Install GCC and build a Hello World application on RHEL 9

    • The GDB developer's GNU Debugger tutorial, Part 1: Getting started with the debugger

    • Why we added restartable sequences support to glibc in RHEL 9

    • Use compiler flags for stack protection in GCC and Clang

    • A leaner <iostream> in libstdc++ for GCC 13

    Recent Posts

    • Red Hat Enterprise Linux 10.2 and 9.8: Top features for developers

    • What GPU kernels mean for your distributed inference

    • Debugging image mode with Red Hat OpenShift 4.20: A practical guide

    • EvalHub: Because "looks good to me" isn't a benchmark

    • SQL Server HA on RHEL: Meet Pacemaker HA Agent v2 (tech preview)

    What’s up next?

    Advanced Linux Commands tile card - updated

    Download the Advanced Linux Commands cheat sheet, which provides a collection of Linux commands and executables for developers who are using the Linux operating system in advanced programming scenarios.

    Get the cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.