-
Notifications
You must be signed in to change notification settings - Fork 4
Labels
bugSomething isn't workingSomething isn't working
Description
We see occasional crashes like these in the chksidroot log emission as a result of security scans:
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib64/python3.9/logging/__init__.py", line 1086, in emit
stream.write(msg + self.terminator)
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 114-117: surrogates not allowed
Call stack:
File "/home/mig/mig/server/chksidroot.py", line 140, in <module>
logger.warning("got path from %s with invalid root: %s" %
Message: 'got path from REDACTED_IP with invalid root: REDACTED_PATH/webserver_home/c:\udcc0\udcae\udcc0\udcae\\\udcc0\udcae\udcc0\udcae\\\udcc0\udcae\udcc0\udcae\\\udcc0\udcae\udcc0\udcae\\\udcc0\udcae\udcc0\udcae\\\udcc0\udcae\udcc0\udcae\\etc\\passwd#vt/test'
Arguments: ()
It will crash and thus prevent access but we should not let the interpreter try to decode the byte sequence as utf-8 at all when logging.
Same most likely applies for the similar chkuserroot.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working