Bug 2279136

Summary: fail2ban-selinux 1.0.2-13 prevents server from binding to socket
Product: [Fedora] Fedora Reporter: Chris Palmer <chris>
Component: fail2banAssignee: Richard Shaw <hobbes1069>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: anon.amish, hobbes1069, orion, vonsch
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-05 12:00:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Palmer 2024-05-05 08:24:02 UTC
Upgrading fail2ban-* from 1.0.2-12 to 1.0.2-13 broke, as the server was no longer permitted to create the socket (in the default location)

May  4 09:38:13 bastion audit[1889]: AVC avc:  denied  { create } for  pid=1889 comm="fail2ban-server" name="fail2ban.sock" scontext=system_u:system_r:fail2ban_t:s
0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=0

2024-05-04 09:38:13,466 fail2ban.server         [1889]: ERROR   Could not start server: Unable to bind socket /var/run/fail2ban/fail2ban.sock

fail2ban-server then died, and was restarted repeatedly by systemd until the retry count was exhausted.

Downgrading fail2ban-selinux to 1.0.2-9 (and leaving the other components at 1.0.2-13) allowed the service to run.

The problem only occurs when selinux is enforcing of course.

Reproducible: Always

Steps to Reproduce:
1. Ensure selinux is enforcing
2. Install fail2ban-* 1.0.2-13
3. Start fail2ban-server
Actual Results:  
fail2ban-server crashed as detailed above.

Expected Results:  
fail2ban-server should have started normally, creating the socket.

Comment 1 Richard Shaw 2024-05-05 12:00:48 UTC

*** This bug has been marked as a duplicate of bug 2279054 ***