[Bug 1235975] Re: Unsafe file and directory permissions
Barry Warsaw
1235975 at bugs.launchpad.net
Wed Oct 9 18:30:45 UTC 2013
stgraber also suggested in IRC that /tmp may not be a good idea since
that's tmpfs backed and possibly limited in size. The base directory
is configurable in /etc/system-image/client.ini but maybe /var/tmp
/system-image would be a better default base dir. It would have to be
made writable though.
I suggest using tmpfile.mkdtemp() to provide a secure unpredictable
temporary directory inside that basedir for a download session. One
implication of this though is that if the s-i-dbus process exits, it
really should clean up this temporary, er temporary directory. Which
means that once it exits, the downloaded files will be discarded. So
if, as in LP: #1236818 you start the download, but leave your phone
unattended for long enough, s-i-dbus will exit and you'll have to
restart the whole process again.
Or, I suppose, that temporary temporary directory could be cleaned up
only prior to apply-and-reboot, and if the process exits due to timing
out, we'd have to persist the fact that that tempdir was created. I'll
leave that to LP: #1236818.
** Changed in: ubuntu-system-image
Status: Triaged => In Progress
** Changed in: ubuntu-system-image
Milestone: None => 1.9
** Changed in: system-image (Ubuntu)
Status: New => In Progress
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to system-image in Ubuntu.
https://bugs.launchpad.net/bugs/1235975
Title:
Unsafe file and directory permissions
Status in Ubuntu system image (server/client/updater):
In Progress
Status in “system-image” package in Ubuntu:
In Progress
Bug description:
# ls -ld /var/log/system-image/
drwxrwxrwx 2 root root 4096 Sep 24 16:02 /var/log/system-image/
# ls -l /var/log/system-image/client.log
-rw-rw-rw- 1 root root 23927 Oct 6 09:11 /var/log/system-image/client.log
# ls -ld /tmp/system-image/
drwxrwxrwx 2 root root 260 Oct 6 09:11 /tmp/system-image/
Also, predictable temporary file (/tmp/system-image). This was
mentioned in bug #1233521
# system-image-cli -i
current build number: 78
device name: mako
channel: stable
last update: 2013-10-03 13:05:32
version version: 78
version ubuntu: 20131003
version device: 20131002.1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-system-image/+bug/1235975/+subscriptions
More information about the foundations-bugs
mailing list