Skip to contentSkip to conversation

ppp

DISCUSSION Russell Coker 3 participants 8 messages May 6, 2002 – May 9, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

It is common to install pppd in such a fashion that it can be run as "pppd call server" by a regular user.

The problem is that it often starts daemons from it's ip-up script once it connects, and such daemons aren't allowed to be in user_r!

I notice that the policy directive for doing an automatic role transition is now deprecated.

I am thinking of writing a pppd wrapper program which runs it as "system_u:system_r:pppd_t", what do you think?

Signature · 9 lines
If you send email to me or to a mailing list that I use which has >4 lines
of legalistic junk at the end then you are specifically authorizing me to do
whatever I wish with the message and all other messages from your domain, by
posting the message you agree that your long legalistic sig is void.

--
You have received this message because you are subscribed to the selinux 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 11 lines

It is common to install pppd in such a fashion that it can be run as "pppd call server" by a regular user.

The problem is that it often starts daemons from it's ip-up script once it connects, and such daemons aren't allowed to be in user_r!

I notice that the policy directive for doing an automatic role transition is now deprecated.

I am thinking of writing a pppd wrapper program which runs it as "system_u:system_r:pppd_t", what do you think?

There is a wrapper in Red Hat Linux. Look for usernetctl

Signature · 18 lines
Cheers
John Summerfield

Microsoft's most solid OS: http://www.geocities.com/rcwoolley/

Note: mail delivered to me is deemed to be intended for me, for my disposition.

==============================
If you don't like being told you're wrong,
	be right!




--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 6 lines · John Summerfield
Quoted 6 lines

It is common to install pppd in such a fashion that it can be run as "pppd call server" by a regular user.

The problem is that it often starts daemons from it's ip-up script once it connects, and such daemons aren't allowed to be in user_r!

Quoted 7 lines
Quoted 5 lines

I notice that the policy directive for doing an automatic role transition is now deprecated.

I am thinking of writing a pppd wrapper program which runs it as "system_u:system_r:pppd_t", what do you think?

There is a wrapper in Red Hat Linux. Look for usernetctl

I am not after a wrapper for the connect/disconnect functionality, I think that the pon/poff scripts from Debian are good enough (and probably better than the Red Hat equivalents).

I am talking about something similar to run_init but without a password prompt, which is why I'm asking here as this may considered a bad idea for security...

Signature · 9 lines
If you send email to me or to a mailing list that I use which has >4 lines
of legalistic junk at the end then you are specifically authorizing me to do
whatever I wish with the message and all other messages from your domain, by
posting the message you agree that your long legalistic sig is void.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw
In reply to Russell Coker
Quoted 8 lines · Russell Coker

It is common to install pppd in such a fashion that it can be run as "pppd call server" by a regular user.

The problem is that it often starts daemons from it's ip-up script once it connects, and such daemons aren't allowed to be in user_r!

I am thinking of writing a pppd wrapper program which runs it as "system_u:system_r:pppd_t", what do you think?

I suppose that the question is whether we obtain any real security benefit from having such a wrapper vs. directly authorizing user_r for the necessary domains and directly authorizing user_t to transition via pppd_exec_t to pppd_t. The domain transitions would still be limited based on the entrypoint program. Can you clarify exactly what other daemons might be started in this manner?

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#4 lore raw
Quoted 9 lines · Stephen Smalley
Quoted 8 lines

It is common to install pppd in such a fashion that it can be run as "pppd call server" by a regular user.

The problem is that it often starts daemons from it's ip-up script once it connects, and such daemons aren't allowed to be in user_r!

I am thinking of writing a pppd wrapper program which runs it as "system_u:system_r:pppd_t", what do you think?

Quoted 6 lines

I suppose that the question is whether we obtain any real security benefit from having such a wrapper vs. directly authorizing user_r for the necessary domains and directly authorizing user_t to transition via pppd_exec_t to pppd_t. The domain transitions would still be limited based on the entrypoint program. Can you clarify exactly what other daemons might be started in this manner?

In my policy I already have a user_t transition to pppd_t. The issue is that pppd should not be running in user_r because the ip-up scripts will start other daemons which should be in domains that aren't permitted in user_r (EG the mail server).

Basically preserving the current mode of operation of pppd for manual call-out and keeping it in user_r means removing system_r because most things that belong in system_r will end up in user_r!

Signature · 9 lines
If you send email to me or to a mailing list that I use which has >4 lines
of legalistic junk at the end then you are specifically authorizing me to do
whatever I wish with the message and all other messages from your domain, by
posting the message you agree that your long legalistic sig is void.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#5 lore raw
Quoted 8 lines · Russell Coker

In my policy I already have a user_t transition to pppd_t. The issue is that pppd should not be running in user_r because the ip-up scripts will start other daemons which should be in domains that aren't permitted in user_r (EG the mail server).

Basically preserving the current mode of operation of pppd for manual call-out and keeping it in user_r means removing system_r because most things that belong in system_r will end up in user_r!

Right. But it isn't clear that creating a wrapper as you suggested offers any real security benefit in this situation, and it may simply obscure the fact that the user_r/system_r role separation would then be illusory. You might as well just add all of the system_r domains into user_r. In either case, the TE model provides the real control over transitions and interactions among user and system processes based on their domains.

In general, the RBAC model provides no improvement in security over the TE model, just a higher level of abstraction to ease user management. It can potentially bound the set of domains that are reachable based on the role (as long as role transitions are not completely unconstrained, as it appears that they are becoming), but the same effect can be achieved simply by controlling domain transitions and defining derived domains as necessary to maintain separation. If role transitions will typically be unconstrained, then one might argue that roles and the RBAC logic should be removed entirely to avoid confusing the security model.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#6 lore raw
Quoted 5 lines · Stephen Smalley
Quoted 5 lines

In my policy I already have a user_t transition to pppd_t. The issue is that pppd should not be running in user_r because the ip-up scripts will start other daemons which should be in domains that aren't permitted in user_r (EG the mail server).

Quoted 7 lines
Quoted 3 lines

Basically preserving the current mode of operation of pppd for manual call-out and keeping it in user_r means removing system_r because most things that belong in system_r will end up in user_r!

Right. But it isn't clear that creating a wrapper as you suggested offers any real security benefit in this situation, and it may simply obscure the fact that the user_r/system_r role separation would then be illusory. You

No it would not be illusory! It would be that there would be two ways of entering system_r, one of which is run_init (by the system administrator) and the other is the ppp wrapper which can be called by a user.

Quoted 3 lines

might as well just add all of the system_r domains into user_r. In either case, the TE model provides the real control over transitions and interactions among user and system processes based on their domains.

I don't like the idea of moving all the system_r domains into user_r.

Quoted 9 lines

In general, the RBAC model provides no improvement in security over the TE model, just a higher level of abstraction to ease user management. It can potentially bound the set of domains that are reachable based on the role (as long as role transitions are not completely unconstrained, as it appears that they are becoming), but the same effect can be achieved simply by controlling domain transitions and defining derived domains as necessary to maintain separation. If role transitions will typically be unconstrained, then one might argue that roles and the RBAC logic should be removed entirely to avoid confusing the security model.

I take your point, however I am definately not proposing totally uncontstrained role transitions. I am merely suggesting a wrapper program to solve one particular instance of role transitions.

How else should we approach this problem? I guess I could have a pppd which is always running, and have a SUID-root helper program which tells it when to connect or disconnect. Then the helper program would only need permissions to send signals or write to a Unix domain socket. I can get this done (I have commit access to the PPP CVS) if it's considered the right thing to do, although it will take time.

Signature · 9 lines
If you send email to me or to a mailing list that I use which has >4 lines
of legalistic junk at the end then you are specifically authorizing me to do
whatever I wish with the message and all other messages from your domain, by
posting the message you agree that your long legalistic sig is void.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#7 lore raw
Quoted 3 lines · Russell Coker

No it would not be illusory! It would be that there would be two ways of entering system_r, one of which is run_init (by the system administrator) and the other is the ppp wrapper which can be called by a user.

Except that the wrapper does nothing other than to run pppd in system_u:system_r:pppd_t. Hence, every user_r process can transition to system_r. The corresponding program (pppd) and domain (pppd_t) would be hardcoded by the wrapper (and could be strictly enforced by the TE model - i.e. the wrapper domain can be limited to running pppd in pppd_t), but the role separation itself would be gone.

Quoted 1 line

I don't like the idea of moving all the system_r domains into user_r.

Understood, but keep in mind that the end result is the same. Even if you place all of the system_r domains into user_r, that doesn't mean that a user_r:user_t process can transition (directly) to those domains. The TE policy controls the domain transitions and entrypoint programs, so you can simply authorize user_t to run pppd in pppd_t and authorize pppd_t to run the daemon programs in their domains.

Quoted 10 lines

I take your point, however I am definately not proposing totally uncontstrained role transitions. I am merely suggesting a wrapper program to solve one particular instance of role transitions.

How else should we approach this problem? I guess I could have a pppd which is always running, and have a SUID-root helper program which tells it when to connect or disconnect. Then the helper program would only need permissions to send signals or write to a Unix domain socket. I can get this done (I have commit access to the PPP CVS) if it's considered the right thing to do, although it will take time.

In the short term, the ppp wrapper is probably fine. The latter approach does sound better as a longer term solution.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.