Bug 188068 - FC4 kernel doesn't understand MLS
FC4 kernel doesn't understand MLS
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
4
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-05 14:21 EDT by Ron Yorston
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version: 2.6.16-1.2107_FC4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-03 15:26:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix MLS compatibility patch in 2.6.16 (390 bytes, patch)
2006-04-06 17:12 EDT, Ron Yorston
no flags Details | Diff

  None (edit)
Description Ron Yorston 2006-04-05 14:21:47 EDT
Description of problem:
The FC4 kernel doesn't understand the MLS suffix in the context of on-disk
inodes which have been created in FC5.  This results in errors like:

Apr  1 10:30:24 random kernel: inode_doinit_with_dentry: 
context_to_sid(user_u:object_r:user_home_t:s0) returned 22 for dev=dm-1 ino=352500

for files in the /home directory that I want to share between FC4 and FC5.  To
get FC4 to work I have to boot with enforcing=0.

I think the RHEL4 kernel has the same problem.

Version-Release number of selected component (if applicable):
2.6.16-1.2069_FC4

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Stephen Smalley 2006-04-05 14:49:41 EDT
I thought that this was resolved in bug 174618 and upstream in 2.6.15.
But the reporter indicates that it is still causing problems.
Bug 177349 tracks the RHEL4 fix.
Comment 2 Stephen Smalley 2006-04-05 14:57:17 EDT
(In reply to comment #1)
> I thought that this was resolved in bug 174618 and upstream in 2.6.15.
> But the reporter indicates that it is still causing problems.
> Bug 177349 tracks the RHEL4 fix.

Oops, the latter should be bug 177439.
Comment 3 Ron Yorston 2006-04-06 17:12:41 EDT
Created attachment 127429 [details]
Fix MLS compatibility patch in 2.6.16

It looks as though it's an off-by-one issue.  In mls_context_to_sid in mls.c
the parsing code is returning *scontext pointing to one beyond the terminating
null in the string.  The compatibility code needs to add one more to *scontext
to allow for this.

With this patch added to the 2.6.16-1.2069_FC4 kernel I'm able to boot my FC4
installation in enforcing mode and access files in my shared /home.  The
context_to_sid warnings have all gone.
Comment 4 Stephen Smalley 2006-04-11 10:58:44 EDT
Attachment 127429 [details] is correct (to the extent that the mls parsing code and length
check is correct, which can be debated, but that is another matter).
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>

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