Bug 1878761 (CVE-2020-28935)

Summary: CVE-2020-28935 unbound: symbolic link traversal when writing PID file
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: aegorenk, pemensik, pj.pandit, rschiron, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: unbound 1.13.0 Doc Type: If docs needed, set a value
Doc Text:
A symbolic link traversal vulnerability was found in unbound in the way it writes its PID file while starting up. This flaw allows a local attacker with access to the unbound user to set up a link to another file, owned by root, and make unbound overwrite it during its next restart, destroying the original content. The highest threat from this vulnerability is integrity.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 20:36:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1878762, 1899058, 1910711, 1968662, 1968663, 1968664    
Bug Blocks: 1878763    

Description Pedro Sampaio 2020-09-14 13:26:02 UTC
A flaw was found in Unbound in the way it writes its PID file during startup. A local attacker with access to the unbound user could abuse this issue to create a symbolic link where unbound is going to write its PID file, so that a following start of unbound would follow the symlink and write the PID in another file chosen by the attacker. This operation could overflow files owned by root on the system.

Upstream issue:
https://github.com/NLnetLabs/unbound/issues/303

Comment 1 Pedro Sampaio 2020-09-14 13:26:28 UTC
Created unbound tracking bugs for this issue:

Affects: fedora-all [bug 1878762]

Comment 3 Riccardo Schirone 2020-10-19 14:26:34 UTC
Mitigation:

If SELinux is enabled in Enforcing mode (the default value in Red Hat Enterprise Linux 8), this kind of attack is prevented as unbound would be blocked from accessing the symbolic link file.

Comment 6 Riccardo Schirone 2020-11-19 14:12:21 UTC
Acknowledgments:

Name: Mason Loring Bliss (Red Hat)

Comment 13 errata-xmlrpc 2021-05-18 15:37:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1853 https://access.redhat.com/errata/RHSA-2021:1853

Comment 14 Product Security DevOps Team 2021-05-18 20:36:12 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-28935

Comment 16 errata-xmlrpc 2022-02-22 15:13:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2022:0632 https://access.redhat.com/errata/RHSA-2022:0632