[SRU] Allow openscap to be less strict about epoch digit and able to build security certification projects

Bug #2004476 reported by Eduardo Barretto
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openscap (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Back in [1] where we added dpkg version comparison algorithm, we were too strict about the epoch number, where oscap would return an error message if no epoch number was provided. This SRU backports the fix provided to upstream [2] and released with openscap 1.3.7, meaning lunar is not affected by it.

[Test Case]
Attached to this bug is a zip file that contains OVAL data for one package (expat) and data of one CVE (CVE-2022-43680). The OVAL data is in both OCI
and non-OCI format.

The test consists of comparing the installed version of the mentioned
packages, to different versions where the CVE could have been fixed.

Testing procedure (Bionic):
$ sudo apt update
$ sudo apt install libopenscap8
$ sudo apt install libexpat1
$ tar -xzf test-data.tar.gz
$ cd test-data/
$ ./run.sh

Here is the output of the test, with current openscap in jammy:
$ ./run.sh
oscap oval eval com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: error
Definition oval:com.ubuntu.jammy:def:100: true
OpenSCAP Error: Invalid epoch. [../../../../src/OVAL/results/oval_cmp_evr_string.c:399]
oscap oval eval oci.com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: error
OpenSCAP Error: Invalid epoch. [../../../../src/OVAL/results/oval_cmp_evr_string.c:399]

and the output of the test, with patched openscap in jammy:
$ ./run.sh
oscap oval eval com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: false
Definition oval:com.ubuntu.jammy:def:100: true
Evaluation done.
oscap oval eval oci.com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: false
Evaluation done.

[Where problems could occur]

The patch touches the comparison algorithm, so any regressions that it might have, might impact the comparison and scanning results.

[Other Info]

The epoch issue affects all releases from Bionic to Kinetic, and it also Trusty ESM and Xenial ESM and we will be handling those in the ESM PPAs.

The versioning algorithm implemented is based on dpkg's algorithm.

Upstream accepted and merged the Debian epoch fix to its maint-1.3 branch and it already made into 1.3.7 version [3]

[1] https://bugs.launchpad.net/ubuntu/+source/openscap/+bug/1911791
[2] https://github.com/OpenSCAP/openscap/pull/1901
[3] https://github.com/OpenSCAP/openscap/releases/tag/1.3.7

description: updated
description: updated
Revision history for this message
Eduardo Barretto (ebarretto) wrote :
Revision history for this message
Eduardo Barretto (ebarretto) wrote :
Revision history for this message
Eduardo Barretto (ebarretto) wrote :
Revision history for this message
Eduardo Barretto (ebarretto) wrote :
Revision history for this message
Eduardo Barretto (ebarretto) wrote :
Revision history for this message
Alex Murray (alexmurray) wrote :

Sponsored to -proposed for bionic, focal, jammy and kinetic

Changed in openscap (Ubuntu Bionic):
status: New → In Progress
Changed in openscap (Ubuntu Focal):
status: New → In Progress
Changed in openscap (Ubuntu Jammy):
status: New → In Progress
Changed in openscap (Ubuntu Kinetic):
status: New → In Progress
summary: - Allow openscap to be less strict about epoch digit and able to build
- security certification projects
+ [SRU] Allow openscap to be less strict about epoch digit and able to
+ build security certification projects
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openscap (Ubuntu Trusty):
status: New → Confirmed
Changed in openscap (Ubuntu Xenial):
status: New → Confirmed
Changed in openscap (Ubuntu):
status: New → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

As far as I can see, the test plan is not contemplating a test for https://bugs.launchpad.net/ubuntu/+source/openscap/+bug/2002551. This bug here is mixing two fixes, and that is always confusing.

I suggest you add a normal SRU template to https://bugs.launchpad.net/ubuntu/+source/openscap/+bug/2002551, and remove references to it from this bug here. So we have two normal bugs, being fixed in one SRU upload. Distinct test cases and verifications.

description: updated
Changed in openscap (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in openscap (Ubuntu Xenial):
status: Confirmed → In Progress
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Eduardo, or anyone else affected,

Accepted openscap into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openscap/1.2.17-0.1ubuntu7.22.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openscap (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eduardo, or anyone else affected,

Accepted openscap into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openscap/1.2.17-0.1ubuntu7.22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openscap (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eduardo, or anyone else affected,

Accepted openscap into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openscap/1.2.15-1ubuntu0.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openscap (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Changed in openscap (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eduardo, or anyone else affected,

Accepted openscap into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openscap/1.2.16-2ubuntu3.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openscap (Ubuntu Trusty):
status: In Progress → Fix Committed
Changed in openscap (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Eduardo Barretto (ebarretto) wrote :

I can confirm that using proposed version of openscap does solve the issue:

$ dpkg -l | grep openscap
ii libopenscap8 1.2.15-1ubuntu0.4 amd64 Set of libraries enabling integration of the SCAP line of standards

$ ./run.sh
oscap oval eval com.ubuntu.bionic.cve.oval.xml
Definition oval:com.ubuntu.bionic:def:2022436800000000: false
Definition oval:com.ubuntu.bionic:def:100: true
Evaluation done.
oscap oval eval oci.com.ubuntu.bionic.cve.oval.xml
Definition oval:com.ubuntu.bionic:def:2022436800000000: false
Evaluation done.

tags: added: verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Eduardo, can you please add a test verification for the other ubuntu releases? You only tested bionic in comment #20, but flipped the verification tag for all releases.

tags: added: verification-needed-focal verification-needed-jammy verification-needed-kinetic
removed: verification-done-focal verification-done-jammy verification-done-kinetic
Revision history for this message
Eduardo Barretto (ebarretto) wrote :

I tested them all, including esm releases

Revision history for this message
Eduardo Barretto (ebarretto) wrote :

Focal testing results:
With current archive version:
$ dpkg -l | grep openscap
ii libopenscap8 1.2.16-2ubuntu3.2 amd64 Set of libraries enabling integration of the SCAP line of standards

$ ./run.sh
oscap oval eval com.ubuntu.focal.cve.oval.xml
Definition oval:com.ubuntu.focal:def:2022436800000000: false
Definition oval:com.ubuntu.focal:def:100: true
Evaluation done.
oscap oval eval oci.com.ubuntu.focal.cve.oval.xml
Definition oval:com.ubuntu.focal:def:2022436800000000: error
OpenSCAP Error: Invalid epoch. [../../../../src/OVAL/results/oval_cmp_evr_string.c:399]

With proposed version:
$ dpkg -l | grep openscap
ii libopenscap8 1.2.16-2ubuntu3.3 amd64 Set of libraries enabling integration of the SCAP line of standards

$ ./run.sh
oscap oval eval com.ubuntu.focal.cve.oval.xml
Definition oval:com.ubuntu.focal:def:2022436800000000: false
Definition oval:com.ubuntu.focal:def:100: true
Evaluation done.
oscap oval eval oci.com.ubuntu.focal.cve.oval.xml
Definition oval:com.ubuntu.focal:def:2022436800000000: false
Evaluation done.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Eduardo Barretto (ebarretto) wrote :

Jammy testing results:
With current archive version:
$ dpkg -l | grep openscap
ii libopenscap8 1.2.17-0.1ubuntu7 amd64 Set of libraries enabling integration of the SCAP line of standards

$ ./run.sh
oscap oval eval com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: error
Definition oval:com.ubuntu.jammy:def:100: true
OpenSCAP Error: Invalid epoch. [../../../../src/OVAL/results/oval_cmp_evr_string.c:399]
oscap oval eval oci.com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: error
OpenSCAP Error: Invalid epoch. [../../../../src/OVAL/results/oval_cmp_evr_string.c:399]

With proposed version:
$ dpkg -l | grep openscap
ii libopenscap8 1.2.17-0.1ubuntu7.22.04.1 amd64 Set of libraries enabling integration of the SCAP line of standards

$ ./run.sh
oscap oval eval com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: false
Definition oval:com.ubuntu.jammy:def:100: true
Evaluation done.
oscap oval eval oci.com.ubuntu.jammy.cve.oval.xml
Definition oval:com.ubuntu.jammy:def:2022436800000000: false
Evaluation done.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Eduardo Barretto (ebarretto) wrote :

Kinetic testing results:
With current archive version:
$dpkg-query -l | grep openscap
ii libopenscap8 1.2.17-0.1ubuntu7 amd64 Set of libraries enabling integration of the SCAP line of standards

$ ./run.sh
oscap oval eval com.ubuntu.kinetic.cve.oval.xml
Definition oval:com.ubuntu.kinetic:def:2022436800000000: false
Definition oval:com.ubuntu.kinetic:def:100: true
Evaluation done.
oscap oval eval oci.com.ubuntu.kinetic.cve.oval.xml
Definition oval:com.ubuntu.kinetic:def:2022436800000000: error
OpenSCAP Error: Invalid epoch. [../../../../src/OVAL/results/oval_cmp_evr_string.c:399]

With proposed version:
$ dpkg-query -l | grep openscap
ii libopenscap8 1.2.17-0.1ubuntu7.22.10.1 amd64 Set of libraries enabling integration of the SCAP line of standards

$ ./run.sh
oscap oval eval com.ubuntu.kinetic.cve.oval.xml
Definition oval:com.ubuntu.kinetic:def:2022436800000000: false
Definition oval:com.ubuntu.kinetic:def:100: true
Evaluation done.
oscap oval eval oci.com.ubuntu.kinetic.cve.oval.xml
Definition oval:com.ubuntu.kinetic:def:2022436800000000: false
Evaluation done.

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I verified the test results and am satisfied that they show the executed planned test case, and that the results are correct.

The package built correctly in all architectures and Ubuntu releases it was meant for.

There are no DEP8 regressions.

There is no SRU freeze ongoing at the moment.

There is no halted phasing on the previous update.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Note that there are no uploads for trusty or xenial, but this doesn't block the sru for the other (later) releases.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openscap - 1.2.17-0.1ubuntu7.22.10.1

---------------
openscap (1.2.17-0.1ubuntu7.22.10.1) kinetic; urgency=medium

  * Make dpkg version comparison less strict for epoch digit. (LP: #2004476)
    - d/p/debian-epoch-less-strict.patch: oval_cmp_evr_string:
      Make epoch comparison less restrict for dpkg.
  * Allow build of ComplianceAsCode and USG projects for platforms that use
    remote resources. (LP: #2002551)
    - d/p/allow-DS-session-to-continue-without-remote-resource.patch:
      Allow DS session to continue without remote resource.

 -- Eduardo Barretto <email address hidden> Tue, 31 Jan 2023 13:16:05 +0100

Changed in openscap (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for openscap has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openscap - 1.2.17-0.1ubuntu7.22.04.1

---------------
openscap (1.2.17-0.1ubuntu7.22.04.1) jammy; urgency=medium

  * Make dpkg version comparison less strict for epoch digit. (LP: #2004476)
    - d/p/debian-epoch-less-strict.patch: oval_cmp_evr_string:
      Make epoch comparison less restrict for dpkg.
  * Allow build of ComplianceAsCode and USG projects for platforms that use
    remote resources. (LP: #2002551)
    - d/p/allow-DS-session-to-continue-without-remote-resource.patch:
      Allow DS session to continue without remote resource.

 -- Eduardo Barretto <email address hidden> Tue, 31 Jan 2023 13:18:40 +0100

Changed in openscap (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openscap - 1.2.16-2ubuntu3.3

---------------
openscap (1.2.16-2ubuntu3.3) focal; urgency=medium

  * Make dpkg version comparison less strict for epoch digit. (LP: #2004476)
    - d/p/debian-epoch-less-strict.patch: oval_cmp_evr_string:
      Make epoch comparison less restrict for dpkg.
  * Allow build of ComplianceAsCode and USG projects for platforms that use
    remote resources. (LP: #2002551)
    - d/p/allow-DS-session-to-continue-without-remote-resource.patch:
      Allow DS session to continue without remote resource.

 -- Eduardo Barretto <email address hidden> Tue, 31 Jan 2023 13:27:43 +0100

Changed in openscap (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openscap - 1.2.15-1ubuntu0.4

---------------
openscap (1.2.15-1ubuntu0.4) bionic; urgency=medium

  * Make dpkg version comparison less strict for epoch digit. (LP: #2004476)
    - d/p/debian-epoch-less-strict.patch: oval_cmp_evr_string:
      Make epoch comparison less restrict for dpkg.
  * Allow build of ComplianceAsCode and USG projects for platforms that use
    remote resources. (LP: #2002551)
    - d/p/allow-DS-session-to-continue-without-remote-resource.patch:
      Allow DS session to continue without remote resource.

 -- Eduardo Barretto <email address hidden> Tue, 31 Jan 2023 13:38:45 +0100

Changed in openscap (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in openscap (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Eduardo Barretto (ebarretto) wrote :

openscap for trusty and xenial released under Ubuntu Pro

Changed in openscap (Ubuntu Trusty):
status: Fix Committed → Fix Released
Changed in openscap (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.