Skip to content

Conversation

oskarwirga
Copy link

This problem cropped up when I was trying to enable CFI-icall with Opusfile as a dependency. CFI indirect function call sanitization checks that function signatures at runtime match those that were determined at compile time. This fix ensures that fclose has the correct function signature when being passed a stream.

I have a quick sample here on Godbolt: https://godbolt.org/z/EGsPYae51

An exit code of 132 is SIGILL which means a CFI violation was found and program execution was stopped.

Context:

CFI indirect function call sanitization checks that function signatures at runtime match those that were determined at compile time. This fix ensures that fclose has the correct function signature when being passed a stream.
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.

1 participant