Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 769388

Summary: pki-silent does not properly escape command-line arguments
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: pki-coreAssignee: Matthew Harmsen <mharmsen>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0CC: jcholast, jgalipea, kchamart, mharmsen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-9.0.3-23.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 741180 Environment:
Last Closed: 2012-06-20 12:07:55 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: 741180    
Bug Blocks: 530474    
Attachments:
Description Flags
Resolves pki-silent does not properly escape command-line arguments
none
Applies fix for pki-silent does not properly escape command-line arguments
none
pkisilent script which uses a password argument with quotes and slashes none

Comment 2 Matthew Harmsen 2012-03-06 04:14:23 UTC
Created attachment 567818 [details]
Resolves pki-silent does not properly escape command-line arguments

Comment 3 Matthew Harmsen 2012-03-06 04:15:22 UTC
Created attachment 567819 [details]
Applies fix for pki-silent does not properly escape command-line arguments

Comment 4 Matthew Harmsen 2012-03-06 04:16:17 UTC
As this patch was previously reviewed for Dogtag 9 and Dogtag 10, the patches for RHEL 6 will not be reviewed a second time.

Comment 5 Matthew Harmsen 2012-03-06 04:20:49 UTC
# git am 0027-BZ-769388-pki-silent-does-not-properly-escape-command-line-arguments.patch
Applying: BZ 769388 - pki-silent does not properly escape command-line arguments

# git log -1
commit c4720b69e365a09fd2aaed4bfe0a342d8cadb9a7
Author: Matthew Harmsen <mharmsen>
Date:   Mon Mar 5 19:17:28 2012 -0800

    BZ 769388 - pki-silent does not properly escape command-line arguments

# git push
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 665 bytes, done.
Total 7 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/pki.git
   f70660c..c4720b6  IPA_v2_RHEL_6_ERRATA_BRANCH -> IPA_v2_RHEL_6_ERRATA_BRANCH

# git am 0001-Apply-pki-silent-escape-command-line-arguments.patch
Applying: Apply pki-silent escape command-line arguments
/home/mharmsen/DOGTAG/pkigit.ipa2/.git/rebase-apply/patch:30: trailing whitespace.
 
/home/mharmsen/DOGTAG/pkigit.ipa2/.git/rebase-apply/patch:38: trailing whitespace.
 
/home/mharmsen/DOGTAG/pkigit.ipa2/.git/rebase-apply/patch:40: trailing whitespace.
-- 
/home/mharmsen/DOGTAG/pkigit.ipa2/.git/rebase-apply/patch:42: new blank line at EOF.
+
warning: 4 lines add whitespace errors.

# git log -1
commit b39189d44da957b924d598712c5eb2f4ed167bd7
Author: Matthew Harmsen <mharmsen>
Date:   Mon Mar 5 20:09:20 2012 -0800

    Apply pki-silent escape command-line arguments
    
    BZ 769388 - pki-silent does not properly escape command-line arguments

# git push
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 1.34 KiB, done.
Total 7 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/pki.git
   c4720b6..b39189d  IPA_v2_RHEL_6_ERRATA_BRANCH -> IPA_v2_RHEL_6_ERRATA_BRANCH

Comment 7 Kashyap Chamarthy 2012-04-05 15:02:05 UTC
Created attachment 575470 [details]
pkisilent script which uses a password argument with quotes and slashes

Comment 8 Kashyap Chamarthy 2012-04-05 15:14:39 UTC
VERIFIED.

================
[root@tiger bz-verif-769388]# cat /etc/redhat-release ; arch
Red Hat Enterprise Linux Server release 6.3 Beta (Santiago)
x86_64
[root@tiger bz-verif-769388]#
================

I used a password like this '\(pas\&w\`rd\)' for pki_silent_security_database successfully.

Refer to comment #7 for test script.

Version: pki-silent-9.0.3-24.el6.noarch

Comment 10 errata-xmlrpc 2012-06-20 12:07:55 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-2012-0761.html