RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2097778 - Pcs WebUI - CSP headers do not restrict script source
Summary: Pcs WebUI - CSP headers do not restrict script source
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: pcs
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 9.1
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-16 14:15 UTC by Tom Sorensen
Modified: 2022-11-16 21:28 UTC (History)
9 users (show)

Fixed In Version: pcs-0.11.3-1.el9
Doc Type: Enhancement
Doc Text:
Feature: Instruct web browsers to only load resources directly from pcs web UI and no other sources. Reason: This helps guard against cross-site scripting attacks. Result: HTTP header "Content-Security-Policy: frame-ancestors 'self'; default-src 'self'" is sent by pcsd in all HTTP responses instructing web browsers to only load and run resources from pcs web UI and no external sources.
Clone Of:
Environment:
Last Closed: 2022-11-15 09:49:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-125475 0 None None None 2022-06-16 14:27:31 UTC
Red Hat Knowledge Base (Solution) 6985907 0 None None None 2022-11-16 21:28:19 UTC
Red Hat Product Errata RHSA-2022:7935 0 None None None 2022-11-15 09:49:46 UTC

Internal Links: 2160555 2160664

Description Tom Sorensen 2022-06-16 14:15:22 UTC
Description of problem:
Possible security issue due to not restricting the source of scripts being run in the pcs WebUI

Version-Release number of selected component (if applicable):
pcs-0.11.1-10.el9

How reproducible:
Always


Steps to Reproduce:
1. Navigate to pcs Web UI
2. Check headers

Actual results:
Content-Security-Policy header does not include "script-src 'self'"

Expected results:
Script-src should be set to ensure no third party scripts are loaded

Additional info:
This has already gone through secalert and is assigned to Clustering team.

Comment 2 Tomas Jelinek 2022-06-23 08:50:22 UTC
Upstream patch:
https://github.com/ClusterLabs/pcs/commit/d7f9e7c0e0346d189b88ce98903fb004696e317d

Test:
Check that all HTTP responses contain "Content-Security-Policy: frame-ancestors 'self'; default-src 'self'" header.

Comment 3 Miroslav Lisik 2022-06-24 13:14:00 UTC
DevTestResults:

[root@r91-1 pcs]# rpm -q pcs
pcs-0.11.3-1.el9.x86_64

[root@r91-1 pcs]# systemctl show -p ActiveState pcsd
ActiveState=active
[root@r91-1 pcs]# curl -kv https://localhost:2224 |& grep Content-Security-Policy
< Content-Security-Policy: frame-ancestors 'self'; default-src 'self'

Content-Security-Policy header contains: default-src 'self'

Comment 10 errata-xmlrpc 2022-11-15 09:49:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: pcs security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7935


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