Description
init_tmp in TeeJee.FileSystem.vala in Timeshift before 20.03 unsafely reuses a preexisting temporary directory in the predictable location /tmp/timeshift. It follows symlinks in this location or uses directories owned by unprivileged users. Because Timeshift also executes scripts under this location, an attacker can attempt to win a race condition to replace scripts created by Timeshift with attacker-controlled scripts. Upon success, an attacker-controlled script is executed with full root privileges. This logic is practically always triggered when Timeshift runs regardless of the command-line arguments used.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | timeshift | 20.03+ds-1 | — |
| Debian 13 | timeshift | 20.03+ds-1 | — |
| Debian 12 | timeshift | 20.03+ds-1 | — |
References
- https://bugzilla.suse.com/show_bug.cgi?id=1165802
- https://github.com/teejee2008/timeshift/commit/335b3d5398079278b8f7094c77bfd148b315b462
- https://github.com/teejee2008/timeshift/releases/tag/v20.03
- [oss-security] 20200306 CVE-2020-10174: timeshift: arbitrary local code execution due to unsafe usage of temporary directory in /tmp/timeshift mailing-list
- FEDORA-2020-c18248f61a vendor-advisory
- FEDORA-2020-6b3ae09449 vendor-advisory
- FEDORA-2020-1050d60507 vendor-advisory
- USN-4312-1 vendor-advisory