Bug 284441 - xfs can't bind to its registered TCP port
xfs can't bind to its registered TCP port
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-10 06:34 EDT by Markku Kolkka
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: Current
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-13 15:22:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Markku Kolkka 2007-09-10 06:34:17 EDT
Description of problem:
Xfs (the X font server, not the filesystem) can't be used over TCP because the
SELinux policy blocks it from connecting to port 7100. 

Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.4.6-30.el5

How reproducible:
aways

Steps to Reproduce:
1. Comment out the line "nolisten tcp" in /etc/X11/fs/config 
2. service xfs restart
  
Actual results:
avc: denied { name_bind } for comm="xfs" egid=43 euid=43 exe="/usr/bin/xfs"
exit=-13 fsgid=43 fsuid=43 gid=43 items=0 pid=22881
scontext=user_u:system_r:xfs_t:s0 sgid=43 src=7100 subj=user_u:system_r:xfs_t:s0
suid=43 tclass=tcp_socket tcontext=system_u:object_r:port_t:s0 tty=(none) uid=43 

Font server won't accept TCP connections.

Expected results:
NX client can connect to font server

Additional info:
Comment 1 Daniel Walsh 2007-09-11 08:45:10 EDT
Fixed in selinux-policy-targeted-2.4.6-91.el5
Comment 2 Tuomo Soini 2007-11-12 04:26:20 EST
avc: denied { name_bind } for comm="xfs" egid=43 euid=43 exe="/usr/bin/xfs"
exit=-13 fsgid=43 fsuid=43 gid=43 items=0 pid=4387
scontext=system_u:system_r:xfs_t:s0 sgid=43 src=7100
subj=system_u:system_r:xfs_t:s0 suid=43 tclass=tcp_socket
tcontext=system_u:object_r:port_t:s0 tty=(none) uid=43 

This happens with  2.4.6-106.el5_1.3

I don't really understand why this happens because I can see code change between
2.4.6-30 and 2.4.6-106.3 having changed which imho should allow this. Maybe
something is missing from patch?

I can test proposed patch for this if somebody has suggestion for fix.
Comment 3 Tuomo Soini 2007-11-12 13:18:02 EST
Command:

/usr/sbin/semanage port -l | grep 7100

doesn't return anything while it should. list port 7100 as xfs_port_t.
Comment 4 Daniel Walsh 2007-11-12 16:57:09 EST
semodule -B

Are you sure the policy is loaded?

Try to install the rpm again with a --force.


Comment 5 Tuomo Soini 2007-11-13 03:19:54 EST
Problem was selinux-policy-targeted-2.4.6-76 which was previously on system. New
base policy failed to load because there were incompatible changes between that
old version and new.

Fix was:

cd /usr/share/selinux/targeted
semodule -n -b base.pp
shutdown -r now

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