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 1220944 - [abrt] openscap-scanner-1.1.1-3.el7: oscap killed by SIGSEGV
Summary: [abrt] openscap-scanner-1.1.1-3.el7: oscap killed by SIGSEGV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openscap
Version: 7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Šimon Lukašík
QA Contact: Marek Haicman
URL:
Whiteboard:
: 1251080 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-12 22:04 UTC by Joe Wright
Modified: 2020-06-09 11:46 UTC (History)
4 users (show)

Fixed In Version: openscap-1.2.4-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: Malformed security policy has been supplied to the oscap scanner. This policy, in form of XCCDF checklist contained dangling selector element. The selector element did not resolve to a valid target. Consequence: The oscap scanner has crashed. Fix: The oscap scanner has been fixed. The oscap scanner now notifies user whenever dangling selector is encountered. Result: The scan of malformed security policy now proceeds. The oscap scanner generates warnings for user.
Clone Of:
Environment:
Last Closed: 2015-11-19 12:09:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:2356 0 normal SHIPPED_LIVE openscap bug fix and enhancement update 2015-11-19 10:41:25 UTC

Description Joe Wright 2015-05-12 22:04:29 UTC
Description of problem:
- openscap-scanner segfault

Version-Release number of selected component (if applicable):
- openscap-scanner-1.1.1-3.el7

How reproducible:
- intermittent

Steps to Reproduce:
oscap xccdf eval --profile test /home/schachingerx/scap-security-guide/RHEL/7/output/ssg-rhel7-xccdf-copy.xml

...results in this (majority of output omitted) :

Title   Set SSH Idle Timeout Interval
Rule    sshd_set_idle_timeout
Ident   CCE-26611-4
Result  pass

Segmentation fault (core dumped)
[root@schachinger Documents]#

Sometimes I get an abrt notification but sometimes I don't. I can correct this error by commenting out the following lines under the "test" profile in my XCCDF XML file (attached to case)
    <select idref="account_disable_post_pw_expiration" selected="false"/>
    <select idref="accounts_passwords_pam_faillock_deny" selected="false"/>
    <refine-value idref="var_password_pam_unix_remember" selector="4"/>
    <refine-value idref="var_account_disable_post_pw_expiration" selector="90"/>
    <refine-value idref="var_accounts_passwords_pam_faillock_deny" selector="6"/>
    <refine-value idref="var_password_pam_minlen" selector="7"/>

Actual results:
- segfault

Expected results:


Additional info:

time:           Fri 08 May 2015 01:26:06 PM EDT
cmdline:        /usr/bin/oscap xccdf eval --results /tmp/tmp_Gtktx --profile xccdf_org.ssgproject.content_profile_pci-dss /home/schachingerx/scap-security-guide/RHEL/7/output/ssg-rhel7-xccdf-1.2.xml
uid:            0 (root)
abrt_version:   2.1.11
event_log:      
executable:     /usr/bin/oscap
kernel:         3.10.0-229.1.2.el7.x86_64
last_occurrence: 1431440344
pid:            31051
pkg_arch:       x86_64
pkg_epoch:      0
pkg_name:       openscap-scanner
pkg_release:    3.el7
pkg_version:    1.1.1
pwd:            /home/schachingerx/scap-security-guide/RHEL/7/output
runlevel:       N 5
username:       root

dso_list:       Text file, 4245 bytes
maps:           Text file, 21525 bytes
sosreport.tar.xz: Binary file, 6965096 bytes
var_log_messages: Text file, 5275 bytes

cgroup:
:10:hugetlb:/
:9:perf_event:/
:8:blkio:/
:7:net_cls:/
:6:freezer:/
:5:devices:/
:4:memory:/
:3:cpuacct,cpu:/
:2:cpuset:/
:1:name=systemd:/user.slice/user-1000.slice/session-1.scope

comment:
:by running the following command to test oscap:
:
:# oscap xccdf eval --profile test /home/schachingerx/scap-security-guide/RHEL/7/output/ssg-rhel7-xccdf-copy.xml
:
:Which resulted in...
:
:Title   Set SSH Idle Timeout Interval
:Rule    sshd_set_idle_timeout
:Ident   CCE-26611-4
:Result  fail
:
:Segmentation fault (core dumped)

core_backtrace:
:{   "signal": 11
:,   "executable": "/usr/bin/oscap"
:,   "stacktrace":
:      [ {   "crash_thread": true
:        ,   "frames":
:              [ {   "address": 140085551379072
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 635520
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085551439617
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 696065
:                ,   "function_name": "xccdf_policy_add_final_setvalue"
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085551439779
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 696227
:                ,   "function_name": "xccdf_policy_add_final_setvalues"
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085551439843
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 696291
:                ,   "function_name": "xccdf_policy_add_final_setvalues"
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085551439843
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 696291
:                ,   "function_name": "xccdf_policy_add_final_setvalues"
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085551440003
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 696451
:                ,   "function_name": "xccdf_policy_add_final_setvalues"
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085551440397
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 696845
:                ,   "function_name": "xccdf_policy_evaluate"
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085551422954
:                ,   "build_id": "ee8a0b5fb226674c20c43464882468eb9cc0b335"
:                ,   "build_id_offset": 679402
:                ,   "function_name": "xccdf_session_evaluate"
:                ,   "file_name": "/lib64/libopenscap.so.8"
:                }
:              , {   "address": 140085556101648
:                ,   "build_id": "4a6d08dcd4c7a9acef99977e7d2b9ea98e68c880"
:                ,   "build_id_offset": 57872
:                ,   "function_name": "app_evaluate_xccdf"
:                ,   "file_name": "/usr/bin/oscap"
:                }
:              , {   "address": 140085556083817
:                ,   "build_id": "4a6d08dcd4c7a9acef99977e7d2b9ea98e68c880"
:                ,   "build_id_offset": 40041
:                ,   "function_name": "oscap_module_process"
:                ,   "file_name": "/usr/bin/oscap"
:                }
:              , {   "address": 140085556079025
:                ,   "build_id": "4a6d08dcd4c7a9acef99977e7d2b9ea98e68c880"
:                ,   "build_id_offset": 35249
:                ,   "function_name": "main"
:                ,   "file_name": "/usr/bin/oscap"
:                } ]
:        } ]
:}

environ:
:XDG_VTNR=1
:XDG_SESSION_ID=1
:HOSTNAME=schachinger
:SHELL=/bin/bash
:TERM=xterm-256color
:HISTSIZE=1000
:USER=root
:LS_COLORS=rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:
:SUDO_USER=schachingerx
:SUDO_UID=1000
:USERNAME=schachingerx
:PATH=/sbin:/bin:/usr/sbin:/usr/bin
:MAIL=/var/spool/mail/schachingerx
:PWD=/home/schachingerx/scap-security-guide/RHEL/7/output
:LANG=en_US.utf8
:SHLVL=1
:XDG_SEAT=seat0
:SUDO_COMMAND=/bin/su
:HOME=/root
:LOGNAME=root
:'LESSOPEN=||/usr/bin/lesspipe.sh %s'
:SUDO_GID=1000
:DISPLAY=:0
:XAUTHORITY=/root/.xauthgSAekA
:COLORTERM=gnome-terminal
:_=/sbin/osad

limits:
:Limit                     Soft Limit           Hard Limit           Units     
:Max cpu time              unlimited            unlimited            seconds   
:Max file size             unlimited            unlimited            bytes     
:Max data size             unlimited            unlimited            bytes     
:Max stack size            8388608              unlimited            bytes     
:Max core file size        0                    unlimited            bytes     
:Max resident set          unlimited            unlimited            bytes     
:Max processes             62180                62180                processes 
:Max open files            1024                 4096                 files     
:Max locked memory         65536                65536                bytes     
:Max address space         unlimited            unlimited            bytes     
:Max file locks            unlimited            unlimited            locks     
:Max pending signals       62180                62180                signals   
:Max msgqueue size         819200               819200               bytes     
:Max nice priority         0                    0                    
:Max realtime priority     0                    0                    
:Max realtime timeout      unlimited            unlimited            us        

machineid:
:systemd=163994d5f9b7442da0cab1d434ac4f56
:sosreport_uploader-dmidecode=69d4451b43af22d7379a159a43a7e33d82395b3a868382678892394d8652a247

open_fds:
:0:pipe:[320538]
:pos:	0
:flags:	00
:1:/dev/null
:pos:	0
:flags:	0100000
:2:pipe:[320539]
:pos:	0
:flags:	01
:3:socket:[168068]
:pos:	0
:flags:	02
:4:/dev/null
:pos:	0
:flags:	0100001
:5:socket:[316741]
:pos:	0
:flags:	02000002
:6:socket:[316742]
:pos:	0
:flags:	02
:7:socket:[317925]
:pos:	0
:flags:	02
:8:socket:[317927]
:pos:	0
:flags:	02
:9:socket:[318509]
:pos:	0
:flags:	02
:10:socket:[318511]
:pos:	0
:flags:	02
:11:socket:[318513]
:pos:	0
:flags:	02
:12:socket:[315037]
:pos:	0
:flags:	02
:13:socket:[315039]
:pos:	0
:flags:	02
:14:socket:[315041]
:pos:	0
:flags:	02
:15:socket:[318515]
:pos:	0
:flags:	02

proc_pid_status:
:Name:	oscap
:State:	S (sleeping)
:Tgid:	31051
:Ngid:	0
:Pid:	31051
:PPid:	31050
:TracerPid:	0
:Uid:	0	0	0	0
:Gid:	0	0	0	0
:FDSize:	64
:Groups:	0 
:VmPeak:	  144144 kB
:VmSize:	  130904 kB
:VmLck:	       0 kB
:VmPin:	       0 kB
:VmHWM:	   30792 kB
:VmRSS:	   17812 kB
:VmData:	   13100 kB
:VmStk:	     136 kB
:VmExe:	      88 kB
:VmLib:	   16480 kB
:VmPTE:	     256 kB
:VmSwap:	       0 kB
:Threads:	1
:SigQ:	0/62180
:SigPnd:	0000000000000000
:ShdPnd:	0000000000000000
:SigBlk:	0000000000000000
:SigIgn:	0000000001001000
:SigCgt:	0000000180000000
:CapInh:	0000000000000000
:CapPrm:	0000001fffffffff
:CapEff:	0000001fffffffff
:CapBnd:	0000001fffffffff
:Seccomp:	0
:Cpus_allowed:	ff
:Cpus_allowed_list:	0-7
:Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
:Mems_allowed_list:	0
:voluntary_ctxt_switches:	234
:nonvoluntary_ctxt_switches:	1

reported_to:
:uReport: BTHASH=19926e0916ea0315ec2c876a30ac326eddfdfb5b
:ABRT Server: URL=https://api.access.redhat.com/rs/telemetry/abrt/reports/bthash/19926e0916ea0315ec2c876a30ac326eddfdfb5b
$ file coredump 
coredump: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/usr/bin/oscap xccdf eval --results /tmp/tmp_Gtktx --profile xccdf_org.ssgproje'
-bash-4.2$ gdb /usr/bin/oscap coredump 
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/oscap...Reading symbols from /usr/lib/debug/usr/bin/oscap.debug...done.
done.
[New LWP 31051]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/oscap xccdf eval --results /tmp/tmp_Gtktx --profile xccdf_org.ssgproje'.
Program terminated with signal 11, Segmentation fault.
#0  xccdf_value_instance_get_value (item=0x0) at value.c:437
437     OSCAP_GETTER(const char*, xccdf_value_instance, value)
(gdb) bt
#0  xccdf_value_instance_get_value (item=0x0) at value.c:437
#1  0x00007f6835881eac in xccdf_policy_get_value_of_item (policy=policy@entry=0x7f68371a1b10, item=<optimized out>) at xccdf_policy.c:2426
#2  0x00007f6835881f01 in xccdf_policy_add_final_setvalue (policy=policy@entry=0x7f68371a1b10, value=0x7f6836f8bbb0, result=result@entry=0x7f6837850d80)
    at xccdf_policy.c:2193
#3  0x00007f6835881fa3 in xccdf_policy_add_final_setvalues (policy=policy@entry=0x7f68371a1b10, item=0x7f6836f8a040, result=result@entry=0x7f6837850d80)
    at xccdf_policy.c:2213
#4  0x00007f6835881fe3 in xccdf_policy_add_final_setvalues (policy=policy@entry=0x7f68371a1b10, item=0x7f6836f1f280, result=result@entry=0x7f6837850d80)
    at xccdf_policy.c:2220
#5  0x00007f6835881fe3 in xccdf_policy_add_final_setvalues (policy=policy@entry=0x7f68371a1b10, item=0x7f6836e57630, result=result@entry=0x7f6837850d80)
    at xccdf_policy.c:2220
#6  0x00007f6835882083 in xccdf_policy_add_final_setvalues (policy=policy@entry=0x7f68371a1b10, item=0x7f6836e186c0, result=result@entry=0x7f6837850d80)
    at xccdf_policy.c:2235
#7  0x00007f683588220d in xccdf_policy_evaluate (policy=policy@entry=0x7f68371a1b10) at xccdf_policy.c:2318
#8  0x00007f683587ddea in xccdf_session_evaluate (session=session@entry=0x7f6836d00b60) at xccdf_session.c:906
#9  0x00007f6835cf4210 in app_evaluate_xccdf (action=0x7fff67b1c800) at oscap-xccdf.c:490
#10 0x00007f6835cefc69 in oscap_module_call (action=0x7fff67b1c800) at oscap-tool.c:261
#11 oscap_module_process (module=0x7f6835efdb60 <XCCDF_EVAL>, module@entry=0x7f6835efd0e0 <OSCAP_ROOT_MODULE>, argc=argc@entry=8, argv=argv@entry=0x7fff67b1ca88)
    at oscap-tool.c:346
#12 0x00007f6835cee9b1 in main (argc=8, argv=0x7fff67b1ca88) at oscap.c:79
(gdb) info thr
  Id   Target Id         Frame 
* 1    Thread 0x7f6835cb9840 (LWP 31051) xccdf_value_instance_get_value (item=0x0) at value.c:437
(gdb)

Comment 5 Šimon Lukašík 2015-06-18 16:08:34 UTC
This is excellent back report, Joe.

Fixed in upstream moving to POST.

https://github.com/OpenSCAP/openscap/commit/f99c55726d00982bfb0c0ac99b176c787ae1f08b

Comment 8 Marek Haicman 2015-08-06 16:18:15 UTC
*** Bug 1251080 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2015-11-19 12:09:07 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.

https://rhn.redhat.com/errata/RHEA-2015-2356.html


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