containers / udica

This repository contains a tool for generating SELinux security profiles for containers
GNU General Public License v3.0
488 stars 47 forks source link

allowing port 21 also means allowing ports 989 and 990 #7

Closed milosmalik closed 2 years ago

milosmalik commented 5 years ago

Describe the bug Users of udica may be confused by the fact that allowing port 21 also means that ports 989 and 990 are allowed too, because from SELinux policy point of view they are labeled the same way: ftp_port_t.

To Reproduce Steps to reproduce the behavior:

  1. podman run --security-opt label=type:my_container.process -v /home:/home:ro -v /var/spool:/var/spool:rw -p 21:21 -it fedora bash
  2. nc -lvp 21
  3. nc -lvp 989
  4. nc -lvp 990

Expected behavior Documentation should contain a note about this behavior.

Additional context Ephemeral ports (32768-61000) are allowed too unless the content of /proc/sys/net/ipv4/ip_local_port_range is changed.