-
Notifications
You must be signed in to change notification settings - Fork 173
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
ReDoS attack via 'quote search --regexp' if the quote DB is large enough #855
Comments
I realize this issue is relatively difficult to produce. On a fresh test install of Limnoria, I get strange IRC: (I added some instances of
Console output:
@IonCannon218 What OS/python version/supybot version are you using? Running This seems to be yet another forkbomb vulnerability. :/ |
FYI, the same result can be achieved by abusing other regexp-capable commands such as |
|
What is that |
The one in the Quote plugin I believe. |
which comes by default with stock, gribble and Limnoria so this is correct place. |
Reproduced: https://gist.github.com/IonCannon218/38120043c45a56fe6d97 The bot(s) uptime was:
I suspect the quotes database content for our specific bot could be a cause for triggering this bug. |
Confirming this issue - it looks like it gets progressively worse as the quote database grows, since a separate process is spawned for each quote, and these quickly hit the 0.1 regexp_wrapper timeout quickly. |
Doing
quote search --regexp "/.*.*.*.*.*.*.*invalid/"
would spam the not found message after accumulating enough errors before that. But, if there is enough of the repeated.*
in the regex, the bot seems to create multiple instances of itself. The bot owner says this actually crashed the computer running the bot.Logs: https://gist.github.com/IonCannon218/15d344aef757982980d0
The text was updated successfully, but these errors were encountered: