-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
an attacker can crash the watcher thread with a non-utf8 filename #811
Comments
Python 2.7 is no more supported. Do you reproduce with the latest version, if you can make the upgrade? |
Unfortunately, Python 2.7 is still far from being dead. It is supported, and is the default python version in several stable long term support distributions. It is the most recent python version on the environment we deploy to. In any case, a file name can be any sequence of bytes (depending on the filesystem), it does not have to be a valid string in any particular encoding. Maybe it would be possible to backport a small security fix that simply avoids crashing the event processing thread in case of error ? |
Would you accept a pull request to the python2.7 branch that fixes the issue ? |
Give it a try and I'll see what I can do :) |
@BoboTiG : I made the PR. This would be of a tremendous help to us if this could be released 🙂 |
It is merged. I just checked and the Python 2.7 branch contains a lot more work than just your patch. Would you be able to try it out and let me know if all works fine for you? |
@CCP-Aporia Do you need other backports to the Python 2.7 branch? |
Not as far as I can tell at the moment, but it's been a few weeks since I last had the chance to spend time on watchdog. If anything, I'd be creating a PR to backport more of the recent changes if necessary. 🙂 |
The last version of the python2 branch is ok for us ! |
Great! Let's do a new release then ;) |
@BoboTiG : So, you are going to release that as 0.10.7 ? |
0.10.7 is online ;) |
Hello,
We recently encountered a serious security issue while using this library.
When an attacker (or a normal user, as a mistake) is able to create a file in a folder watched by watchdog v0.x for python 2, they can crash the event processing thread. Only that thread crashes, not the main thread, so a service using this library would stay alive, but unable to process any subsequent file. This allows for a very powerful and surreptitious denial of service attack against any file processing service using this library. The attack would not be immediately noticeable because the service would still be running, just not processing any more file.
stack trace
The text was updated successfully, but these errors were encountered: