Bug 1827580 (CVE-2019-12522) - CVE-2019-12522 squid: lack of UID assignment in child process spawning could lead to privileges escalation
Summary: CVE-2019-12522 squid: lack of UID assignment in child process spawning could ...
Keywords:
Status: NEW
Alias: CVE-2019-12522
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 1828372 1828376
Blocks: 1827553
TreeView+ depends on / blocked
 
Reported: 2020-04-24 09:03 UTC by Marian Rehak
Modified: 2024-03-25 15:51 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in squid. When Squid is run as root, it spawns its child processes as a lesser user, by default the user nobody. This is done via the leave_suid call. leave_suid leaves the Saved UID as 0. This makes it trivial for an attacker who has compromised the child process to escalate their privileges back to root. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Marian Rehak 2020-04-24 09:03:28 UTC
When Squid is run as root, it spawns its child processes as a lesser user, by default the user nobody. This is done via the leave_suid call. leave_suid leaves the Saved UID as 0. This makes it trivial for an attacker who has compromised the child process to escalate their privileges back to root.

Comment 5 Stefan Cornelius 2021-02-15 09:50:55 UTC
Statement:

This issue is not a big problem on its own, as it requires another remote code execution vulnerability or that a local user has the privileges to modify the squid processes to be exploited. Thus, it is actually closer to a security enhancement than a vulnerability.

Comment 9 Joe Orton 2021-03-09 16:05:56 UTC
To give a view from RHEL Engineering: 

This is an unusual CVE assignment which has resulted from a security research report.  The report is a critique of the design of Squid, rather than a identifiable, exploitable vulnerability in the software.  It can be valuable for any software to get such a critique, but in security research a "vulnerability" must describe a flaw in the implementation in comparison to the design.  Hence, I cannot see how it is valid that a CVE name has been assigned to this.

(A reductio ad absurdum argument: it will always be possible to imagine a hypothetical improvement in the design of ANY network-facing software, regardless of how non-trivial that might be, or what trade-offs are involved; thus, assigning a CVE name because of the ABSENCE of such an improvement is clearly ridiculous.)

Comment 11 Yadnyawalk Tale 2021-03-09 18:21:14 UTC
[Satellite's perspective]

Satellite does not directly ship the squid package and relies on the version included in Red Hat Enterprise Linux base operating system in the rhel-7-server-rpms repository. The /etc/squid/squid.conf file ensures that the only localhost has cachemgr access and squid is denying all other access to squid.

https://github.com/theforeman/puppet-pulp/blob/master/manifests/squid.pp#L25

Red Hat Enterprise Linux 7 also is configured by default with a firewall enabled which ensures that only ports required for external access are allowed as outlined in our installation guide:

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.8/html/installing_satellite_server_from_a_connected_network/preparing-environment-for-satellite-installation#satellite-ports-and-firewalls-requirements_satellite

This is to protect the system from any unwanted traffic from outside. You can verify that squid (default port: 3128) is not included in the list of ports:

# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eno49
  sources:
  services: dhcpv6-client mdns ssh vnc-server
  ports: 80/tcp 443/tcp 5646/tcp 5647/tcp 5671/tcp 8000/tcp 8140/tcp 8443/tcp 9090/tcp 22/tcp 2375/tcp 5000/tcp 16509/tcp 53/udp 69/udp
  protocols:
  masquerade: no

I think 4.5 CVSS scoring applies to Satellite squid configuration as well. We've already explained the reasoning behind low severity on the CVE page (under "Why did Red Hat score this CVE differently?" section).
https://access.redhat.com/security/cve/CVE-2019-12522


Note You need to log in before you can comment on or make changes to this bug.