Skip to content

Fix segmenatation fault with xmlsec1 >= 1.3#2360

Open
jan-cerny wants to merge 1 commit into
OpenSCAP:mainfrom
jan-cerny:issue2358
Open

Fix segmenatation fault with xmlsec1 >= 1.3#2360
jan-cerny wants to merge 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
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