Bug 551286 - SELinux policy for mgetty is missing, getty_t is not the right class...
Summary: SELinux policy for mgetty is missing, getty_t is not the right class...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-29 20:10 UTC by Klaus Lichtenwalder
Modified: 2010-01-08 20:12 UTC (History)
2 users (show)

Fixed In Version: 3.6.32-66.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-08 20:12:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
AVC denials from permissive mode (7.06 KB, text/plain)
2009-12-29 20:10 UTC, Klaus Lichtenwalder
no flags Details

Description Klaus Lichtenwalder 2009-12-29 20:10:20 UTC
Created attachment 380843 [details]
AVC denials from permissive mode

Description of problem:
Policy for mgetty+sendfax is not ok. It is now in the getty policy, but this is not enough for fax reception of mgetty and following email notification


Version-Release number of selected component (if applicable):
mgetty-1.1.36-5.fc12.x86_64
selinux-policy-3.6.32-59.fc12.noarch
selinux-policy-targeted-3.6.32-59.fc12.noarch


How reproducible:
Activate mgetty in default Fedora 12 install, receive a fax over serial line

  
Actual results:
Notification fails, AVC denials clutter the log

Expected results:
"quiet" fax reception


Additional info:
Dominick Grift from fedora-selinux-list kindly reviewd my AVC denials (see attachment) and created a policy for mgetty, that works (safe of a more thorough security review). As mgetty does more than the normal gettys I guess it merits its own policy?

mygetty.te:
policy_module(mygetty, 1.0.0)
optional_policy(`
gen_require(`
type getty_t;
')
corecmd_exec_bin(getty_t)
corecmd_exec_shell(getty_t)
kernel_read_system_state(getty_t)
')


mymail.te:
policy_module(mymail, 1.0.0)
optional_policy(`
gen_require(`
type system_mail_t;
')
term_use_unallocated_ttys(system_mail_t)
')


(Though mgetty seems to leak the serial port to sendmail, which obviously is a bug and would not need to be taken care of in the policy)

Comment 1 Daniel Walsh 2009-12-29 21:33:56 UTC
Fixed in selinux-policy-3.6.32-65.fc12.noarch

Comment 2 Klaus Lichtenwalder 2009-12-30 07:36:11 UTC
Sorry, one thing I forgot. This comes from my tests before, I labeled new_fax, the command, as bin_t to put it in the executables domain:

semanage fcontext -a -t bin_t '/etc/mgetty\+sendfax/new_fax'

Comment 3 Daniel Walsh 2009-12-30 13:14:11 UTC
Ok added that label.

Comment 4 Fedora Update System 2010-01-04 21:55:43 UTC
selinux-policy-3.6.32-66.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-66.fc12

Comment 5 Fedora Update System 2010-01-05 22:51:47 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0184

Comment 6 Klaus Lichtenwalder 2010-01-06 09:11:32 UTC
mgetty sending and receiving faxes including mail notification works fine now

Klaus

Comment 7 Daniel Walsh 2010-01-06 13:59:19 UTC
Please provide feedback and update the karma.

Comment 8 Klaus Lichtenwalder 2010-01-06 15:03:42 UTC
Ok, did not know that I had to be logged in to better the karma...

Comment 9 Fedora Update System 2010-01-08 20:06:32 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


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