Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Upgrade time dependency to "0.3" #254

Merged
merged 2 commits into from
Jan 22, 2022
Merged

Conversation

notmandatory
Copy link
Contributor

Versions of time crate prior to 0.2.23 fail audit due to RUSTSEC-2020-0071.

Crate: time
Version: 0.1.43
Title: Potential segfault in the time crate
Date: 2020-11-18
ID: RUSTSEC-2020-0071
URL: https://rustsec.org/advisories/RUSTSEC-2020-0071
Solution: Upgrade to >=0.2.23

@notmandatory notmandatory marked this pull request as ready for review October 21, 2021 23:47
@jhpratt
Copy link

jhpratt commented Oct 22, 2021

I highly recommend you do not rely on time-macros directly. It is designed solely to be re-exported through time and can have otherwise breaking changes at any point. The best thing to do is enable the macros feature on the time crate.

Versions of time crate prior to 0.2.23 fail audit due to RUSTSEC-2020-0071.

Crate: time
Version: 0.1.43
Title: Potential segfault in the time crate
Date: 2020-11-18
ID: RUSTSEC-2020-0071
URL: https://rustsec.org/advisories/RUSTSEC-2020-0071
Solution: Upgrade to >=0.2.23
@notmandatory
Copy link
Contributor Author

@jhpratt thanks for the recommendation, I removed the time-macros dev-dependency and enabled the time "macros" feature.

@notmandatory notmandatory mentioned this pull request Oct 22, 2021
3 tasks
@Plecra
Copy link
Member

Plecra commented Oct 25, 2021

Thanks for the PR! I'm still not sure we need the time dependency at all, but this will fit nicely into the overdue bugfixes release.

For those investigating this issue, it appears that the vulnerability doesn't affect zip's usage of time 0.1. It's still a hazard, but only for the conversions made in client code.

Can you please bump the MSRV version to support your clippy annotations, and I'll merge this :)

@jhpratt
Copy link

jhpratt commented Oct 25, 2021

No, zip's current usage is unsound, as time::now is called here. Being a library, there is no guarantee that a user is not calling std::env::set_var at the same time time::now is being called.

@Plecra
Copy link
Member

Plecra commented Oct 25, 2021

Oh! My mistake, then this needs to be pushed through promptly. Do you know how this should be addressed w.r.t yanking?

@jhpratt
Copy link

jhpratt commented Oct 25, 2021

Personally, I decided to leave the affected time versions up, as it would mean yanking the entirety of 0.1 (I wasn't concerned about the early releases of 0.2). For zip, I don't see it as an issue that needs yanking, as it requires some very uncommon circumstances to occur. That is, of course, my opinion. Do what you feel is best.

@notmandatory
Copy link
Contributor Author

notmandatory commented Oct 25, 2021

I bumped MSRV to 1.52.0 which should conform to your MSRV policy of 4 minor releases prior to current stable. Also fixed cargo fmt 😞, sorry for rookie error. Found a cargo doc error too and fixed that.

@djc
Copy link

djc commented Nov 2, 2021

@Plecra can we get this out now? Thanks!

dkim-furiosa added a commit to furiosa-ai/onnxrt that referenced this pull request Jan 4, 2022
@lex148
Copy link

lex148 commented Jan 5, 2022

@Plecra. I too would really like to see this PR released as soon as possible. I know your probably busy, but is there anything we can do to help you with this.

@zamazan4ik zamazan4ik merged commit 17b96ec into zip-rs:master Jan 22, 2022
@notmandatory notmandatory deleted the update_time branch October 24, 2022 20:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants