-
Notifications
You must be signed in to change notification settings - Fork 2
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
Denial of service through malicious payloads #21
Comments
To elaborate a bit more, I found this separately through the following fuzzing harness: #[macro_use]
extern crate afl;
fn main() {
fuzz!(|data: &[u8]| {
if let Ok(s) = std::str::from_utf8(data) {
parse_duration::parse(s);
}
});
} Example hanging inputs: |
FYI, there is an open PR (rustsec/advisory-db#827) to include this vulnerability in the RustSec Security Advisory Database. It'd be great to hear back from @zeta12ti before we merge it (and ideally have a fixed version out). |
This repository is no longer being maintained (by me, at least). If anyone wants to pick it up, here are some options to fix this:
|
Aah, good to know @zeta12ti Is it okay if we publish the security advisory for this issue to the RustSec database? We can also publish a notice that this crate is presently unmaintained |
@tarcieri Go for it. Should I publish one last version so that the updated README shows up on crates.io, or is updating an unmaintained crate frowned upon (since it changes the "last updated" date)? |
@zeta12ti if you'd like to publish one last version that'd be good. We generally mark the unmaintained crate notices as having any hypothetical release after the last known released version count as "patched", so if someone does decide to start maintaining any of the crates we have marked as "unmaintained" again, the notices auto-clear. |
I am willing to take over this crate |
Hey,
As reported in #18 there are payloads that makes the
parse_duration::parse(input)
to cause denial of service through big integerpow
calculations.I am not sure if the suggested solution is the best one, maybe there should be a way to specify the exponent limit or whether we accept an exponent at all in the duration string.
Since the repo didn't have any commit for a ~year, @zeta12ti are you going to fix it?
The text was updated successfully, but these errors were encountered: