All of lore.kernel.org
 help / color / mirror / Atom feed
* "netstat -Z" reimplementation
@ 2011-07-27  9:28 Rongqing Li
  2011-07-27 10:51 ` Martin Christian
  2011-07-27 12:09 ` Stephen Smalley
  0 siblings, 2 replies; 8+ messages in thread
From: Rongqing Li @ 2011-07-27  9:28 UTC (permalink / raw)
  To: selinux@tycho.nsa.gov, Stephen Smalley

SELinux folks, Stephen:

I have some thoughts about reimplementation of 'netstat -Z', but I do
not know if it is valuable, or if there are other risks. Could you
evaluate my implementation, or give me your valuable advice?

1. From kernel, print the socket labels to tcp, udp, raw, unix
files under /proc/net/.

Now the /proc/net/tcp /proc/net/udp ... include many socket's
information, like local address, remote address, inode, I think we can
put the socket's security context to these files.

To avoid to expose these information to non-privileged users, security
checking should be done when expose the socket security context to procfs.

2. reimplementation the "netstat -Z", "netstat -Z" will first parse the
security context from procfs's tcp, udp, raw files, and get the security
context, if this step fails, "netstat -Z" will try as legacy method.


If this implementation could be accepted by mainstream, netstat could
print the correct socket label even if the type_transition has been
happen on socket, or application changes socket labels by setting
/proc/self/attr/sockcreate.


Do you think it is valuable?

Thanks

-- 
Best Reagrds,
Roy | RongQing Li
-------------------------------------------------------------
WIND RIVER Beijing | China Development Center
Phone: +86-10-6483-5025, Cell: +86-135-2202-9864, Fax: +86-10-6479-0367


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-28  3:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-27  9:28 "netstat -Z" reimplementation Rongqing Li
2011-07-27 10:51 ` Martin Christian
2011-07-27 12:09 ` Stephen Smalley
2011-07-27 12:19   ` Daniel J Walsh
2011-07-27 13:37   ` Eric Paris
2011-07-27 13:40     ` Stephen Smalley
2011-07-28  3:00       ` Rongqing Li
2011-07-28  2:58   ` Rongqing Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.