Bug 672990 - running MLS policy you can write-down using terminal copy&paste
Summary: running MLS policy you can write-down using terminal copy&paste
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-26 22:59 UTC by Ted X Toth
Modified: 2011-01-27 21:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-27 21:07:01 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Ted X Toth 2011-01-26 22:59:50 UTC
Description of problem: Using copy&paste on gnome-terminals running at different levels you can write-down i.e. paste from a higher level terminal to a lower level terminal.


Version-Release number of selected component (if applicable):
selinux-policy-mls-3.7.19-54
mcstrans-0.3.1-4

How reproducible:


Steps to Reproduce:
1.Using semanage I changed the default login and user to be ranged SystemLow-SystemHigh so that I could newrole to single levels
2.Added user_devpts_t to /etc/selinux/mls/contexts/securetty_types so that a user could run newrole in a gnome-terminal
3.start 2 gnome-terminals
4.in terminal 1 run `newrole -l Secret-Secret`, authenticate, copy text of newrole command using Edit menu Copy
5.in terminal 2 run `newrole -l Unclassified-Unclassified`, authenticate, paste using Edit menu Paste
  
Actual results:
Copied text pasted from Secret window to Unclassified window


Expected results:
Unclassified windows Edit menu Paste should not be active since it should not know that anything is in the clipboard. The clipboard data should be labeled Secret and not accessible to the Unclassified gnome-terminal.

Additional info:

Comment 2 Daniel Walsh 2011-01-27 16:09:40 UTC
Ted lets bring this up for discussion on the list.  I am not sure what the proper control on this would be.  Since you did not launch the terminal with the correct label, the X Session does not know you are running at a different level, so it can not prevent.  After all you cut from a terminal and pasted to a terminal running at the same level.  So I think changing the securetty_types is not allowed.

Comment 3 Ted X Toth 2011-01-27 18:32:56 UTC
You're right. What I should have done was:
newrole -l Secret-Secret -- -c "gnome-terminal --disable-factory"

for instance so that the new window is running at the level specified and then indeed you can't copy&paste to gnome-terminal started similarly but at a different level. You can close this as not a bug. Sorry for the bother.

Comment 4 Daniel Walsh 2011-01-27 21:07:01 UTC
No problem, interesting to think about and glad that it is blocked.


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