pcloudcom / console-client

447 stars 132 forks source link

Debug log should be disabled by default. #54

Open drwyrm opened 6 years ago

drwyrm commented 6 years ago

By default, pcloudcc logs debug information to /tmp/psync_err.log, there are 2 issues about doing it, and it should be disabled by default.

It is a security vulnerability to write to fixed name files in /tmp, another user may put a symlink in place and overwrite content from any file from the pcloudcc owner user. If pcloudcc is run as root, its an easy privilege scalation.

The log file may grow way beyond what the user expects or have available in /tmp, it got to 6GB on one of my devices.

pos42 commented 6 years ago

+1

I just filled up 47GB with this /tmp/psync_err.log

But it seems no one cares for this software. I will recompile it myself.

paulfreeman commented 1 year ago

+1

I just had to delete a 265.9GB log file that was killing my working computer.

Porterbg commented 1 year ago

In plibs.h -> #define DEBUG_LEVEL D_ERROR ... and logs are off

mfschumann commented 1 year ago

As a workaround you can ln -s /dev/null /tmp/psync_err.log before starting pcloudcc. That also works for the containerized version of pcloudcc: Just add -v /dev/null:/tmp/psync_err.log to your docker / podman run command.