Apparmor appears to not restrict read-access

Bug #269921 reported by David D Lowe
278
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
Fix Released
High
Kees Cook

Bug Description

After switching to the guest account using fast-user-switch-applet, the guest account loads and I am able to access /home/david and all the files in it.

david@david-laptop:~$ ls -l /home
total 4
drwxr-xr-x 37 david david 4096 2008-09-13 20:54 david

I'm using Ubuntu Intrepid Ibex Alpha 5.

Related branches

Revision history for this message
fx5 (packaging) wrote :

Yes, same problem here.

The apparmor-profile allows reading the whole filesystem and has no exception for /home/
But the specification-page says: "AppArmor rules to completely hide /home"

An other question: Why does the apparmor-profile allows to execute programs from /media/** ?

Revision history for this message
ubuntu_demon (ubuntu-demon) wrote :

I can confirm this bug. Running from a guest session I can access home folders of other users and the files in there.

I'm running Intrepid through kvm (virtmanager). I've installed from the beta desktop iso and updated the system. (gdm-guest-session 0.4)

Changed in gdm-guest-session:
status: New → Confirmed
Changed in gdm-guest-session:
importance: Undecided → Medium
Revision history for this message
ubuntu_demon (ubuntu-demon) wrote :

I think the priority should be be at least "high". Here's why :

This bug makes it a security risk to let someone use a guest account on your computer.
Secondly if the text from http://www.ubuntu.com/testing/intrepid/beta#Guest%20session becomes the text for the final release Ubuntu looks bad :

[quote]
Guest session

The User Switcher panel applet (package fast-user-switch-applet) now provides an extra entry for starting a Guest session (by Martin Pitt). This creates a temporary password-less user account with restricted privileges: the account cannot access any users' home directories, nor permanently store data. This is sufficiently safe to lend your laptop to someone else for a quick email check.
[/quote]

Revision history for this message
der_vegi (m-may) wrote :

Same problem here with Intrepid Beta. If I browse a user directory as guest with Nautilus, I can see the files and their previews which already reveal some of their content, but cannot open them with gedit "permission denied". In the console they can be opened.

I also think that for example /boot should be denied to the guest user, as he might be able to read out a plaintext password that is stored in /boot/grub/menu.lst to prevent access to root privileges during boot.

Revision history for this message
Tuomas Aavikko (taavikko) wrote : Re: [Intrepid alpha, beta] guest account can access /home/user

Guest-session should be completely jailed, in its temporary /home folder.
No access to anywhere.

Offtopic, where could I raise an feature request?
Somekind of /etc/gdm-guest.conf to be read when starting guest-session?
To pass different options.
Discussion http://ubuntuforums.org/showthread.php?t=936742

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I can't figure out what is going on here. All of the guest users processes are bound by the Apparmor profile according to aa-status, but it still doesn't work.

Changed in gdm-guest-session:
importance: Medium → High
Revision history for this message
fx5 (packaging) wrote : Re: [Intrepid alpha, beta] guest account can access /home and /boot

Looks like a apparmor-bug!

I tried the same apparmor-profile with hardy. it forbids reading from /home/** there.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I think you're right. I've just created a minimal profile for gedit, just sufficient to get it to run, and I can still browse the entire filesystem

Revision history for this message
fx5 (packaging) wrote :

I reported this as #278619.

Kees Cook (kees)
Changed in apparmor:
milestone: none → ubuntu-8.10
Revision history for this message
Kees Cook (kees) wrote :
Changed in apparmor:
assignee: nobody → kees
status: Confirmed → Fix Committed
Revision history for this message
Kees Cook (kees) wrote :

The 2.6.27-6 kernel has fixed this problem.

Changed in apparmor:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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