Skip to content

Fix segmentation fault with xmlsec1 >= 1.3#2360

Merged
Mab879 merged 1 commit into
OpenSCAP:mainfrom
jan-cerny:issue2358
Jun 2, 2026
Merged

Fix segmentation fault with xmlsec1 >= 1.3#2360
Mab879 merged 1 commit into
OpenSCAP:mainfrom
jan-cerny:issue2358

Conversation

@jan-cerny
Copy link
Copy Markdown
Member

  • Patch openscap src/source/signature.c to not call xmlSecCryptoAppShutdown() after signature validation
  • xmlsec1 1.3 (PR #1133) added OPENSSL_cleanup() to this path to fix valgrind warnings, but OPENSSL_cleanup() is irreversible and destroys all process-global OpenSSL state
  • Any subsequent OpenSSL usage (e.g. librpm probe threads) segfaults
  • The patch initializes xmlsec/OpenSSL once per process via pthread_once and removes the shutdown calls

Patch authored by: @p5

Fixes: #2358

- Patch openscap src/source/signature.c to not call
  `xmlSecCryptoAppShutdown()` after signature validation
- xmlsec1 1.3 (PR OpenSCAP#1133) added `OPENSSL_cleanup()` to this path to fix
  valgrind warnings, but `OPENSSL_cleanup()` is irreversible and destroys
  all process-global OpenSSL state
- Any subsequent OpenSSL usage (e.g. librpm probe threads) segfaults
- The patch initializes xmlsec/OpenSSL once per process via
  `pthread_once` and removes the shutdown calls

Patch authored by: @p5

Fixes: OpenSCAP#2358
@sonarqubecloud
Copy link
Copy Markdown

@Mab879 Mab879 self-assigned this May 28, 2026
@Mab879 Mab879 changed the title Fix segmenatation fault with xmlsec1 >= 1.3 Fix segmentation fault with xmlsec1 >= 1.3 Jun 2, 2026
@Mab879 Mab879 merged commit 1edea69 into OpenSCAP:main Jun 2, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oscap xccdf eval segfaults with xmlsec1 >= 1.3

2 participants