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 813122 - Add the ability to enable hash randomization in mod_wsgi apps
Summary: Add the ability to enable hash randomization in mod_wsgi apps
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mod_wsgi
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On: 812398
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-17 00:57 UTC by Luke Macken
Modified: 2021-01-14 09:34 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 812398
Environment:
Last Closed: 2016-07-28 11:15:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Luke Macken 2012-04-17 00:57:54 UTC
+++ This bug was initially created as a clone of Bug #812398 +++

The latest version of Python supports hash randomization.

http://mail.python.org/pipermail/python-list/2012-April/1290792.html

For webapps deployed with mod_wsgi, it's not trivial to enable this feature to secure your webapp.

I first attemped to enable this feature by modifying apache's init script (https://fedorahosted.org/fedora-infrastructure/ticket/3169). This approach is not ideal, because it adds Python-specific options to the Apache init script, which tends to be distro-specific anyway.

The ideal solution is to add an option to mod_wsgi that allows the user to enable hash randomization. I wrote a patch that adds a WSGIHashSeed option, and sent it upstream.

https://groups.google.com/d/msg/modwsgi/TFJYMJ30Q7w/I4C8JhUv8ScJ

SRPM with patch: http://lmacken.fedorapeople.org/rpms/mod_wsgi-3.3-3.fc18.src.rpm

Comment 2 Joe Orton 2015-07-28 13:36:35 UTC
Any idea why adding PYTHONHASHSEED=random to /etc/sysconfig/httpd is not sufficient?

Comment 4 Luke Macken 2016-02-29 21:56:58 UTC
(In reply to Joe Orton from comment #2)
> Any idea why adding PYTHONHASHSEED=random to /etc/sysconfig/httpd is not
> sufficient?

It is sufficient, but not ideal. I'm fine with closing out this bug if you would like, but we're still shipping very old mod_wsgi in RHEL7, which has a proper configuration directive for this.


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