xserver: add r/w permissions for the DRI devices
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Modify the xserver role, so that the Direct Rendering Infrastructure devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).
--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)
policy/modules/services/xserver.if +2 -0
@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ') #######################################
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Quoted 12 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).
Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)
policy/modules/services/xserver.if interface(`xserver_role',` · line 170
Quoted 8 lines
policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ') #######################################
I'm fine with this change, but I think it should be conditional. Then people that don't want users to have direct access to hardware, like this, can disable it.
Signature · 1 line
Chris PeBenito
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Quoted 20 lines · Chris PeBenito
Quoted 19 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).
Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')
Quoted 5 lines
policy/modules/services/xserver.if interface(`xserver_role',` · line 170
Quoted 1 line
policy/modules/services/xserver.if +0
-0#######################################I'm fine with this change, but I think it should be conditional. Then people that don't want users to have direct access to hardware, like this, can disable it.
I have this locally as dev_rw_dri(x_domain) instead. since chromium_t and mplayer_t and other things than just the user roles need hardware acceleration.
I agree it should be in a boolean too since i have not found anything that *requires* it, and people might want it off.
-- Jason
Quoted 7 lines
Signature · 6 lines
-- Chris PeBenito _______________________________________________ refpolicy mailing list refpolicy at oss.tresys.com http://oss.tresys.com/mailman/listinfo/refpolicy
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Quoted 27 lines · Jason Zaman
Quoted 20 lines · Chris PeBenito
Quoted 19 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).
Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')Quoted 5 lines
policy/modules/services/xserver.if interface(`xserver_role',` · line 170
Quoted 1 line
policy/modules/services/xserver.if +0
-0#######################################I'm fine with this change, but I think it should be conditional. Then people that don't want users to have direct access to hardware, like this, can disable it.
Quoted 6 lines
I have this locally as
dev_rw_dri(x_domain)instead. sincechromium_tandmplayer_tand other things than just the user roles need hardware acceleration.
I agree it should be in a boolean too since i have not found anything that *requires* it, and people might want it off.
I suspect that this is also (or also can be) driver specific
Quoted 13 lines
-- Jason
Quoted 7 lines
Signature · 6 lines
-- Chris PeBenito _______________________________________________ refpolicy mailing list refpolicy at oss.tresys.com http://oss.tresys.com/mailman/listinfo/refpolicy_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 11 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 648 bytes Desc: OpenPGP digital signature Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20160823/d24fd527/attachment.bin
PATCH 1/1 xserver: add r/w permissions for the DRI devices
In reply to Chris PeBenitoQuoted 26 lines · Chris PeBenito
Quoted 25 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>---
?policy/modules/services/xserver.if |????2 ++
?1 file changed, 2 insertions(+)--- refpolicy-git-06082016-orig/policy/modules/services/xserver.if
2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200(quoted diff) +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` ? relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) ? relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ?')
Quoted 6 lines
Quoted 1 line
?#######################################
I'm fine with this change, but I think it should be conditional.??Then?
people that don't want users to have direct access to hardware, like? this, can disable it.
What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security risk.
So, why increasing the complexity for little or no gain ?
Regards,
Guido
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Quoted 34 lines · Guido Trentalancia
Quoted 26 lines · Chris PeBenito
Quoted 25 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)--- refpolicy-git-06082016-orig/policy/modules/services/xserver.if
2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')Quoted 6 lines
Quoted 1 line
#######################################
I'm fine with this change, but I think it should be conditional. Then
people that don't want users to have direct access to hardware, like this, can disable it.
Quoted 4 lines
What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security risk.
So, why increasing the complexity for little or no gain ?
https://en.wikipedia.org/wiki/Principle_of_least_privilege
The login shell does not need to read/write dri devices.
Quoted 9 lines
Regards,
Guido
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 11 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 648 bytes Desc: OpenPGP digital signature Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20160823/efa6e258/attachment.bin
PATCH 1/1 xserver: add r/w permissions for the DRI devices
If you are only using the shell, then you should not load the xserver module in the first place!
Quoted 55 lines · Dominick Grift
Quoted 33 lines · Guido Trentalancia
Quoted 31 lines · Chris PeBenito
Quoted 25 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)--- refpolicy-git-06082016-orig/policy/modules/services/xserver.if
2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')Quoted 1 line
#######################################
I'm fine with this change, but I think it should be conditional. Then
people that don't want users to have direct access to hardware, likeQuoted 4 lines
Quoted 1 line
this, can disable it.
What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security
risk.
Quoted 2 lines
So, why increasing the complexity for little or no gain ?
https://en.wikipedia.org/wiki/Principle_of_least_privilege
The login shell does not need to read/write dri devices.
Quoted 9 lines
Regards,
Guido
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Quoted 1 line · Guido Trentalancia
If you are only using the shell, then you should not load the xserver module in the first place!
It is very hard to justify my POV in reference policy. Because LP is not enforced consistently.
The xserver_role() is, I think, supposed to be called from a (login) shell domain.
If you allow the login shell domain to rw dri devices then you have some processes running in the login shell domain that shouldnt be running there in the first place in an ideal world.
Refpolicy has to strike a delicate balance. On the one hand it has to be usable but on the other hand it needs to be relevant base.
Making this conditional is not perfect but its a reasonable compromise.
Quoted 58 lines · Dominick Grift
Quoted 55 lines · Guido Trentalancia
Quoted 33 lines · Chris PeBenito
Quoted 31 lines · Guido Trentalancia
Quoted 25 lines
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)--- refpolicy-git-06082016-orig/policy/modules/services/xserver.if
2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')Quoted 1 line
#######################################
I'm fine with this change, but I think it should be conditional. Then
people that don't want users to have direct access to hardware, likeQuoted 4 lines
Quoted 1 line
this, can disable it.
What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security
risk.
Quoted 2 lines
So, why increasing the complexity for little or no gain ?
https://en.wikipedia.org/wiki/Principle_of_least_privilege
The login shell does not need to read/write dri devices.
Quoted 9 lines
Regards,
Guido
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 11 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 648 bytes Desc: OpenPGP digital signature Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20160823/1ea00cb4/attachment.bin
PATCH 1/1 xserver: add r/w permissions for the DRI devices
In reply to Guido TrentalanciaQuoted 1 line · Guido Trentalancia
If you are only using the shell, then you should not load the xserver module in the first place!
I can imagine that this is hard to comprehend. It helps to see the bigger picture. Imagine a system where every single process is associated with a set of permissions that is tailored exactly to what the process needs.
This is impossible in GNU/Linux, right? There is just too much code. How can we target each and every process imaginable? We can't.
The purpose of reference policy is to be a usable base. That means that refpolicy cannot afford to make too many assumptions.
Now lets look at the xserver_role() interface. You are basically suggesting that we allow whoever calls this interface to read/write dri devices. This is a bad idea because: 1. It limits to use of this interface because you can only call it when the calling domain needs to be able to read/write dri devices (unless you dont care about least privilege). 2. Whatever calls this interface runs in a domain of its own. So ideally this permissions should be associated with that domain instead in the module where the domain is declared.
So ideally this shouldn't be needed, but we don't live in an ideal world, and so reference policy is willing to compromise.
To keep you happy who ever calls this interface can conditionally be allowed to read/write dri. So that you don't have to enforce least privilege. It is made conditionally so that the audience that does want to enforce least privilege is not forced into an impossible situation.
Is it ideal? No its not. Is refpolicy in a tough spot? For sure.
One might still not understand what i am trying to explain above. I don't blame one because it is pretty confusing. It is actually so confusing and so complex that even the best fall into this trap occasionally.
Also you can say well its not a threat, but you don't know everyone's threat model. One should try not to assume. One doesn't have to. Live is so much easier if you can afford sticking to least privilege consistently, because at least then you have some stability. A process needs something or it doesn't. There is no grey areas there.
Okay thats just my rant, and as always. My opinions are my own.
Quoted 58 lines · Dominick Grift
Quoted 55 lines · Guido Trentalancia
Quoted 33 lines · Chris PeBenito
Quoted 31 lines · Guido Trentalancia
Quoted 25 lines
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)--- refpolicy-git-06082016-orig/policy/modules/services/xserver.if
2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')Quoted 1 line
#######################################
I'm fine with this change, but I think it should be conditional. Then
people that don't want users to have direct access to hardware, likeQuoted 4 lines
Quoted 1 line
this, can disable it.
What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security
risk.
Quoted 2 lines
So, why increasing the complexity for little or no gain ?
https://en.wikipedia.org/wiki/Principle_of_least_privilege
The login shell does not need to read/write dri devices.
Quoted 9 lines
Regards,
Guido
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 11 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 648 bytes Desc: OpenPGP digital signature Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20160823/202cae8a/attachment.bin
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Quoted 55 lines · Dominick Grift
Quoted 3 lines · Guido Trentalancia
If you are only using the shell, then you should not load the xserver module in the first place!?
I can imagine that this is hard to comprehend. It helps to see the bigger picture. Imagine a system where every single process is associated with a set of permissions that is tailored exactly to what the process needs.
This is impossible in GNU/Linux, right? There is just too much code. How
can we target each and every process imaginable? We can't.The purpose of reference policy is to be a usable base. That means that
refpolicy cannot afford to make too many assumptions.Now lets look at the
xserver_role()interface. You are basically suggesting that we allow whoever calls this interface to read/write dri
devices. This is a bad idea because: 1. It limits to use of this interface because you can only call it when the calling domain needs to
be able to read/write dri devices (unless you dont care about least privilege). 2. Whatever calls this interface runs in a domain of its own. So ideally this permissions should be associated with that domain
instead in the module where the domain is declared.So ideally this shouldn't be needed, but we don't live in an ideal world, and so reference policy is willing to compromise.
To keep you happy who ever calls this interface can conditionally be allowed to read/write dri. So that you don't have to enforce least privilege. It is made conditionally so that the audience that does want
to enforce least privilege is not forced into an impossible situation.Is it ideal? No its not. Is refpolicy in a tough spot? For sure.
One might still not understand what i am trying to explain above. I don't blame one because it is pretty confusing. It is actually so confusing and so complex that even the best fall into this trap occasionally.
Also you can say well its not a threat, but you don't know everyone's threat model. One should try not to assume. One doesn't have to. Live is
so much easier if you can afford sticking to least privilege consistently, because at least then you have some stability. A process
needs something or it doesn't. There is no grey areas??there.
Quoted 63 lines
Okay thats just my rant, and as always. My opinions are my own.
Quoted 61 lines
Quoted 57 lines · Dominick Grift
Quoted 42 lines · Guido Trentalancia
Quoted 40 lines · Chris PeBenito
Quoted 29 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration,
for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>---
?policy/modules/services/xserver.if |????2 ++
?1 file changed, 2 insertions(+)--- refpolicy-git-06082016-
orig/policy/modules/services/xserver.if2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git- 06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200(quoted diff) +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` ? relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) ? relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ?')Quoted 1 line
?#######################################
I'm fine with this change, but I think it should be conditional.??Then?
people that don't want users to have direct access to hardware, likeQuoted 5 lines
Quoted 1 line
this, can disable it.
What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security
risk.
Quoted 3 lines
So, why increasing the complexity for little or no gain ?
https://en.wikipedia.org/wiki/Principle_of_least_privilege
The login shell does not need to read/write dri devices.
This patch can be dropped because it is not strictly needed to run the X server.
--
Guido
PATCH 1/1 xserver: add r/w permissions for the DRI devices
In reply to Guido TrentalanciaQuoted 34 lines · Guido Trentalancia
Quoted 26 lines · Chris PeBenito
Quoted 25 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration, for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)--- refpolicy-git-06082016-orig/policy/modules/services/xserver.if
2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')Quoted 6 lines
Quoted 1 line
#######################################
I'm fine with this change, but I think it should be conditional. Then
people that don't want users to have direct access to hardware, like this, can disable it.
Quoted 4 lines
What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security risk.
So, why increasing the complexity for little or no gain ?
In this case, it has little to do with the X server. $2 is a user domain, so you're saying any app the user can run (in the user's domain) can rw the DRI device.
Signature · 1 line
Chris PeBenito
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Hello Christopher.
Quoted 45 lines · Chris PeBenito
Quoted 44 lines · Guido Trentalancia
Quoted 30 lines · Chris PeBenito
Quoted 28 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration,
for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>---
?policy/modules/services/xserver.if |????2 ++
?1 file changed, 2 insertions(+)--- refpolicy-git-06082016-
orig/policy/modules/services/xserver.if2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200(quoted diff) +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` ? relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) ? relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ?')Quoted 7 lines
Quoted 1 line
?#######################################
I'm fine with this change, but I think it should be conditional.??Then
people that don't want users to have direct access to hardware, like
this, can disable it.What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security risk.
Quoted 6 lines
Quoted 1 line
So, why increasing the complexity for little or no gain ?
In this case, it has little to do with the X server.??$2 is a user? domain, so you're saying any app the user can run (in the user's domain)?
can rw the DRI device.
That is badly wrong.
I understand the issue now !
Perhaps, we can target the application that generated such permission request (from Gnome), confine it in its own domain and then grant the permission only for that domain...
--
Guido
PATCH 1/1 xserver: add r/w permissions for the DRI devices
Quoted 55 lines · Guido Trentalancia via refpolicy
Hello Christopher.
Quoted 45 lines · Chris PeBenito
Quoted 44 lines · Guido Trentalancia
Quoted 30 lines · Chris PeBenito
Quoted 28 lines · Guido Trentalancia
Modify the xserver role, so that the Direct Rendering Infrastructure
devices can be opened read/write (used for graphic acceleration,
for example, by Mesa/libGL).Signed-off-by Guido Trentalancia <[email protected]>--- policy/modules/services/xserver.if | 2 ++ 1 file changed, 2 insertions(+)--- refpolicy-git-06082016-
orig/policy/modules/services/xserver.if2016-08-06 21:26:43.295774282 +0200 +++ refpolicy-git-06082016/policy/modules/services/xserver.if 2016-08-19 15:52:41.712830041 +0200policy/modules/services/xserver.if +2
-0@@ -163,6 +163,8 @@ interface(`xserver_role',` relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t) relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t) + # for the accelerated graphic drivers + dev_rw_dri($2) ')Quoted 7 lines
Quoted 1 line
#######################################
I'm fine with this change, but I think it should be conditional. Then
people that don't want users to have direct access to hardware, like
this, can disable it.What's the point ? DRI can already be disabled in the X server configuration file easily and using it should not pose a security risk.
Quoted 6 lines
Quoted 1 line
So, why increasing the complexity for little or no gain ?
In this case, it has little to do with the X server. $2 is a user domain, so you're saying any app the user can run (in the user's domain)
can rw the DRI device.
Quoted 8 lines
That is badly wrong.
I understand the issue now !
Perhaps, we can target the application that generated such permission request (from Gnome), confine it in its own domain and then grant the permission only for that domain...
My personal DSSP policy does exactly that. It enforces LP consistently by design. Anything that is not targeted is at risk of being dis-functional. simply because the login shell domain has relatively little permissions, and so only common core utilities will be functional in that domain.
The idea is that pretty much every process that is used has to be targeted. You can imagine how big the policy would get over time.
Therefore with DSSP, profiling is very important. Only policy that is used should be installed/loaded, and only code that is used should be installed/run.
This is, in my view, the only way to provide a base that works for everyone. Because it is easier to add some new permissions than to remove existing ones.
Ofcourse this approach will not work for everyone, but this approach is what defines DSSP's security model.
It makes things simpler.
Quoted 7 lines
--
Guido
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 11 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 648 bytes Desc: OpenPGP digital signature Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20160824/1bd3ecab/attachment.bin