[Precise] TOMOYO: Please apply fix for mount permission check.

Bug #952010 reported by Tetsuo Handa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Please apply commit df91e494 "TOMOYO: Fix mount flags checking order." which is
in linux-next.git and will be included in 3.4-rc1. Without this patch, when
security=tomoyo is given to kernel boot parameter, certain combination of mount
request cannot be granted.

Test case:
  Compile test.c and run it as root.
----- test.c start -----
#include <stdio.h>
#include <string.h>
#include <sys/mount.h>
#include <errno.h>

int main(int argc, char *argv[])
{
        if (mount(NULL, "/tmp", "tmpfs", 0, NULL))
                return 1;
        if (mount(NULL, "/tmp", NULL, MS_BIND | MS_REMOUNT, NULL) == 0)
                printf("OK: Success.\n");
        else
                printf("BUG: %s\n", strerror(errno));
        umount("/tmp");
        return 0;
}
----- test.c end -----

Expected result:
  OK: Success.

Actual result:
  BUG: No such file or directory
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.94.1-0ubuntu2
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: lightdm 1430 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Card0.Amixer.info:
 Card hw:0 'AudioPCI'/'Ensoniq AudioPCI ENS1371 at 0x2080, irq 16'
   Mixer name : 'Cirrus Logic CS4297A rev 3'
   Components : 'AC97a:43525913'
   Controls : 24
   Simple ctrls : 13
DistroRelease: Ubuntu 12.04
HibernationDevice: RESUME=UUID=bee47962-4d01-4574-b1b2-a334e62e984c
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120309)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 002: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
MachineType: VMware, Inc. VMware Virtual Platform
Package: linux (not installed)
ProcEnviron:
 TERM=vt100
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-19-generic-pae root=UUID=8a11adb6-254d-4dda-9164-0f3070b3f2d5 ro quiet splash vt.handoff=7 security=hostname
ProcVersionSignature: Ubuntu 3.2.0-19.30-generic-pae 3.2.11
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-19-generic-pae N/A
 linux-backports-modules-3.2.0-19-generic-pae N/A
 linux-firmware 1.71
RfKill:

Tags: precise
Uname: Linux 3.2.0-19-generic-pae i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

dmi.bios.date: 08/15/2008
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd08/15/2008:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 952010

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: precise
Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote :

This bug depends on Bug 952035.
Also, apport-collect does not help because this is a TOMOYO's bug.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.2.0-18.29)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

You can update to the latest development kernel by simply running the following commands in a terminal window:

    sudo apt-get update
    sudo apt-get upgrade

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

If you want this bot to quit automatically requesting kernel tests, add a tag named: bot-stop-nagging.

 Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.2.0-18.29
Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote :

OK. I'll try to run apport-collect after Bug 952035 was fixed.

I think John Johansen knows what this bug is, for I found this bug while I was
reviewing AppArmor's patches.
http://www.spinics.net/linux/fedora/linux-security-module/msg13088.html
http://www.spinics.net/linux/fedora/linux-security-module/msg13087.html

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you provide some information on the status of the patch with regards to getting it merged upstream? What sort of feedback has it received, is it getting applied to a subsystem maintainer's tree, etc?

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: bot-stop-nagging patch
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote :

This patch was accepted in jmorris/linux-security.git and is currently in
next/linux-next.git and will be merged into torvalds/linux.git as 3.4-rc1.
In case devel freeze date for kernel package comes before 3.4-rc1 comes,
I posted this request without waiting for 3.4-rc1.

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : AlsaDevices.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : AplayDevices.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : BootDmesg.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : Card0.Codecs.codec97.0.ac97.0.0.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : Card0.Codecs.codec97.0.ac97.0.0.regs.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : Lspci.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : PciMultimedia.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : ProcModules.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : UdevDb.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : UdevLog.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote : WifiSyslog.txt

apport information

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote :

> This patch was accepted in jmorris/linux-security.git and is currently in
> next/linux-next.git and will be merged into torvalds/linux.git as 3.4-rc1.

FYI: This patch was merged into 3.4-rc1.

commit df91e49477a9be15921cb2854e1d12a3bdb5e425
Author: Tetsuo Handa <email address hidden>
Date: Wed Feb 29 21:53:22 2012 +0900

    TOMOYO: Fix mount flags checking order.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Do you happen to know if this patch will be submitted to the linux-stable tree?

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote :

I'm not planning to submit this patch to linux-stable tree because this bug is
not a user-triggerable crach/memleak/panic. But if you prefer applying this
patch via linux-stable release, I'll submit this patch to linux-stable tree.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Yes it would be great if you can see if this patch will be accepted in linux-stable.

People affected by this bug are probably wondering why the kernel team doesn't just apply the patch and fix it. The reason is that the kernel team is reluctant (not opposed) to apply any patch to a stable kernel that is not from upstream. Applying patches that don't come from upstream add greatly to the support of the kernel as other upstream patches may touch the same area as the non-upstream patch and may prevent them from applying cleanly.

Revision history for this message
Tetsuo Handa (9-launchpad-i-love-sakura-ne-jp) wrote :

> Yes it would be great if you can see if this patch will be accepted in linux-stable.

OK. This patch was accepted to 3.0.28, 3.2.15 and 3.3.2 upstream.
Please close this bug when Precise kernel rebases to 3.2.15.

Thank you.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Tetsuo,

Precise is now past final freeze, so we won't be rebasing to 3.2.15 before Precise goes final. The fix should be in the first kernel SRU.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

We've got the v3.2.15 patches queued. Should be available in the first stable update after release. Marking this Fix Committed.

Changed in linux (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Julian Wiedmann (jwiedmann) wrote :

Released with 3.2.0-24.38.

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
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.