#1149128 openscap-scanner: SCE checks fail without openscap-utils when scripts are not executable

Package:
openscap-scanner
Source:
openscap-scanner
Description:
OpenScap Scanner Tool (oscap)
Submitter:
Date:
2026-10-22 21:33:01 UTC
Severity:
normal
Tags:
#1149128#5
Date:
2026-09-27 01:37:54 UTC
From:
To:
Version: 1.4.2+dfsg-1

Severity: normal



The SCE engine in libopenscap33 falls back to /usr/bin/oscap-run-sce-script

when a check script is not executable. That helper ships in openscap-utils,

and nothing in the scanner's dependency chain pulls it in. With only

openscap-scanner installed, every SCE check that takes the fallback ends in

"error", and oscap prints nothing at default verbosity to say why.



The fallback matters in practice. When evaluating a data stream, oscap

extracts SCE scripts under /tmp, and both CIS and ANSSI BP-028 require /tmp

to be mounted noexec. So the scanner fails on exactly the systems those

benchmarks target.



Minimal reproducer on a clean trixie install. No content or mounts needed,

since chmod -x takes the same code path as a noexec /tmp.



  $ sudo apt install openscap-scanner

  $ mkdir sce-repro && cd sce-repro

  $ cat > bench.xml <<'XML'

  <?xml version="1.0" encoding="UTF-8"?>

  <Benchmark xmlns=" http://checklists.nist.gov/xccdf/1.2 "

             id="xccdf_org.example_benchmark_sce" resolved="1">

    <status>draft</status>

    <version>1</version>

    <Rule id="xccdf_org.example_rule_sce" selected="true">

      <title>SCE helper reproducer</title>

      <check system=" http://open-scap.org/page/SCE ">

        <check-content-ref href="check.sh"/>

      </check>

    </Rule>

  </Benchmark>

  XML

  $ printf '#!/bin/sh\nexit "$XCCDF_RESULT_PASS"\n' > check.sh

  $ chmod +x check.sh; oscap xccdf eval bench.xml 2>&1 | grep -i result

  Result  pass

  $ chmod -x check.sh; oscap xccdf eval bench.xml 2>&1 | grep -i result

  Result  error

  $ sudo apt install openscap-utils

  $ oscap xccdf eval bench.xml 2>&1 | grep -i result

  Result  pass



Suggested fix: ship oscap-run-sce-script in openscap-common. It is a short

bash script, so Architecture: all fits, and openscap-scanner already depends

on openscap-common. openscap-scanner would work too. Either way the move

needs Breaks/Replaces: openscap-utils (<< fixed version).



Related:



- Upstream: https://github.com/OpenSCAP/openscap/issues/2414  (triaged)

- Upstream #2243, reported on Debian 13 and resolved by installing

  openscap-utils: https://github.com/OpenSCAP/openscap/issues/2243

- Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openscap/+bug/2166636

  Ubuntu carries no delta, so a Debian fix reaches Ubuntu as well.



Thomas Moore (realstuffie)

#1149128#10
Date:
2026-10-08 03:05:47 UTC
From:
To:

Hi All,



The attached debdiff against 1.4.4+dfsg-2 moves oscap-run-sce-script to

openscap-common, with Breaks/Replaces on openscap-utils (<< 1.4.4+dfsg-3~).



Built and tested on Debian 13.7 with the reproducer from the report:



- stock openscap-scanner 1.4.2+dfsg-1 alone: error

- patched lib, common and scanner, no openscap-utils: pass

- apt upgrade with stock openscap-utils installed: the helper moves to

  openscap-common and the check passes



Thomas Moore

#1149128#17
Date:
2026-10-20 18:24:15 UTC
From:
To:
Hi Thomas,

Looks good.

I hope to have this patch, together with the new upstream release,
uploaded within the week.

Regards,
Håvard

#1149128#20
Date:
2026-10-22 21:31:49 UTC
From:
To:
Hello,

Bug #1149128 in openscap reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/openscap/-/commit/998fe736f7fd440ad8469fb179ae579a21848d49
------------------------------------------------------------------------
Ship oscap-run-sce-script in openscap-common instead of openscap-utils

libopenscap runs SCE check scripts through it when a script is not
executable, as happens when /tmp is mounted noexec. With only
openscap-scanner installed, those checks ended in error.

Gbp-Dch: short
Closes: #1149128
Thanks: Thomas Moore for the patch
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1149128