Bug 443481 - kernel BUG at security/selinux/hooks.c:761 during NFS install
kernel BUG at security/selinux/hooks.c:761 during NFS install
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Eric Paris
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F9KernelBlocker
  Show dependency treegraph
 
Reported: 2008-04-21 15:46 EDT by Will Woods
Modified: 2008-04-24 21:35 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-24 21:35:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
change BUG_ON to safe handling if (!ss_initialized) (1.05 KB, patch)
2008-04-21 15:59 EDT, Eric Paris
no flags Details | Diff

  None (edit)
Description Will Woods 2008-04-21 15:46:16 EDT
Using today's rawhide (20080421, kernel-2.6.25-1.fc9.i586) I get a kernel BUG
when the system attempts to mount its nfs install source.

anaconda says:
  Running... /bin/mount -n -t nfs -o nolock [nfs target] /mnt/isodir
And then we get:

kernel BUG at security/selinux/hooks.c:761!
...
EIP is at selinux_sb_clone_mnt_opts+0x21/0xd9
...
Call Trace: [I'm trimming it to just function names]
security_sb_clone_mnt_opts
nfs_xdev_get_sb
vfs_kern_mount
nfs_follow_mountpoint
inode_has_perm
selinux_inode_follow_link
__link_path_walk
inode_has_perm
avc_has_perm
path_walk
do_path_lookup
__path_lookup_intent_open
path_lookup_open
open_namei
__dentry_open
do_filp_open
strncpy_from_user
do_sys_open
fput
sys_open
syscall_call
ht_enable_msi_mapping

This causes loader to SEGV and the install dies.
Comment 1 Eric Paris 2008-04-21 15:51:00 EDT
Well, I guess if the installer just isn't loading policy or disabling selinux
then we could hit this BUG_ON(!ss_initialized)

sds, what do you think, if !ss_initialized we know the parent sb couldn't have
had selinux mount options so there is no reason we can't just throw this sb on
the superblock_security_head list and deal with it later...

will send such a patch to selinux list in just a moment if I don't hear anything
different.
Comment 2 Eric Paris 2008-04-21 15:59:59 EDT
Created attachment 303195 [details]
change BUG_ON to safe handling if (!ss_initialized)
Comment 3 Stephen Smalley 2008-04-21 16:08:38 EDT
Looks sane, although I'm curious as to why we haven't loaded a policy before we
hit the clone.
Comment 4 Bill Nottingham 2008-04-21 16:15:50 EDT
policy is part of the second stage, and isn't loaded until after it's mounted.
Comment 5 Eric Paris 2008-04-21 17:06:38 EDT
I'm going to push the patch in comment #2 to F-9 kernel as soon as CVS opens back up
Comment 6 Chuck Ebbert 2008-04-23 09:57:56 EDT
Patch went in kernel 2.6.25-4. Can someone confirm this is fixed?
Comment 7 Will Woods 2008-04-24 12:35:40 EDT
I can't easily confirm this until a fixed kernel lands in rawhide - it needs to
be running during the install.

I'll see if it's possible to build custom boot images using the koji repos..
Comment 8 Will Woods 2008-04-24 19:55:39 EDT
Well, I built custom boot images with the new kernel and attempted an NFS
install. It didn't oops on NFS mount, and it seemed to mount stage2.img OK as well.

Unfortunately the tree is out-of-date so the install can't proceed past there.
But I think that confirms that the BUG is gone.

Note You need to log in before you can comment on or make changes to this bug.