Skip to content

Commit

Permalink
Upgrade chrono to 0.4.20 to address RUSTSEC-2020-0159
Browse files Browse the repository at this point in the history
See the release announcement:

- https://github.com/chronotope/chrono/releases/tag/v0.4.20

It looks like the fix for RUSTSEC-2020-0159 vendors much of the relevant
code from `tz-rs` (which Artichoke already uses):

- chronotope/chrono#677

Previous `cargo deny` error (I think this started triggering today now
that there is a fixed version out):

```console
$ cargo deny check
error[A001]: Potential segfault in `localtime_r` invocations
   ┌─ /Users/lopopolo/dev/artichoke/artichoke/Cargo.lock:15:1
   │
15 │ chrono 0.4.19 registry+https://github.com/rust-lang/crates.io-index
   │ ------------------------------------------------------------------- security vulnerability detected
   │
   = ID: RUSTSEC-2020-0159
   = Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0159
   = ### Impact

     Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

     ### Workarounds

     No workarounds are known.

     ### References

     - [time-rs/time#293](time-rs/time#293)
   = Announcement: chronotope/chrono#499
   = Solution: Upgrade to >=0.4.20
   = chrono v0.4.19
     ├── chrono-tz v0.6.1
     │   └── spinoso-time v0.5.0
     │       └── artichoke-backend v0.13.0
     │           └── artichoke v0.1.0-pre.0
     └── spinoso-time v0.5.0 (*)

advisories FAILED, bans ok, licenses ok, sources ok
```
  • Loading branch information
lopopolo committed Aug 5, 2022
1 parent ae40b16 commit 48925dc
Show file tree
Hide file tree
Showing 4 changed files with 210 additions and 10 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 117 additions & 3 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 88 additions & 3 deletions spec-runner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spinoso-time/Cargo.toml
Expand Up @@ -20,7 +20,7 @@ tzrs = ["dep:once_cell", "dep:regex", "dep:tz-rs", "dep:tzdb"]
tzrs-local = ["tzrs", "tzdb?/local"]

[dependencies]
chrono = { version = "0.4.19", default-features = false, features = ["clock"], optional = true }
chrono = { version = "0.4.20", default-features = false, features = ["clock"], optional = true }
chrono-tz = { version = "0.6.0", default-features = false, optional = true }
once_cell = { version = "1.12.0", optional = true }
regex = { version = "1.5.5", default-features = false, features = ["std"], optional = true }
Expand Down

0 comments on commit 48925dc

Please sign in to comment.