/media directory should not use 'owner' in apparmor profile

Bug #479580 reported by starslights
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox-3.5 (Ubuntu)
Fix Released
Undecided
Jamie Strandboge

Bug Description

Hello,

After answer by John Johansen, i open a new bug while there miss entry in profile firefox in apparmor.

I run kubuntu karmic 9.10 on x86 64 .

I have this audit but already decrypted by John.

 info="Failed name lookup - deleted entry"
and running aa-decode finds a name with out the appended " (deleted)"

[169621.221525] type=1503 audit(1257668082.865:35): operation="truncate" pid=12308 parent=3052 profile="/usr/lib/firefox-3.5.*/firefox" requested_mask="::w" denied_mask="::w" fsuid=1000 ouid=0 name='/media/FreeAgent Drive/torrents/[www.itoma.info]_Les hits de lhiver 2009-ITOMA.torrent'

which shows it is not hitting the deleted file problem being addressed by this bug, but a missing permission entry in the profile. In general the name encoding on any string that have any of set of special characters in them (space is the character triggering it in the deleted messages and here).

Related branches

Revision history for this message
starslights (starslights) wrote : apport-collect data

Architecture: amd64
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf9ff8000 irq 22'
   Mixer name : 'Analog Devices AD1989B'
   Components : 'HDA:11d4989b,10438311,00100300'
   Controls : 48
   Simple ctrls : 27
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=83c95442-a3bb-41ea-9822-97768074dcbf
InstallationMedia: Kubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MachineType: System manufacturer P5Q-E
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-15-generic root=UUID=d4f7b656-5965-43fb-acc2-5bc98e3ba8c6 ro quiet splash
ProcEnviron:
 SHELL=/bin/bash
 LANG=fr_CH.UTF-8
 LANGUAGE=
ProcVersionSignature: Ubuntu 2.6.31-15.49-generic
RelatedPackageVersions:
 linux-backports-modules-2.6.31-15-generic N/A
 linux-firmware 1.24
RfKill:

Uname: Linux 2.6.31-15-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 02/25/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 2001
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5Q-E
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr2001:bd02/25/2009:svnSystemmanufacturer:pnP5Q-E:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5Q-E:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: P5Q-E
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
starslights (starslights) wrote : AlsaDevices.txt
Revision history for this message
starslights (starslights) wrote : AplayDevices.txt
Revision history for this message
starslights (starslights) wrote : ArecordDevices.txt
Revision history for this message
starslights (starslights) wrote : AudioDevicesInUse.txt
Revision history for this message
starslights (starslights) wrote : BootDmesg.txt
Revision history for this message
starslights (starslights) wrote : Card0.Amixer.values.txt
Revision history for this message
starslights (starslights) wrote : Card0.Codecs.codec.0.txt
Revision history for this message
starslights (starslights) wrote : CurrentDmesg.txt
Revision history for this message
starslights (starslights) wrote : IwConfig.txt
Revision history for this message
starslights (starslights) wrote : Lspci.txt
Revision history for this message
starslights (starslights) wrote : Lsusb.txt
Revision history for this message
starslights (starslights) wrote : PciMultimedia.txt
Revision history for this message
starslights (starslights) wrote : ProcCpuinfo.txt
Revision history for this message
starslights (starslights) wrote : ProcInterrupts.txt
Revision history for this message
starslights (starslights) wrote : ProcModules.txt
Revision history for this message
starslights (starslights) wrote : UdevDb.txt
Revision history for this message
starslights (starslights) wrote : UdevLog.txt
Revision history for this message
starslights (starslights) wrote : WifiSyslog.txt
Revision history for this message
starslights (starslights) wrote : XsessionErrors.txt
tags: added: apport-collected
Revision history for this message
Jamie Strandboge (jdstrand) wrote : Re: apparmor: missing permission entry in the profile firefox-3.5.*/firefox

Thank you for using Ubuntu and taking the time to report a bug. The firefox profile should already have the following line:
  owner /media/** rw,

starlights, can you verify this is the case? What is the output of:
$ ls -ln '/media/FreeAgent Drive/torrents/[www.itoma.info]_Les hits de lhiver 2009-ITOMA.torrent'

Changed in linux (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
tags: added: apparmor
Revision history for this message
starslights (starslights) wrote :

Hi Jamie,

my output are :

-rwxrwxrwx 1 0 0 46075 2009-11-08 09:15 /media/FreeAgent Drive/torrents/[www.itoma.info]_Les hits de lhiver 2009-ITOMA.torrent

But in fact you can't confirm like that while i have need copy and paste the torrent manually to be accepted. Only on Internal HD it's possible to download a file from firefox.

I have already reported a bug similar, i was not able to know that's possible the same cause because this audit was encrypted.

take a look : https://bugs.launchpad.net/bugs/478158 if are maybe relied.

  # allow read and write to all user's files, except explicitly denied ones
  @{HOME}/ r,
  @{HOME}/** rw,
  @{HOME}/Desktop/** rw,
  @{HOME}/Firefox_wallpaper* rw,
  owner /media/** rw,
  owner /mnt/** rw,
  owner /srv/** rw,

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

Can you try adjusting this line:
  owner /media/** rw,

to be:
  /media/** rw,

and then reload the apparmor profile with:
$ sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.firefox-3.5

Revision history for this message
starslights (starslights) wrote :

Hi Jamie,

I have adjusted the ligne and now work well.

Thanks very much for your great work and the fix can be commited :P

have a good journey

Best Regards

Stars

summary: - apparmor: missing permission entry in the profile firefox-3.5.*/firefox
+ /media directory should not use 'owner' in apparmor profile
affects: linux (Ubuntu) → firefox-3.5 (Ubuntu)
Changed in firefox-3.5 (Ubuntu):
status: New → Triaged
Changed in firefox-3.5 (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package firefox-3.5 - 3.5.6+nobinonly-0ubuntu1

---------------
firefox-3.5 (3.5.6+nobinonly-0ubuntu1) lucid; urgency=low

  * New upstream release v3.5.6 (FIREFOX_3_5_6_RELEASE)
    - see USN-874-1

  [ Micah Gersten <email address hidden> ]
  * Bump minimum system cairo to 1.8.8
    - update debian/rules
  * Fix .desktop Name field for Slovak translation (LP: 448683)
    - update debian/firefox-3.5-final.desktop
  * Fix .desktop Name field for Estonian and Arabic translations
    (LP: 419507, LP: 321239)
    - update debian/firefox-3.5-final.desktop

  [ Jamie Strandboge <email address hidden> ]
  * AppArmor fixes:
    - allow access to nautilus, to allow "Open containing folder" to work
      (LP: #452591)
    - allow access for deluge (LP: #455792)
    - work better with KDE by adding kde abstraction, allow access to soffice,
      allow access to okular and read access to /etc/fstab (for print dialog)
      (LP: #447006)
    - allow access to acroread (LP: #473268)
    - allow access to eog (LP: #464016)
    - allow access to transmission (LP: #476299)
    - deny noisy write attempts to deny /usr/lib/xulrunner-*/components/*.tmp
      as seen with 'firefox --help')
    - deny noisy read to /.suspended (when navigating directories)
    - allow access to /usr/bin/liferea-add-feed (LP: #488851)
    - allow access to azureus (LP: #482677)
    - don't require 'owner' for /media (LP: #479580)
    - adjust AppArmor profile binary globbing to match other branches
    - allow ixr access to sed (for first runs)

  [ Alexander Sack <email address hidden> ]
  * bump lower bound for system sqlite3 to >= 3.6.16.1
    - update debian/rules
 -- Alexander Sack <email address hidden> Wed, 16 Dec 2009 00:43:08 +0100

Changed in firefox-3.5 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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