ComplianceAsCode / content

Security automation content in SCAP, Bash, Ansible, and other formats
https://complianceascode.readthedocs.io/en/latest/
Other
2.17k stars 685 forks source link

Segfault on RHEL8 w/ GUI while remediating CIS Workstation L2 with Automatus #9583

Closed yuumasato closed 1 year ago

yuumasato commented 1 year ago

Description of problem:

OpenSCAP core dumps when starting remediation phase of CIS Workstation L2 on a RHEL8 with GUI.

SCAP Security Guide Version:

v0.1.64

Operating System Version:

RHEL8 with GUI

Steps to Reproduce:

Example execution command:

  1. 'python3 /tmp/tmp.fUIAyS4gDg/rpmbuild/BUILD/scap-security-guide-0.1.64/tests/test_suite.py profile --libvirt qemu:///system test_suite_vm --datastream /tmp/ssg-rhel8-ds.xml --xccdf-id scap_org.open-scap_cref_ssg-rhel8-xccdf-1.2.xml --mode online --remediate-using oscap xccdf_org.ssgproject.content_profile_cis_workstation_l2'

Actual Results:

D: oscap:       func@(nil)(res)=0x7f10c8035060 [oscap(38665):oscap(7f11050c60c0):seap-command.c:288:SEAP_cmd_exec]
D: oscap:       CMD -> SEXP [oscap(38665):oscap(7f11050c60c0):seap-packet.c:444:SEAP_packet_cmd2sexp]
D: oscap: ("seap.cmd" ":id" 24 ":reply_id" 22 ":class" "usr" ":type" "async" 2 ("oval:ssg-object_sysctl_net_ipv6_conf_default_accept_ra_static_set_sysctls_unfiltered:obj:1" 0 ) ) [oscap(38665):oscap(7f11050c60c0):seap-packet.c:445:SEAP_packet_cmd2sexp]
D: oscap:       packet size: 691 [oscap(38665):oscap(7f11050c60c0):seap-packet.c:446:SEAP_packet_cmd2sexp]
D: oscap:       Received packet [oscap(38665):input_handler(7f10ac7f8700):seap-packet.c:794:SEAP_packet_recv]
D: oscap: ("seap.cmd" ":id" 24 ":reply_id" 22 ":class" "usr" ":type" "async" 2 ("oval:ssg-object_sysctl_net_ipv6_conf_default_accept_ra_static_set_sysctls_unfiltered:obj:1" 0 ) ) [oscap(38665):input_handler(7f10ac7f8700):seap-packet.c:795:SEAP_packet_recv]
D: oscap:       packet size: 691 [oscap(38665):input_handler(7f10ac7f8700):seap-packet.c:796:SEAP_packet_recv]
D: oscap:       code=22, args=0x558f5332a210 [oscap(38665):input_handler(7f10ac7f8700):seap-command.c:237:SEAP_cmd_exec]
D: oscap:       EXEC_LOCAL [oscap(38665):input_handler(7f10ac7f8700):seap-command.c:245:SEAP_cmd_exec]
D: oscap:       rec=0x7f10c803a120, w=1 [oscap(38665):input_handler(7f10ac7f8700):seap-command.c:273:SEAP_cmd_exec]
D: oscap:       name=reply-id, value=0x7f10d0076560 [oscap(38665):probe_worker(7f10997d2700):seap-message.c:73:SEAP_msg_free]
D: oscap:       name=reply-id, value=0x7f10d00156b0 [oscap(38665):probe_worker(7f10997d2700):seap-message.c:73:SEAP_msg_free]
D: oscap:       name=no-reply, value=(nil) [oscap(38665):probe_worker(7f10997d2700):seap-message.c:73:SEAP_msg_free]
D: oscap:       probe_worker_runfn has finished [oscap(38665):probe_worker(7f10997d2700):worker.c:179:probe_worker_runfn]
D: oscap:       cond return: h.args=0x558f5332a210 [oscap(38665):probe_worker(7f1099fd3700):seap-command.c:427:SEAP_cmd_exec]
D: oscap:       EVAL: result=0x7f10c80370c0 [oscap(38665):probe_worker(7f1099fd3700):worker.c:806:probe_set_eval]
D: oscap: (4 () () () ) [oscap(38665):probe_worker(7f1099fd3700):worker.c:808:probe_set_eval]
D: oscap:       res=(nil) [oscap(38665):input_handler(7f10ac7f8700):seap-command.c:282:SEAP_cmd_exec]
D: oscap:       func@(nil)(res)=(nil) [oscap(38665):input_handler(7f10ac7f8700):seap-command.c:288:SEAP_cmd_exec]
D: oscap:       code=1, args=0x7f10c8035220 [oscap(38665):probe_worker(7f1099fd3700):seap-command.c:237:SEAP_cmd_exec]
D: oscap:       EXEC_REMOTE [oscap(38665):probe_worker(7f1099fd3700):seap-command.c:300:SEAP_cmd_exec]
bash: line 1: 38665 Segmentation fault      (core dumped) oscap "xccdf" "eval" "--verbose" "DEVEL" "--remediate" "--benchmark-id" "xccdf_org.ssgproject.content_benchmark_RHEL-8" "--profile" "xccdf_org.ssgproject.content_profile_cis_workstation_l2" "--progress" "--oval-results" "--report" "/tmp/tmp.hyjiVNMdow/report.html" "/tmp/tmp.hyjiVNMdow/input.xml"
scp: /tmp/tmp.hyjiVNMdow/report.html: No such file or directory
Failed to copy the HTML report back to local machine!
Connection to 192.168.122.81 closed by remote host.

Expected Results:

No segfault and system with remediations applied.

Additional Information/Debugging Steps:

segfault.zip

yuumasato commented 1 year ago

I'm not able to reproduce this issue, and moreover there was a mixup in the test execution.

evgenyz commented 1 year ago

Well, a segfault is a segfault in any case.

evgenyz commented 1 year ago

But without a way to reproduce it we of course would not be able to find it in a reasonable amount of time (or at all).