Bug 666209 - SELinux issues with XMPP file transfer on Bitlbee
SELinux issues with XMPP file transfer on Bitlbee
Status: NEW
Product: Fedora
Classification: Fedora
Component: bitlbee (Show other bugs)
23
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
: SELinux
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-29 10:26 EST by Matěj Cepl
Modified: 2015-07-15 11:17 EDT (History)
4 users (show)

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


Attachments (Terms of Use)
old version of the patch (1.76 KB, patch)
2010-12-29 10:31 EST, Matěj Cepl
no flags Details | Diff

  None (edit)
Description Matěj Cepl 2010-12-29 10:26:13 EST
When *receiving* file, we get:

jakoubek:~# ausearch -m AVC -ts 16:15
----
time->Wed Dec 29 16:20:37 2010
type=SYSCALL msg=audit(1293636037.973:3213): arch=c000003e syscall=42 success=no exit=-115 a0=7 a1=205f870 a2=10 a3=1 items=0 ppid=30551 pid=27389 auid=4294967295 uid=493 gid=489 euid=493 suid=493 fsuid=493 egid=489 sgid=489 fsgid=489 tty=(none) ses=4294967295 comm="bitlbee" exe="/usr/sbin/bitlbee" subj=system_u:system_r:bitlbee_t:s0 key=(null)
type=AVC msg=audit(1293636037.973:3213): avc:  denied  { name_connect } for  pid=27389 comm="bitlbee" dest=7779 scontext=system_u:system_r:bitlbee_t:s0 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket
jakoubek:~# ausearch -m AVC -ts 16:15|audit2allow


#============= bitlbee_t ==============
#!!!! This avc can be allowed using the boolean 'allow_ypbind'

allow bitlbee_t port_t:tcp_socket name_connect;
jakoubek:~# 

However, in the permissive mode, file transfer happens without a problem. And no, this has absolutely nothing to do with NIS, so allow_ypbind is probably not the right solution.
Comment 1 Matěj Cepl 2010-12-29 10:27:52 EST
Relates to http://bugs.bitlbee.org/bitlbee/ticket/739
Comment 2 Matěj Cepl 2010-12-29 10:31:57 EST
Created attachment 471071 [details]
old version of the patch

I have an old version of SELinux XMPP file transfer patch, which was based on different code. I will need to upgrade it to the current code.
Comment 3 Matěj Cepl 2010-12-29 10:38:13 EST
I wonder actually how much of this are issues with IRC and DCC file transfers, and how much of that is actually Bitlbee.
Comment 4 Miroslav Grepl 2011-01-03 07:23:45 EST
(In reply to comment #2)
> Created attachment 471071 [details]
> old version of the patch
> 
> I have an old version of SELinux XMPP file transfer patch, which was based on
> different code. I will need to upgrade it to the current code.

Matej, some of rules are already a part of the default bitlbee policy. Could you test it without your local policy?
Comment 5 Miroslav Grepl 2011-01-03 07:39:11 EST
(In reply to comment #0)
> When *receiving* file, we get:
> 
> jakoubek:~# ausearch -m AVC -ts 16:15
> ----
> time->Wed Dec 29 16:20:37 2010
> type=SYSCALL msg=audit(1293636037.973:3213): arch=c000003e syscall=42
> success=no exit=-115 a0=7 a1=205f870 a2=10 a3=1 items=0 ppid=30551 pid=27389
> auid=4294967295 uid=493 gid=489 euid=493 suid=493 fsuid=493 egid=489 sgid=489
> fsgid=489 tty=(none) ses=4294967295 comm="bitlbee" exe="/usr/sbin/bitlbee"
> subj=system_u:system_r:bitlbee_t:s0 key=(null)
> type=AVC msg=audit(1293636037.973:3213): avc:  denied  { name_connect } for 
> pid=27389 comm="bitlbee" dest=7779 scontext=system_u:system_r:bitlbee_t:s0
> tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket
> jakoubek:~# ausearch -m AVC -ts 16:15|audit2allow
> 
> 
> #============= bitlbee_t ==============
> #!!!! This avc can be allowed using the boolean 'allow_ypbind'
> 
> allow bitlbee_t port_t:tcp_socket name_connect;
> jakoubek:~# 
> 
> However, in the permissive mode, file transfer happens without a problem. And
> no, this has absolutely nothing to do with NIS, so allow_ypbind is probably not
> the right solution.

One of solution is adding a new type for the 7777/tcp port.
Comment 6 Matěj Cepl 2011-01-03 17:50:55 EST
(In reply to comment #4)
> Matej, some of rules are already a part of the default bitlbee policy. Could
> you test it without your local policy?

Note, I don't actually use the attached policy yet:

jakoubek:tmp $ sudo semodule -l |grep -iE '(my|bitlbee)'
bitlbee	1.4.0	
myBitlbeeSystemdBZ666182	1.1	
mysql	1.12.0	
jakoubek:tmp $ 

Log was created with just what's shown above.
Comment 7 Fedora End Of Life 2013-04-03 14:57:22 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 8 Fedora End Of Life 2015-01-09 11:29:53 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Jan Kurik 2015-07-15 11:17:38 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

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