Skip to contentSkip to conversation

Question of purpose of labeling port numbers?

DISCUSSION Park Lee 2 participants 2 messages Feb 23, 2005 SELinux security module

lore
Share & tools
lore

Park Lee

author
#0 lore raw

Hi,

We know that in SELinux, TCP and UDP port numbers
are labeled to permit controls over the ability to bind to particular ports. e.g., we can write a rule "allow $1 port_t:udp_socket name_bind;" to explain this.

But, in the definition of macro "can_network" (in
global_macros.te), we can see the following rule:
"allow $1 port_type:{ tcp_socket udp_socket } { send_msg recv_msg };".
Does this rule mean that TCP and UDP port numbers
are also labeled to permit controls over the ability of the socket(i.e. tcp_socket and udp_socket) to send or receive messages on particular ports?

Thank you.

=====
Best Regards,
Park Lee

__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 8 lines · Park Lee

Hi,

We know that in SELinux, TCP and UDP port numbers
are labeled to permit controls over the ability to bind to particular ports. e.g., we can write a rule "allow $1 port_t:udp_socket name_bind;" to explain this.

Quoted 8 lines

But, in the definition of macro "can_network" (in
global_macros.te), we can see the following rule:
"allow $1 port_type:{ tcp_socket udp_socket } { send_msg recv_msg };".
Does this rule mean that TCP and UDP port numbers
are also labeled to permit controls over the ability of the socket(i.e. tcp_socket and udp_socket) to send or receive messages on particular ports?

Yes, these controls were introduced in the 2.6 SELinux by James Morris back in January 2004. See the mailing list archives.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.