CVE-2016-9401
Medium · 5.5CVSS
5.5
EPSS
0.4%
Published
Jan 23, 2017
CISA due date
—
Cloudanix analysis
A local user on certain systems could craft input that crashes the program or slips past security restrictions meant to limit what they can do.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- Application
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free triggered in popd handling via a crafted address that bypasses restricted shell protections and leads to memory corruption.
Why it matters to the business
Local users on affected systems can trigger denial of service or restricted environment escapes, increasing risk of unauthorized actions on hosts running the vulnerable software; low ecosystem prevalence limits widespread exposure.
How an attack unfolds
A local attacker supplies a specially crafted address to the popd command or equivalent interface in the affected code path, causing the use-after-free condition that may allow bypassing shell restrictions.
How to fix it
Upgrade kamailio/kamailio (GIT) to commit d4f23c797532bdabfe8a423d7af96688e6a317c9 or later; rebuild and deploy the updated binaries across all instances.
How to confirm the fix worked
Confirm the running binary or source tree contains commit d4f23c797532bdabfe8a423d7af96688e6a317c9; test popd behavior with known crafted inputs in a lab environment to verify the use-after-free is no longer reproducible.
Typical attack path
- Obtain local access to a system running the vulnerable software
- Identify or create a restricted shell environment
- Craft and supply a malicious address to the popd functionality
- Trigger the use-after-free to achieve bypass or denial of service
How to detect it
Review local process execution logs and shell history for unusual popd invocations; inspect core dumps or memory error logs for use-after-free signatures on hosts running the vulnerable version.
What your security team should do
- Apply the listed commit immediately on all Kamailio installations
- Audit any restricted shell configurations that rely on popd
- Monitor for local privilege-related anomalies until patches are deployed
The record
popd in bash might allow local users to bypass the restricted shell and cause a use-after-free via a crafted address.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.2 | bash | 0 | 4.3.33-r2 |
| Alpine:v3.3 | bash | 0 | 4.3.42-r5 |
| Alpine:v3.4 | bash | 0 | 4.3.42-r5 |
| Alpine:v3.5 | bash | 0 | 4.3.46-r5 |
| Debian:11 | bash | 0 | 4.4-3 |
| Debian:12 | bash | 0 | 4.4-3 |
| Debian:13 | bash | 0 | 4.4-3 |
| Debian:8 | bash | 0 | 4.3-11+deb8u2 |
| Mageia:5 | bash | 0 | 4.3-48.2.1.mga5 |
| Red Hat:enterprise_linux:6::client | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::client | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::client | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::computenode | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::computenode | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::computenode | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::server | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::server | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::server | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::workstation | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::workstation | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::workstation | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:7::client | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::client | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::client | bash-doc | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::computenode | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::computenode | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::computenode | bash-doc | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::server | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::server | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::server | bash-doc | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::workstation | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::workstation | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::workstation | bash-doc | 0 | 0:4.2.46-28.el7 |
| SUSE:Linux Enterprise Desktop 12 SP2 | bash | 0 | 4.3-82.1 |
| SUSE:Linux Enterprise Server 11 SP4 | bash | 0 | 3.2-147.35.1 |
| SUSE:Linux Enterprise Server 12 SP2 | bash | 0 | 4.3-82.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | bash | 0 | 4.3-82.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | bash | 0 | 3.2-147.35.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | bash | 0 | 4.3-82.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | bash | 0 | 3.2-147.35.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | bash | 0 | 4.3-82.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | bash | 0 | 4.3-82.1 |
| Ubuntu:14.04:LTS | bash | 0 | 4.3-7ubuntu1.7 |
| Ubuntu:16.04:LTS | bash | 0 | 4.3-14ubuntu1.2 |
| Ubuntu:18.04:LTS | bash | 0 | 4.4-5ubuntu1 |
| openSUSE:Tumbleweed | bash | 0 | 7.0-92.1 |
Related vulnerabilities
- CVE-2022-3715 A flaw was found in the bash package, where a heap-buffer overflow can occur in valid… Also affects bash
- CVE-2012-6711 A heap-based buffer overflow exists in GNU Bash before 4.3 when wide characters, not… Also affects bash
- CVE-2016-0634 The expansion of '\h' in the prompt string in bash 4.3 allows remote authenticated users… Also affects bash
- CVE-2016-7543 Bash before 4.4 allows local users to execute arbitrary commands with root privileges via… Also affects bash
- CVE-2014-6278 GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the… Also affects bash
- CVE-2014-7187 Off-by-one error in the read_token_word function in parse.y in GNU Bash through 4.3… Also affects bash
- CVE-2014-7186 The redirection implementation in parse.y in GNU Bash through 4.3 bash43-026 allows… Also affects bash
- CVE-2014-6277 GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the… Also affects bash