public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: jmorris@namei.org, rjw@sisk.pl, linux-kernel@vger.kernel.org,
	kernel-testers@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	netdev@vger.kernel.org
Subject: Re: [Bug #11500] /proc/net bug related to selinux
Date: Wed, 17 Sep 2008 12:50:53 -0700	[thread overview]
Message-ID: <20080917125053.1f9ecf37.akpm@linux-foundation.org> (raw)
In-Reply-To: <1221483926.30816.18.camel@moss-spartans.epoch.ncsc.mil>

On Mon, 15 Sep 2008 09:05:26 -0400
Stephen Smalley <sds@tycho.nsa.gov> wrote:

> 
> On Sat, 2008-09-13 at 12:37 -0700, Andrew Morton wrote:
> > On Sat, 13 Sep 2008 10:15:43 +1000 (EST) James Morris <jmorris@namei.org> wrote:
> > 
> > > On Fri, 12 Sep 2008, Andrew Morton wrote:
> > > 
> > > > > > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=11500
> > > > > > Subject		: /proc/net bug related to selinux
> > > > > > Submitter	: Andrew Morton <akpm@linux-foundation.org>
> > > > > > Date		: 2008-09-04 17:45 (9 days old)
> > > > > > References	: http://marc.info/?l=linux-kernel&m=122055041313270&w=4
> > > > > 
> > > > > I think this might be a regression caused by namespace changes which we 
> > > 
> > > By which I mean, this was caused by a non-SELinux change to the upstream 
> > > kernel many, many eons ago.
> > 
> > hm, seems that 2.6.24 is OK but 2.6.25 is not.  I must have missed the
> > bug when testing 2.6.25-based kernels.
> > 
> > I started a git bisection search but after half an hour I hit bad
> > bisection breakage: a complete machine hang in fib_rules_init().
> > 
> > > > > addressed in SELinux policy.  Which distro version & policy version is 
> > > > > this seen with?
> > > > > 
> > > > 
> > > > FC5 on x86_32 and FC6 on x86_64.
> > > 
> > > As mentioned in the bugzilla, any related avc messages would be useful.
> > 
> > 2.6.25 dmesg: http://userweb.kernel.org/~akpm/dmesg-sony.txt
> > /var/log/messages: http://userweb.kernel.org/~akpm/messages-sony.txt
> > 
> > The latter includes this:
> > 
> > Sep 13 12:32:43 sony kernel: SELinux:  class key not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  class dccp_socket not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  class memprotect not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  class peer not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  class capability2 not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission open in class dir not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission open in class file not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission open in class chr_file not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission open in class blk_file not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission open in class fifo_file not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission dccp_recv in class node not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission dccp_send in class node not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission recvfrom in class node not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission sendto in class node not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission dccp_recv in class netif not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission dccp_send in class netif not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission ingress in class netif not defined in policy
> > Sep 13 12:32:43 sony kernel: SELinux:  permission egress in class netif not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission setkeycreate in class process not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission setsockcreate in class process not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission setfcap in class capability not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission polmatch in class association not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission flow_in in class packet not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission flow_out in class packet not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission forward_in in class packet not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux:  permission forward_out in class packet not defined in policy
> > Sep 13 12:32:44 sony kernel: SELinux: the above unknown classes and permissions will be denied
> > Sep 13 12:32:44 sony kernel: type=1403 audit(1221309118.644:3): policy loaded auid=4294967295 ses=4294967295
> > Sep 13 12:32:44 sony kernel: type=1400 audit(1221334321.726:4): avc:  denied  { audit_write } for  pid=400 comm="hwclock" capability=29 scontext=system_u:system_r:hwclock_t:s0 tcontext=system_u:system_r:hwclock_t:s0 tclass=capability
> > 
> > 
> > Why am I seeing this on two machines and two vanilla-installed distros
> > but nobody else is reporting it?

Running `ls -l /proc/net' on the FC6 machine produces:

[  132.591215] type=1400 audit(1221679672.590:10): avc:  denied  { getattr } for  pid=4389 comm="ls" path="/proc/net" dev=proc ino=4026531867 scontext=user_u:system_r:unconfined_t:s0 tcontext=system_u:object_r:proc_net_t:s0 tclass=lnk_file


> What we actually need to see is the output of:
> /sbin/ausearch -i -m AVC -sv no

akpm2:/home/akpm# /sbin/ausearch -i -m AVC -sv no 
<no matches>

> However, the most likely explanation is simply that when /proc/net was
> changed from being a directory to being a symlink to /proc/self/net,
> that introduced an additional permission check on accesses
> of /proc/net/<whatever>, namely the read check on the symlink itself.
> And since that check wasn't happening on /proc/net accesses with older
> kernels, older policies didn't allow it.
> 
> As to why others haven't reported it, I expect that they have updated
> their policies to newer ones that allow the necessary access.  The fact
> that legacy distros wouldn't have such updated policies isn't surprising
> - they don't push updates to those distros for new kernels.  FC5 and FC6
> are both EOL'd, right?
> 
> In any event, we didn't change anything in SELinux - the change was
> elsewhere (in the proc/net implementation).  Don't blame the messenger
> please.
> 

Vanilla FC5 broke and vanilla FC6 broke.  Did vanilla FC7, 8 or 9 break?

http://smolt.fedoraproject.org/static/stats/stats.html shows 11,000-odd
people running FC5 and FC6.  It would be incautious to assume that all
those people have updated their selinux rules.

And _requiring_ people to update their selinux rules to fix a
kernel-caused regression is a pretty big deal for some people, I
expect.

Then again, given that this regression has been out there since 2.6.25,
I guess not too many people are hurting from it.  But we suck.


  parent reply	other threads:[~2008-09-17 19:51 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 18:59 2.6.27-rc6-git2: Reported regressions from 2.6.26 Rafael J. Wysocki
2008-09-12 18:59 ` [Bug #11207] VolanoMark regression with 2.6.27-rc1 Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11215] INFO: possible recursive locking detected ps2_command Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11210] libata badness Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11220] Screen stays black after resume Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11230] Kconfig no longer outputs a .config with freshly updated defconfigs Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11237] corrupt PMD after resume Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11224] Only three cores found on quad-core machine Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11276] build error: CONFIG_OPTIMIZE_INLINING=y causes gcc 4.2 to do stupid things Rafael J. Wysocki
2008-09-12 20:46   ` Randy Dunlap
2008-09-12 21:19     ` Rafael J. Wysocki
2008-09-17 14:26       ` Bjorn Helgaas
2008-09-12 19:06 ` [Bug #11271] BUG: fealnx in 2.6.27-rc1 Rafael J. Wysocki
2008-09-13  8:47   ` Jaswinder Singh
2008-09-12 19:06 ` [Bug #11272] BUG: parport_serial in 2.6.27-rc1 for NetMos Technology PCI 9835 Rafael J. Wysocki
2008-09-16 15:25   ` Jaswinder Singh
2008-09-12 19:06 ` [Bug #11264] Invalid op opcode in kernel/workqueue Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11340] LTP overnight run resulted in unusable box Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11336] 2.6.27-rc2:stall while mounting root fs Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11308] tbench regression on each kernel release from 2.6.22 -&gt; 2.6.28 Rafael J. Wysocki
2008-09-12 22:05   ` Christoph Lameter
2008-09-13 11:44     ` Mike Galbraith
2008-09-13 11:57       ` Mike Galbraith
2008-09-14  6:24       ` Mike Galbraith
2008-09-14  7:02         ` Mike Galbraith
2008-09-14 14:18       ` Christoph Lameter
2008-09-14 19:51         ` Mike Galbraith
2008-09-15 10:44           ` Mike Galbraith
2008-09-16 12:28             ` Mike Galbraith
2008-09-16 14:07               ` Ilpo Järvinen
2008-09-17  4:39                 ` Mike Galbraith
2008-09-17  5:01                   ` Mike Galbraith
2008-09-17 10:40                     ` Ingo Molnar
2008-09-17 11:41                       ` Mike Galbraith
2008-09-17 12:49                         ` Ingo Molnar
2008-09-17 13:11                           ` Mike Galbraith
2008-09-17 13:36                             ` Ilpo Järvinen
2008-09-17 13:57                               ` Mike Galbraith
2008-09-17 17:04                                 ` Ilpo Järvinen
2008-09-18  7:12                                 ` Mike Galbraith
2008-09-18  7:25                                   ` Mike Galbraith
2008-09-18  7:58                                     ` Ilpo Järvinen
2008-09-17 14:47                             ` Eric Dumazet
2008-09-17 14:50                               ` Eric Dumazet
2008-09-17 18:16                               ` Mike Galbraith
2008-09-12 19:06 ` [Bug #11335] 2.6.27-rc2-git5 BUG: unable to handle kernel paging request Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11343] SATA Cold Boot Problems with 2.6.27-rc[23] on nVidia 680i Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11358] net: forcedeth call restore mac addr in nv_shutdown path Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11357] Can not boot up with zd1211rw USB-Wlan Stick Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11380] lockdep warning: cpu_add_remove_lock at:cpu_maps_update_begin+0x14/0x16 Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11398] hda_intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj Rafael J. Wysocki
2008-09-13  7:37   ` Frans Pop
2008-09-13 17:23     ` Takashi Iwai
2008-09-15  0:13       ` Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11382] e1000e: 2.6.27-rc1 corrupts EEPROM/NVM Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11404] BUG: in 2.6.23-rc3-git7 in do_cciss_intr Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11459] kernel crash after wifi connection established Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11407] suspend: unable to handle kernel paging request Rafael J. Wysocki
2008-09-12 20:50   ` Vegard Nossum
2008-09-12 19:06 ` [Bug #11439] [2.6.27-rc4-git4] compilation warnings Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11442] btusb hibernation/suspend breakage in current -git Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11465] Linux-2.6.27-rc5, drm errors in log Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11463] sshd hangs on close Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11471] GPE storm detected, kernel freezes Rafael J. Wysocki
2008-09-16  5:50   ` Zhang Rui
2008-09-12 19:06 ` [Bug #11501] Failed to open destination file: Permission deniedihex2fw Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11476] failure to associate after resume from suspend to ram Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11485] 2.6.27-rc xen pvops regression? Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11500] /proc/net bug related to selinux Rafael J. Wysocki
2008-09-12 22:14   ` James Morris
2008-09-12 22:24     ` Andrew Morton
2008-09-13  0:15       ` James Morris
2008-09-13 19:37         ` Andrew Morton
2008-09-15  0:16           ` Rafael J. Wysocki
2008-09-15 13:05           ` Stephen Smalley
2008-09-15 13:42             ` Stephen Smalley
2008-09-17 19:50             ` Andrew Morton [this message]
2008-09-17 21:24               ` Paul Moore
2008-09-17 21:39                 ` Eric W. Biederman
2008-09-17 22:11                   ` Andrew Morton
2008-09-17 21:48                 ` Andrew Morton
2008-09-17 22:12                   ` Paul Moore
2008-09-17 22:24                     ` Andrew Morton
2008-09-17 22:53                       ` Eric W. Biederman
2008-09-17 22:32                   ` Eric W. Biederman
2008-09-18 12:38                     ` Stephen Smalley
2008-09-18 13:03                       ` Stephen Smalley
2008-09-18 18:09                         ` Eric W. Biederman
2008-09-18 18:34                           ` Stephen Smalley
2008-09-19 16:58                             ` david
2008-09-19 17:07                               ` Stephen Smalley
2008-09-29 16:49                             ` Stephen Smalley
2008-09-17 22:23                 ` David Miller
2008-09-17 21:56               ` Eric W. Biederman
2008-09-12 19:06 ` [Bug #11506] oops during unmount - ext3? (2.6.27-rc5) Rafael J. Wysocki
2008-09-19 16:17   ` Marcin Slusarz
2008-09-12 19:06 ` [Bug #11505] oltp ~10% regression with 2.6.27-rc5 on stoakley machine Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11507] usb: sometimes dead keyboard after boot Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11548] kernel BUG at drivers/pci/intel-iommu.c:1373! Rafael J. Wysocki
2008-09-12 20:56   ` Chris Mason
2008-09-12 21:21     ` Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11549] 2.6.27-rc5 acpi: EC Storm error message on bootup Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11516] severe performance degradation on x86_64 going from 2.6.26-rc9 -&gt; 2.6.27-rc5 Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11547] build issue #565 for v2.6.27-rc5 : undefined reference to `ei_interrupt' in hp-plus.c Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11512] sort-of regression due to "kconfig: speed up all*config + randconfig" Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11550] pnp: Huge number of "io resource overlap" messages Rafael J. Wysocki
2008-09-12 22:52   ` Rene Herman
2008-09-12 19:06 ` [Bug #11553] Strange looking line from "ps aux" Rafael J. Wysocki
2008-09-13  8:51   ` Alan Jenkins
2008-09-12 19:06 ` [Bug #11554] Partition check considered as error is breaking mounting in 2.6.27 Rafael J. Wysocki
2008-09-13 23:37   ` Herton Ronaldo Krzesinski
2008-09-15  0:25     ` Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11552] Disabling IRQ #23 Rafael J. Wysocki
2008-09-13  3:24   ` Justin Mattock
2008-09-12 19:06 ` [Bug #11551] Semi-repeatable hard lockup on 2.6.27-rc6 Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11557] Controlling backlight on thinkpad x60 Rafael J. Wysocki
2008-09-13 15:13   ` Matthew Garrett
2008-09-14 10:18     ` Pavel Machek
2008-09-12 19:06 ` [Bug #11559] 2.6.27-rc6: nohz + s2ram = need to press keys to get progress Rafael J. Wysocki
2008-09-12 19:06 ` [Bug #11556] e100: PCI wake-up handling rework causes "Error clearing wake event" Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2008-09-06 21:24 2.6.27-rc5-git8: Reported regressions from 2.6.26 Rafael J. Wysocki
2008-09-06 21:30 ` [Bug #11500] /proc/net bug related to selinux Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080917125053.1f9ecf37.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=jmorris@namei.org \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox