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

cargo audit fails due to RUSTSEC-2020-0159 #575

Open
romanz opened this issue Oct 19, 2021 · 13 comments
Open

cargo audit fails due to RUSTSEC-2020-0159 #575

romanz opened this issue Oct 19, 2021 · 13 comments
Labels

Comments

@romanz
Copy link
Owner

romanz commented Oct 19, 2021

chronotope/chrono#499

@romanz
Copy link
Owner Author

romanz commented Oct 19, 2021

@romanz
Copy link
Owner Author

romanz commented Oct 19, 2021

@Kixunil
Copy link
Contributor

Kixunil commented Oct 19, 2021

Hmm, not a huge issue since we don't call setenv. We only need chrono for formatting logs, right?

@Kixunil
Copy link
Contributor

Kixunil commented Oct 19, 2021

Maybe worth looking into removing time like they did here: rusqlite/rusqlite#1031
IDK if we need it or not.

@romanz
Copy link
Owner Author

romanz commented Oct 19, 2021

IIUC, it is used by tiny_http:

"chrono",

@Kixunil
Copy link
Contributor

Kixunil commented Oct 19, 2021

Looks like the fix is in 0.9 tiny-http/tiny-http@a8260ff

@romanz
Copy link
Owner Author

romanz commented Oct 19, 2021

It still doesn't work, since latest tiny-http doesn't pass cargo audio 😞

$ git lg -1
* 9a2566c Richard Bradfield:  (HEAD -> master, tag: 0.9.0, origin/master, origin/HEAD) Prepare for 0.9.0 release (5 days ago)

$ cargo audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
      Loaded 370 security advisories (from /home/roman/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (34 crate dependencies)
Crate:         chrono
Version:       0.4.19
Title:         Potential segfault in `localtime_r` invocations
Date:          2020-11-10
ID:            RUSTSEC-2020-0159
URL:           https://rustsec.org/advisories/RUSTSEC-2020-0159
Solution:      No safe upgrade is available!
Dependency tree: 
chrono 0.4.19
└── tiny_http 0.9.0

error: 1 vulnerability found!

@romanz romanz changed the title cargo audit fails due to RUSTSEC-2020-0159 cargo audit fails due to RUSTSEC-2020-0159 Oct 19, 2021
@romanz
Copy link
Owner Author

romanz commented Oct 19, 2021

Hmm, not a huge issue since we don't call setenv. We only need chrono for formatting logs, right?

Agree - @tiny-http doesn't seem to be vulnerable (CC: @bradfier).

@romanz romanz added the build label Oct 19, 2021
@romanz romanz closed this as completed in be071b2 Oct 19, 2021
@romanz romanz reopened this Oct 19, 2021
@romanz
Copy link
Owner Author

romanz commented Oct 19, 2021

image
for a new chrono release :)

@bradfier
Copy link

Hmm, not a huge issue since we don't call setenv. We only need chrono for formatting logs, right?

Agree - @tiny-http doesn't seem to be vulnerable (CC: @bradfier).

Indeed, thanks for the @ but you're correct, we only use chrono types in one place, where we use it to store a UTC date-time and then print it out in RFC 1123 format: https://github.com/tiny-http/tiny-http/blob/9a2566c15ea0295e85ceab5eeb74cc744adefbfc/src/common.rs#L398-L414

Is there a way in the RUSTSEC database I can mark tiny-http as not vulnerable due to exactly how we use the library?

@romanz
Copy link
Owner Author

romanz commented Oct 20, 2021

... but you're correct, we only use chrono types in one place, where we use it to store a UTC date-time and then print it out in RFC 1123 format: https://github.com/tiny-http/tiny-http/blob/9a2566c15ea0295e85ceab5eeb74cc744adefbfc/src/common.rs#L398-L414

Cool, many thanks for the update!

@romanz
Copy link
Owner Author

romanz commented Oct 20, 2021

Is there a way in the RUSTSEC database I can mark tiny-http as not vulnerable due to exactly how we use the library?

Not sure, maybe it's possible to ask here (following rustsec/advisory-db#1082).

@romanz
Copy link
Owner Author

romanz commented Oct 20, 2021

Maybe chronotope/chrono#602 (comment) can help here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants