StateSaver serializes potentially sensitive data under /tmp, doesn’t use O_EXCL
Bug #1348241 reported by
Olivier Tilloy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
Critical
|
Zsombor Egri | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Low
|
Unassigned | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
This issue applies to desktop only, where StateSaver serializes data in files under /tmp. On devices, confined applications have their own TMPDIR, which makes it a non-issue, as far as I understand it.
StateSaver uses QSettings under the hood to persist data on disk, which issues a plain QFile::
This makes it vulnerable to symlink attacks.
Using QTemporaryFile would solve this issue, but it might not be easy to do with QSettings.
Related branches
lp://qastaging/~zsombi/ubuntu-ui-toolkit/statesaver-path
- PS Jenkins bot: Approve (continuous-integration)
- Cris Dywan: Approve
-
Diff: 24 lines (+2/-2)2 files modifiedmodules/Ubuntu/Components/plugin/statesaverbackend_p.cpp (+1/-1)
tests/unit_x11/tst_statesaver/tst_statesaver.cpp (+1/-1)
CVE References
description: | updated |
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Zsombor Egri (zsombi) |
tags: | added: statesaver |
Changed in ubuntu-ui-toolkit (Ubuntu Trusty): | |
status: | Invalid → Won't Fix |
Changed in ubuntu-ui-toolkit: | |
status: | Confirmed → In Progress |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
from modules/ Ubuntu/ Components/ plugin/ statesaverbacke nd_p.cpp:
m_archive = new QSettings( QString( "%1/%2. state")
.arg( QStandardPaths: :standardLocati ons(QStandardPa ths::TempLocati on)[0])
.arg( applicationName ), QSettings: :NativeFormat) ;
QStandardPaths: :TempLocation is /tmp by default.
This gets CVE-2014-1420