Skip to content
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

Predictable /tmp/zim-USER directory allows for denial of service #1028

Closed
mssalvatore opened this issue Mar 6, 2020 · 1 comment · Fixed by #1029
Closed

Predictable /tmp/zim-USER directory allows for denial of service #1028

mssalvatore opened this issue Mar 6, 2020 · 1 comment · Fixed by #1029

Comments

@mssalvatore
Copy link
Contributor

Description
Zim creates temporary directories with predictable names. A malicious user could predict and create Zim's temporary directories and prevent other users from being able to start Zim, resulting in a denial of service.

Steps to Reproduce

  1. Create two users: user1 and user2.
  2. As user1:
    mkdir /tmp/zim-user2
  3. As user2:
    Start Zim

Zim will attempt to change the permissions of /tmp/user2 to 0700. Because /tmp/user2 is actually owned by user1, the call to os.chmod() will fail and Zim will crash.

Workaround
An affected user can set the $TMP or $TMPDIR environment variables to point to somewhere that is not world-writable (e.g. /home/USER/tmp).

Version Affected
0.42-beta1 and later

Operating System
Linux

Severity
Low

@carnil
Copy link

carnil commented Mar 23, 2020

CVE-2020-10870 appears to have been assigned for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants