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
DESCRIPTION
The systems on my company are scanned for security vulnerabilities and the beaker-proxy service is hanging with one GET request made by the vulnerability tool.
After the GET request searching for an specific vulnerability is received, all beaker jobs get stuck in a Waiting or Updating stage and don't move forward. Restarting beaker-proxy and beaker-watchdog services does not get Beaker unstuck - only thing that works is literally restarting everything on the Beaker Controllers and Beaker Server!
Stack trace on the beaker-proxy.log suggests the failure is on the UTF-8 decodification of this GET request that contains a 0x80 byte
...
Jun 20 07:45:13 <hostname> beaker-proxy: ::ffff:<IP OF VULN. SCANNER> - - [2022-06-20 07:45:13] "GET .\.\.\.\.\.\.\.\.\.\/winnt/win.ini HTTP/1.1" 404 342 0.000217
Jun 20 07:45:13 <hostname> beaker-proxy: ::ffff:<IP OF VULN. SCANNER> - - [2022-06-20 07:45:13] "GET /nessus\..\..\..\..\..\..\windows\win.ini HTTP/1.1" 404 342 0.000257
Jun 20 07:45:14 <hostname> beaker-proxy: ::ffff:<IP OF VULN. SCANNER> - - [2022-06-20 07:45:14] "GET /nessus\..\..\..\..\..\..\winnt\win.ini HTTP/1.1" 404 342 0.000303
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: bkr.labcontroller.main ERROR Error handling request GET /<80>../<80>../<80>../<80>../<80>../<80>../windows/win.ini
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: Traceback (most recent call last):
Jun 20 07:45:14 <hostname> beaker-proxy: Traceback (most recent call last):
Jun 20 07:45:14 <hostname> beaker-proxy: File "/usr/lib64/python2.7/site-packages/gevent/pywsgi.py", line 884, in handle_one_response
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: File "/usr/lib/python2.7/site-packages/bkr/labcontroller/main.py", line 169, in _log_failed_requests
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: return func(environ, start_response)
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: File "/usr/lib/python2.7/site-packages/werkzeug/wrappers.py", line 285, in application
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: return f(*args[:-2] + (request,))(*args[-2:])
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: File "/usr/lib/python2.7/site-packages/bkr/labcontroller/main.py", line 133, in __call__
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: if req.path in ('/', '/RPC2', '/server'):
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: File "/usr/lib/python2.7/site-packages/werkzeug/utils.py", line 71, in __get__
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: value = self.func(obj)
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: File "/usr/lib/python2.7/site-packages/werkzeug/wrappers.py", line 503, in path
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: self.charset, self.encoding_errors)
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: File "/usr/lib/python2.7/site-packages/werkzeug/_compat.py", line 92, in wsgi_decoding_dance
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: return s.decode(charset)
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: return codecs.utf_8_decode(input, errors, True)
Jun 20 07:45:14 <hostname> beaker-proxy[12587]: UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 1: invalid start byte
...
DESCRIPTION
The systems on my company are scanned for security vulnerabilities and the beaker-proxy service is hanging with one GET request made by the vulnerability tool.
After the GET request searching for an specific vulnerability is received, all beaker jobs get stuck in a Waiting or Updating stage and don't move forward. Restarting beaker-proxy and beaker-watchdog services does not get Beaker unstuck - only thing that works is literally restarting everything on the Beaker Controllers and Beaker Server!
Stack trace on the beaker-proxy.log suggests the failure is on the UTF-8 decodification of this GET request that contains a 0x80 byte
VERSION-RELEASE-NUMBER
[root@ beaker]# rpm -qa | grep beaker-lab
beaker-lab-controller-28.2-1.el7.noarch
REPRODUCE
Still trying to figure out a python or shell script to reproduce the stack trace. Trying something like this:
But still haven't quite been able to reproduce it.
ACTUAL BEHAVIOR
The beaker-proxy service hangs, and thus all beaker jobs hang - reboot of everything is necessary.
EXPECTED BEHAVIOR
No hang on anything - just a 404 error should be returned with no stack trace on the logs.
ADITIONAL CONTEXT
Code that fails:
Maybe the GET request need to be further sanitized somewhere prior to trying to decode it?
Thanks in advance for any help on this issue :-)
The text was updated successfully, but these errors were encountered: