Skip to content

Fix mixed up advisories RUSTSEC-2020-0071 and RUSTSEC-2020-0159 #2285

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions crates/chrono/RUSTSEC-2020-0159.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,26 @@ Unix-like operating systems may segfault due to dereferencing a dangling pointer

### Workarounds

No workarounds are known.
A possible workaround for crates affected through the transitive dependency in `chrono`, is to avoid using the default `oldtime` feature dependency of the `chrono` crate by disabling its `default-features` and manually specifying the required features instead.

### References
#### Examples:

- [time-rs/time#293](https://github.com/time-rs/time/issues/293)
`Cargo.toml`:

```toml
chrono = { version = "0.4", default-features = false, features = ["serde"] }
```

```toml
chrono = { version = "0.4.22", default-features = false, features = ["clock"] }
```

Commandline:

```bash
cargo add chrono --no-default-features -F clock
```

Sources:
- [chronotope/chrono#602 (comment)](https://github.com/chronotope/chrono/issues/602#issuecomment-1242149249)
- [vityafx/serde-aux#21](https://github.com/vityafx/serde-aux/issues/21)
24 changes: 3 additions & 21 deletions crates/time/RUSTSEC-2020-0071.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,8 @@ Users of time 0.1 do not have a patch and should upgrade to an unaffected versio

### Workarounds

A possible workaround for crates affected through the transitive dependency in `chrono`, is to avoid using the default `oldtime` feature dependency of the `chrono` crate by disabling its `default-features` and manually specifying the required features instead.
No workarounds are known.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this again, I agree with @djc that the original text does make sense since it's talking about time as a chrono dependency, and offering workarounds to avoid that, which seems fine to me.

Apologies if I said something else before, I missed this particular bit of context.


#### Examples:
### References

`Cargo.toml`:

```toml
chrono = { version = "0.4", default-features = false, features = ["serde"] }
```

```toml
chrono = { version = "0.4.22", default-features = false, features = ["clock"] }
```

Commandline:

```bash
cargo add chrono --no-default-features -F clock
```

Sources:
- [chronotope/chrono#602 (comment)](https://github.com/chronotope/chrono/issues/602#issuecomment-1242149249)
- [vityafx/serde-aux#21](https://github.com/vityafx/serde-aux/issues/21)
- [time-rs/time#293](https://github.com/time-rs/time/issues/293)