You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Panic caused by out of bounds error in privkey parsing #3
I found this by running AFL against the privkey parser. In openssh::Asn1::sequence there are the lines
let bytes = self.read_len()?;let res = Asn1::new(&self.data[self.offset..self.offset+bytes]);
self.offset is bounds-checked at the beginning of the function, but bytes is not, or at least not sufficiently. Here's a private key that triggers a panic:
Activity
tailhook commentedon Apr 7, 2020
Fixed. Thanks!
I assumed that if you put the "key" here, I can use it in tests. Let me know if I'm wrong.
Also it's interesting that previuos fuzzy testing didn't caught this.
rozbb commentedon Apr 8, 2020
Woah, that was a super quick response! Thanks for looking at this. Yeah, the key I put here isn't sensitive at all.