Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add advisory for segfault in openssl-probe due to environment setters #2209
Add advisory for segfault in openssl-probe due to environment setters #2209
Changes from 9 commits
24d2d14
42844c4
26f7af9
2c95894
a285059
7d47527
83e4283
baa0e08
ece1d78
09303e9
88789ba
874bdda
f079478
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought for the
< 0.1.6
bit here (and the line above) - technically this isn't correct whereinit_ssl_cert_env_vars
is still just as unsafe as it was before on 0.1.6+. I'm not sure how that interacts with tooling and this advisory though. Technically though just because someone updates to 0.1.6 doesn't really "fix" things, it's actually so long as these funtions are used then a "fix" is still necessary. In other words the true fix for this advisory isn't actually inopenssl-probe
, it's in all users ofopenssl-probe
and fixing is more broadly scoped than just updating theopenssl-probe
crateThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point -- I believe that a deprecation warning probably means that the API consumer is aware and these functions are no longer "affected" but we may need someone else to weigh in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took one more pass to clarify the role of the Rust platform locks around environment access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imagine I depend on
reqwest
, which transitively depends onopenssl-probe 0.1.5
. I see the advisory, which appears to recommend updating to0.1.6
. I runcargo update -p openssl-probe
and am satisfied that the problem is solved. But it's not!I will never see this deprecation warning, because it only appears when compiling dependencies, and warnings in dependencies are normally suppressed.
I think don't think
< 0.1.6
should go in the advisory, because it will lead to the wrong outcome for most projects.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like this advisory has large potential to be very noisy, which is something to consider. We've had a lot of backlash in the past from similarly noisy advisories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eric-seppanen native-tls did use it, it's been fixed. rustls-native-certs wasn't affected but was bumped. All relevant crate owners above were brought into the thread.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(if we end up releasing a 0.2.0 with the affected functions behind a bigger wall, we'll have to do that dance again)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this advisory we're faced with two bad choices:
openssl-probe
to0.1.6
inCargo.lock
and tooling (cargo audit
orcargo deny
) says the problem is gone. But nothing was fixed! The deprecation warning will be hidden if it's in a dependency, so these projects are still using dangerous code. This advisory didn't really have the desired effect.Which leads us to a new option:
Cargo.lock
. This assumes that the major dependent crates cooperate by replacing 0.1.6 with 0.2.0. If they don't then this is a pointless exercise.Is it worth it, considering the ecosystem churn caused by 0.1.x and 0.2.0 coexisting for a period? That's harder to answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for being long-winded. I was trying to respond to
Great! Unfortunately, nothing in this advisory says "update to
native-tls 0.2.13
". This advisory tells projects to bumpopenssl-probe
to 0.1.6, which for the vast majority of workspaces will not fix anything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the advisory definitely needs to be actionable. We published a similar advisory for
chrono
(RUSTSEC-2020-0159) which wasn't actionable and got a considerable amount of blowback, to the point that we ended up withdrawing it.It would be good to coordinate with major notable downstream dependencies (there are at least 7 with more than a million downloads) to ensure that when we publish the advisory, users of those crates simply need to
cargo update