Re: [Bug #11500] /proc/net bug related to selinux

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen Smalley
Date: Thursday, September 18, 2008 - 5:38 am

On Wed, 2008-09-17 at 15:32 -0700, Eric W. Biederman wrote:

I think I explained that one before - in the case of /proc, the only
stable basis we have for deducing the security properties / protection
requirements for a given entry is its name, and its name can be reliably
constructed from the kernel's internal proc_dir_entry tree w/o any
ambiguity or potential for userspace manipulation (unlike the pathname
returned by d_path for a normal file).  I'd agree that it isn't optimal,
but it is what we have.


I'm not blaming anyone here, or trying to argue that the /proc/net
changes should be reverted.  What happened here is that a kernel
interface (/proc/net) changed in a subtle way that had a side effect on
permission checking, and we tried to hide that change at the time (in
terms of ensuring that the new /proc/self/net tree would still be
labeled correctly), and we missed the fact that there would still be a
new check on the symlink read that wouldn't be covered by existing
policy.


I'm not arguing that this is a bug in proc or in selinux for that
matter.

I do however think that the mantra that we can't require users to update
policy for kernel changes is unsupportable in general.  The precise set
of permission checks on a given operation is not set in stone and it is
not part of the kernel/userland interface/contract.  Policy isn't
"userspace"; it governs what userspace can do, and it has to adapt to
kernel changes.

Users who are willing/able to run the latest kernel on their own w/o
waiting for a coordinated update of kernel and policy from their
distribution ought to be able to create a local policy module - it isn't
rocket science, and they can always fall back on audit2allow if they
need to do so.

-- 
Stephen Smalley
National Security Agency

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.27-rc6-git2: Reported regressions from 2.6.26, Rafael J. Wysocki, (Fri Sep 12, 11:59 am)
[Bug #11207] VolanoMark regression with 2.6.27-rc1, Rafael J. Wysocki, (Fri Sep 12, 11:59 am)
[Bug #11215] INFO: possible recursive locking detected ps2 ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11220] Screen stays black after resume, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11210] libata badness, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11237] corrupt PMD after resume, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11230] Kconfig no longer outputs a .config with fres ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11224] Only three cores found on quad-core machine., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11272] BUG: parport_serial in 2.6.27-rc1 for NetMos ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11276] build error: CONFIG_OPTIMIZE_INLINING=y cause ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11271] BUG: fealnx in 2.6.27-rc1, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11264] Invalid op opcode in kernel/workqueue, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11340] LTP overnight run resulted in unusable box, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11336] 2.6.27-rc2:stall while mounting root fs, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11335] 2.6.27-rc2-git5 BUG: unable to handle kernel ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11308] tbench regression on each kernel release from ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11357] Can not boot up with zd1211rw USB-Wlan Stick, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11358] net: forcedeth call restore mac addr in nv_sh ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11380] lockdep warning: cpu_add_remove_lock at:cpu_m ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11343] SATA Cold Boot Problems with 2.6.27-rc[23] on ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11398] hda_intel: IRQ timing workaround is activated ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11382] e1000e: 2.6.27-rc1 corrupts EEPROM/NVM, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11404] BUG: in 2.6.23-rc3-git7 in do_cciss_intr, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11465] Linux-2.6.27-rc5, drm errors in log, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11463] sshd hangs on close, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11459] kernel crash after wifi connection established, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11442] btusb hibernation/suspend breakage in current ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11439] [2.6.27-rc4-git4] compilation warnings, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11407] suspend: unable to handle kernel paging request, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11471] GPE storm detected, kernel freezes, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11501] Failed to open destination file: Permission d ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11485] 2.6.27-rc xen pvops regression?, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11500] /proc/net bug related to selinux, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11476] failure to associate after resume from suspen ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11507] usb: sometimes dead keyboard after boot, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11506] oops during unmount - ext3? (2.6.27-rc5), Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11505] oltp ~10% regression with 2.6.27-rc5 on stoak ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11547] build issue #565 for v2.6.27-rc5 : undefined ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11548] kernel BUG at drivers/pci/intel-iommu.c:1373!, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11549] 2.6.27-rc5 acpi: EC Storm error message on bootup, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11516] severe performance degradation on x86_64 goin ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11554] Partition check considered as error is breaki ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11553] Strange looking line from "ps aux", Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11551] Semi-repeatable hard lockup on 2.6.27-rc6, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11552] Disabling IRQ #23, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11559] 2.6.27-rc6: nohz + s2ram = need to press keys ..., Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
[Bug #11557] Controlling backlight on thinkpad x60, Rafael J. Wysocki, (Fri Sep 12, 12:06 pm)
Re: [Bug #11276] build error: CONFIG_OPTIMIZE_INLINING=y c ..., Rafael J. Wysocki, (Fri Sep 12, 2:19 pm)
Re: [Bug #11548] kernel BUG at drivers/pci/intel-iommu.c:1373!, Rafael J. Wysocki, (Fri Sep 12, 2:21 pm)
Re: [Bug #11308] tbench regression on each kernel release ..., Christoph Lameter, (Fri Sep 12, 3:05 pm)
Re: [Bug #11500] /proc/net bug related to selinux, James Morris, (Fri Sep 12, 3:14 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Andrew Morton, (Fri Sep 12, 3:24 pm)
Re: [Bug #11500] /proc/net bug related to selinux, James Morris, (Fri Sep 12, 5:15 pm)
Re: [Bug #11552] Disabling IRQ #23, Justin Mattock, (Fri Sep 12, 8:24 pm)
Re: [Bug #11271] BUG: fealnx in 2.6.27-rc1, Jaswinder Singh, (Sat Sep 13, 1:47 am)
Re: [Bug #11557] Controlling backlight on thinkpad x60, Matthew Garrett, (Sat Sep 13, 8:13 am)
Re: [Bug #11500] /proc/net bug related to selinux, Andrew Morton, (Sat Sep 13, 12:37 pm)
Re: [Bug #11554] Partition check considered as error is br ..., Herton Ronaldo Krzes ..., (Sat Sep 13, 4:37 pm)
Re: [Bug #11557] Controlling backlight on thinkpad x60, Pavel Machek, (Sun Sep 14, 3:18 am)
Re: [Bug #11308] tbench regression on each kernel release ..., Christoph Lameter, (Sun Sep 14, 7:18 am)
Re: [Bug #11398] hda_intel: IRQ timing workaround is activ ..., Rafael J. Wysocki, (Sun Sep 14, 5:13 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Rafael J. Wysocki, (Sun Sep 14, 5:16 pm)
Re: [Bug #11554] Partition check considered as error is br ..., Rafael J. Wysocki, (Sun Sep 14, 5:25 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Stephen Smalley, (Mon Sep 15, 6:05 am)
Re: [Bug #11500] /proc/net bug related to selinux, Stephen Smalley, (Mon Sep 15, 6:42 am)
Re: [Bug #11471] GPE storm detected, kernel freezes, Zhang Rui, (Mon Sep 15, 10:50 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Andrew Morton, (Wed Sep 17, 12:50 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Paul Moore, (Wed Sep 17, 2:24 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Eric W. Biederman, (Wed Sep 17, 2:39 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Andrew Morton, (Wed Sep 17, 2:48 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Eric W. Biederman, (Wed Sep 17, 2:56 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Andrew Morton, (Wed Sep 17, 3:11 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Paul Moore, (Wed Sep 17, 3:12 pm)
Re: [Bug #11500] /proc/net bug related to selinux, David Miller, (Wed Sep 17, 3:23 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Andrew Morton, (Wed Sep 17, 3:24 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Eric W. Biederman, (Wed Sep 17, 3:32 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Eric W. Biederman, (Wed Sep 17, 3:53 pm)
Re: [Bug #11500] /proc/net bug related to selinux, Stephen Smalley, (Thu Sep 18, 5:38 am)
Re: [Bug #11500] /proc/net bug related to selinux, Stephen Smalley, (Thu Sep 18, 6:03 am)
Re: [Bug #11500] /proc/net bug related to selinux, Eric W. Biederman, (Thu Sep 18, 11:09 am)
Re: [Bug #11500] /proc/net bug related to selinux, Stephen Smalley, (Thu Sep 18, 11:34 am)
Re: [Bug #11506] oops during unmount - ext3? (2.6.27-rc5), Marcin Slusarz, (Fri Sep 19, 9:17 am)
Re: [Bug #11500] /proc/net bug related to selinux, Stephen Smalley, (Fri Sep 19, 10:07 am)
Re: [Bug #11500] /proc/net bug related to selinux, Stephen Smalley, (Mon Sep 29, 9:49 am)