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 851824 - sealert parse errors when description contains parenthesis
Summary: sealert parse errors when description contains parenthesis
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: setroubleshoot
Version: 6.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: Michal Trunecka
URL:
Whiteboard:
: 855496 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-26 03:35 UTC by Paul Bransford
Modified: 2014-09-30 23:33 UTC (History)
5 users (show)

Fixed In Version: setroubleshoot-3.0.47-4.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 10:05:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
example selinux audit log containing trigger data (232.83 KB, application/x-gzip)
2012-08-26 03:35 UTC, Paul Bransford
no flags Details


Links
System ID Private Priority Status Summary Last Updated
CentOS 0005914 0 None None None 2012-08-26 03:38:40 UTC
Red Hat Product Errata RHBA-2013:0387 0 normal SHIPPED_LIVE setroubleshoot bug fix update 2013-02-20 20:51:50 UTC

Description Paul Bransford 2012-08-26 03:35:57 UTC
Created attachment 607032 [details]
example selinux audit log containing trigger data

Description of problem:
sealert outputs sh errors when an alert description contains parenthesis. Example text that causes error:
SELinux is preventing /usr/sbin/httpd from execute access on the file /var/tmp/ffiasFfSA (deleted).

The console output that occurs when this bug is triggered is:
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffiasFfSA (deleted); } 2>&1'

Version-Release number of selected component (if applicable):
setroubleshoot-server-3.0.47-3.el6_3.x86_64 : SELinux troubleshoot server

How reproducible:
Attempt to parse effected audit log.

Steps to Reproduce:
1. Normal execution of the program (sealert -a /var/log/audit/audit.log
  
Actual results:
Spurious STDERR output

Expected results:
Normal output only


Additional info:
It seems that the end result is acceptable, as sealert displays information about the alert and suggested actions to resolve. The STDERR output doesn't -seem- to cause problems.

Attached is a log containing data triggering this bug.

Notice: this bug was discovered in CentOS, however this should apply in RedHat as well, hence my reporting this upstream.

Comment 2 Milos Malik 2012-08-29 12:32:22 UTC
Thanks for the reproducer:

# sealert -a audit-bugged.log 
 90% donesh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffiLrZ5md (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffiweyQpP (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffihraCsr (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffi7qKEQL (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffij4iYAP (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffisQXNIN (deleted); } 2>&1'
 90% donesh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffimYq09u (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffidJQUNx (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffiyKAQrA (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffi7sQhQP (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffirnRrjl (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/fficqZDMQ (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffi6Puhvs (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffi7opCgK (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffiod5911 (deleted); } 2>&1'
 90% donesh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffimd316H (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffioeOtsP (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffiaXoBLA (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffignbzrg (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffilOd94b (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffi8hmKI7 (deleted); } 2>&1'
 92% donesh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffiE3rPcM (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffiTJ7psR (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffi7fJzPO (deleted); } 2>&1'
 98% donesh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /tmp/ffityM2P1 (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /var/tmp/ffiasFfSA (deleted); } 2>&1'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `{ rpm -qf /dev/shm/ffiRj4tU9 (deleted); } 2>&1'
100% donefound 3 alerts in audit-bugged.log
--------------------------------------------------------------------------------

Comment 3 Daniel Walsh 2012-09-18 16:12:27 UTC
*** Bug 855496 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2012-09-27 13:19:39 UTC
Fixed in setroubleshoot-3.0.47-4.el6

Comment 6 RHEL Program Management 2012-09-27 13:49:35 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 11 errata-xmlrpc 2013-02-21 10:05:41 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-2013-0387.html


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