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

Possible denial of service vulnerability in Pem2CNG and Pem2Xml #5

Open
douglasheld opened this issue Apr 23, 2016 · 0 comments
Open

Comments

@douglasheld
Copy link

In line 229 of Main.cs from Pem2CNG and in line 291 of Pem2XML, it is possible for the attacker to deny service by somehow specifying a really large file or stream for the pem specification. The StreamReader will block the thread until an EOF byte is read.

I wouldn't get into more detail about how an attacker may actually set up such an attack for another user's aaltotls based service; and instead I would suggest to modify the stream reading code so that it only reads up to an expected maximum number of characters (I can't imagine a PEM bigger than say a MegaByte). This will prevent a future possibility of DOS making the service unavailable or using up all the threads/resources/memory on the host system.

This isn't a huge deal but as your code evolves and possibly becomes reused in a way not anticipated today... you could easily fix this now.

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

No branches or pull requests

1 participant