Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent accessing of global c++ objects once they are deleted #742

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Emantor
Copy link

@Emantor Emantor commented Mar 13, 2024

Fixes (Maybe) #729.
Reset objects_deleted after reset is called.

jwsbck added a commit to jwsbck/meta-trustx that referenced this pull request Aug 8, 2024
Softhsm2 seems to be rarely maintained these days and has a bug that
leads to segfaults when running through Openssl library destructors. Add
the Patch from [1] until this is fixed upstream.

[1] softhsm/SoftHSMv2#742

Signed-off-by: Johannes Wiesboeck <[email protected]>
quitschbo pushed a commit to gyroidos/meta-trustx that referenced this pull request Aug 8, 2024
Softhsm2 seems to be rarely maintained these days and has a bug that
leads to segfaults when running through Openssl library destructors. Add
the Patch from [1] until this is fixed upstream.

[1] softhsm/SoftHSMv2#742

Signed-off-by: Johannes Wiesboeck <[email protected]>
jwsbck added a commit to jwsbck/meta-trustx that referenced this pull request Aug 8, 2024
Softhsm2 seems to be rarely maintained these days and has a bug that
leads to segfaults when running through Openssl library destructors. Add
the Patch from [1] until this is fixed upstream.

[1] softhsm/SoftHSMv2#742

Signed-off-by: Johannes Wiesboeck <[email protected]>
jwsbck added a commit to jwsbck/meta-trustx that referenced this pull request Aug 8, 2024
Softhsm2 seems to be rarely maintained these days and has a bug that
leads to segfaults when running through Openssl library destructors. Set
the SRC_URI to the current development version as the last "release" is
from 2020. Add the Patch from [1] until this is fixed upstream.

[1] softhsm/SoftHSMv2#742

Signed-off-by: Johannes Wiesboeck <[email protected]>
@kraj
Copy link

kraj commented Sep 27, 2024

hmm reading through #729 it seems to be a fix for openSSL's behavior where its using atexit, I wonder if openSSL exit sequence should not call atexit and let the system cleanup happen via system runtime. atexit seems to be tied to implementation and for c++ it may run concurrently alongside destructors [1], in C it maybe called concurrently with other functions too.

[1] https://en.cppreference.com/w/cpp/utility/program/atexit

@jschlyter jschlyter marked this pull request as draft November 29, 2024 16:27
@jschlyter
Copy link
Contributor

Please rebase on develop and mark as ready when ready.

@Emantor Emantor marked this pull request as ready for review January 10, 2025 17:38
@Emantor Emantor requested a review from a team as a code owner January 10, 2025 17:38
src/lib/SoftHSM.cpp Outdated Show resolved Hide resolved
@MorningLightMountain713

I look forward to this getting merged. Here is a before and after of this patch applied:

Screenshot 2025-01-14 at 1 13 12 PM

@jschlyter jschlyter requested a review from bjosv January 14, 2025 15:29
Fixes (Maybe) softhsm#729.
Reset objects_deleted after reset is called.
Copy link
Contributor

@bjosv bjosv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there is a better way but I guess this work unless we look into some refactoring.
Maybe add a comment with the reason for using a objects_deleted.

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.

7 participants