Various files and directories created with odd permissions on precise

Bug #980772 reported by Jamie Strandboge
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
Precise
Fix Released
High
Steve Langasek

Bug Description

When performing install audits of yesterday's 12.04 isos, I found the following odd directory on servers:

$ ls -ld /media/
drwsrwsrwt 3 root root 4096 Apr 13 06:06 /media/

In 11.10 we had:
drwxr-xr-x root root

The desktop install does not seem to be affected:
$ ls -ld /media/
drwxr-xr-x 2 root root 4096 Apr 12 02:42 /media/

Other directories:
drwsrwsrwt 2 root root 40 Apr 13 06:59 /run/initramfs/ (desktop and server)
drwsrwsrwt 2 root root 4096 Apr 13 07:21 /var/lib/apt/lists/partial (server only)

Some odd files:
crw------T 1 root root 10, 235 Apr 13 07:18 /dev/autofs
crw------T 1 root root 10, 234 Apr 13 07:18 /dev/btrfs-control
crw------T 1 root root 10, 184 Apr 13 07:18 /dev/cpu/microcode
crw-rw-rwT 1 root fuse 10, 229 Apr 13 07:18 /dev/fuse
crw-rw-rwT 1 root root 10, 200 Apr 13 07:18 /dev/net/tun
crw-rw---T 1 root audio 116, 1 Apr 13 07:18 /dev/snd/seq
crw-rw---T 1 root audio 116, 33 Apr 13 07:18 /dev/snd/timer

Server files were observed after first boot of a amd64 server install (non-MAAS) with encrypted home and all (non-manual) tasks installed in a kvm VM. All other options were defaults.

Desktop files were observed after first boot of a amd64 livecd install with encrypted home and 3rd party addons selected in a kvm VM. All other options were defaults.

Related branches

summary: - /media created with 'rwsrwsrwt' on server installs
+ Various directories created with 'rwsrwsrwt' on server installs
description: updated
summary: - Various directories created with 'rwsrwsrwt' on server installs
+ Various directories created with 'rwsrwsrwt' on precise
description: updated
Changed in ubiquity (Ubuntu Precise):
importance: Undecided → High
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Changed in debian-installer (Ubuntu Precise):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
summary: - Various directories created with 'rwsrwsrwt' on precise
+ Various files and directories created with odd permissions on precise
description: updated
Revision history for this message
Colin Watson (cjwatson) wrote :

/run/initramfs would be a problem (non-rlimitable DoS due to memory use), but I can't reproduce that on desktop.

Revision history for this message
Colin Watson (cjwatson) wrote :

With the exception of the device node permissions (which aren't an installer problem, if they're a problem; please file these against udev if you believe them to be problems), I can't reproduce any of these. Please provide logs.

Revision history for this message
Steve Langasek (vorlon) wrote :

Reproduced the /run/initramfs setting here on desktop on a fresh install, as well as the wrong perms in /dev.

I even see this on my running desktop, which is an upgrade.

And /run and /dev are both tmpfses populated at boot time, so this isn't an installer issue.

Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu Precise):
status: New → Incomplete
Changed in debian-installer (Ubuntu Precise):
status: New → Incomplete
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Here is the installer for the livecd.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Here is the installer log for the server.

description: updated
Changed in debian-installer (Ubuntu Precise):
status: Incomplete → New
Changed in ubiquity (Ubuntu Precise):
status: Incomplete → New
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Added a udev task, but I checked udev for several of this and don't see why the stick bit would be set. Is a umask being improperly set somewhere that is fiddling with the first octal?

Revision history for this message
Steve Langasek (vorlon) wrote :

Rather than opening new tasks for every package this *might* be, let's stick it on udev for now (since it's reproducible on upgrades and therefore not an installer issue) and I'll see what I can find out.

I'm currently suspecting an issue in the interactions between plymouth, cryptsetup, initramfs-tools, and udev.

no longer affects: ubiquity (Ubuntu Precise)
no longer affects: ubiquity (Ubuntu)
no longer affects: udev (Ubuntu)
Changed in udev (Ubuntu Precise):
assignee: nobody → Steve Langasek (vorlon)
importance: Undecided → High
no longer affects: debian-installer (Ubuntu Precise)
no longer affects: debian-installer (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

with 'break=top', I've reproduced the wrong perms on /run/initramfs within the initramfs itself - so before any initramfs hook scripts have run. The umask of the shell is correct (0022); the permissions on the directory created with mkdir are wrong. This may be a busybox bug.

Revision history for this message
Steve Langasek (vorlon) wrote :

$ /usr/lib/initramfs-tools/bin/busybox mkdir test
$ ls -ld test
drwsrwsrwt 2 vorlon vorlon 40 Apr 13 11:19 test
$

affects: udev (Ubuntu Precise) → busybox (Ubuntu Precise)
Changed in busybox (Ubuntu Precise):
status: New → Triaged
Revision history for this message
Steve Langasek (vorlon) wrote :

mkdir("test", 0777) = 0
chmod("test", 037777777777) = 0

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.18.5-1ubuntu4

---------------
busybox (1:1.18.5-1ubuntu4) precise; urgency=low

  * debian/patches/fix-64-bit-permissions.patch: mkdir: fix permissions
    on 64-bit platforms. Taken from upstream. LP: #980772.
 -- Steve Langasek <email address hidden> Fri, 13 Apr 2012 12:32:35 -0700

Changed in busybox (Ubuntu Precise):
status: Triaged → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

For the sticky bits on device files, Colin found in the udev source that as of udev 174, the sticky bit is used on files to indicate that the kernel module for the corresponding device file should not be unloaded. This corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=724920#c9

Ursula Junque (ursinha)
Changed in busybox (Ubuntu Precise):
importance: High → Medium
importance: Medium → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.