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

Fixed BearSSL bug: EXC_BAD_ACCESS on incomplete CA cert #8476

wants to merge 2 commits into from


Copy link

@jan2000 jan2000 commented Feb 19, 2022

Separated from: #8106

When having a incomplete CA cert (for example missing a newline at the end) in the function load_cafile the code after case BR_PEM_END_OBJ: will not be executed. This will result in an extra ta (ca.anchors) that does not have its data set. Because ta->dn.len is not set (thus a random value) this will result in EXC_BAD_ACCESS in BearSSL because it expects correct values. The fix is to only add the new ta after case BR_PEM_END_OBJ:.

Copy link

Looks good to me.

@jay jay closed this in f36e32b Feb 20, 2022
Copy link

jay commented Feb 20, 2022


@jan2000 jan2000 deleted the bearssl-fix-incomplete-cacert branch April 22, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging this pull request may close these issues.

None yet

3 participants