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 740090 - Sysconfig key handling can be used to read/write to/from any file on the system
Summary: Sysconfig key handling can be used to read/write to/from any file on the system
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: matahari
Version: 6.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-20 21:36 UTC by Russell Bryant
Modified: 2011-12-06 11:43 UTC (History)
3 users (show)

Fixed In Version: matahari-0.4.4-6.el6
Doc Type: Bug Fix
Doc Text:
No description required.
Clone Of:
Environment:
Last Closed: 2011-12-06 11:43:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1569 0 normal SHIPPED_LIVE matahari bug fix and enhancement update 2011-12-06 00:39:06 UTC

Description Russell Bryant 2011-09-20 21:36:42 UTC
Description of problem:

The handling of keys needs to do some path sanitizing so that it _only_ creates files in the directory used to hold the keys and that it only reads files in this keys directory as well.

Right now, you can include things like "../../../etc/whatever" as the key and you can get the agent to either:

1) return the contents of any file on the system using the is_configured method

2) write over any file on the system if you use run_uri or run_string

I don't consider this a security problem or anything given that this is an agent that has full access to run puppet and update the system anyway, but the key handling really should be more sandboxed than it is.

Comment 2 Zane Bitter 2011-09-21 09:06:10 UTC
I made some suggestions here: https://fedorahosted.org/pipermail/matahari/2011-July/001485.html

Comment 3 Adam Stokes 2011-09-23 21:03:52 UTC
http://git.io/i82Whg

Comment 6 Dave Johnson 2011-09-27 22:31:59 UTC
good 2 go in v0.4.4-6

qmf: call 1 is_configured /etc/passwd
Output Parameters:
    Name    Value
    =================
    status  unknown

qmf: call 1 run_uri http://127.0.0.1/sysconfig-test 1 puppet /etc/passwd
/usr/bin/qmf-tool:139: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  if e.message.__class__ == qmf2.Data:
Exception in call command: From Remote Agent: {'error_text': 'Invalid Arguments'}

Comment 7 Russell Bryant 2011-11-16 22:28:22 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description required.

Comment 8 errata-xmlrpc 2011-12-06 11:43:23 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, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHBA-2011-1569.html


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