Security policy reworks for SE-PostgreSQL
RFC 1/1 Security policy reworks for SE-PostgreSQL
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
* db_catalog class
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under the db_database directly.
It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
* db_schema class
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).
It defines the following four permissions and inherited ones:
{ search add_object remove_object associate } Their meanings are similar to ones in db_catalog class except for the schema to be replaced by database objects.
Its security context can be computed with TYPE_TRANSITION between the client as a subject and the database (or catalog, if availabel) as a target.
* db_sequence class
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.
It inherits common database and defines the following two permissions:
{ get_value set_value } Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the get_value permission.
Its security context can be computed with TYPE_TRANSITION between the client as a subject and the schema as a target.
Change definition of object classes
-----------------------------------
* db_database class
The db_database:{get_param set_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.
* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_t types
-------------------------
* Currently, sepgsql_proc_t is assigned to the procedures created by unprivileged and unprefixed clients, like httpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.
My preference is the user_sepgsql_xxxx_t is also assigned to procedures created by unprivileged and unprfixed client.
A schema for temporary obejcts
------------------------------
* The sepgsql_schema_t is the default type for schema objects, and rest of database objects within the schema is labeled with the chain of TYPE_TRANSITION rules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from the sepgsql_enable_users_ddl.
Booelean behavior: sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. But db_schema object class enables to control user's DDLs in the schema level checks mainly, so now sepgsql_enable_user_ddl focuses on db_schema class permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples with sepgsql_sysobj_t but not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls only user_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.
db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:
SELECT 1 FROM t WHERE k = "$1" FOR SHARE;
The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided via type_transition on the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allows postgresql_t domain to write out messages to system audit.
* sepgsql_proc_t is aliased to sepgsql_proc_exec_t.
* db_procedure:{install} is revoked from sepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most of postgresql_role() are shared with postgresql_unpriv_client(), except for "role $1 types sepgsql_trusted_proc_t;"
* /etc/selinux/$POLICYTYPE/contexts/db_contexts for selabel_lookup(3)
Thanks,
Signature · 9 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> -------------- next part -------------- A non-text attachment was scrubbed... Name: refpolicy-sepgsql-rework.2.patch Type: text/x-patch Size: 24841 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090331/9d0579be/attachment-0001.bin
looks good to me.
One minor comment. For the superuser permission, this may be common use of DBMS's but I believe is not a standard SQL feature. RUBIX has no such concept, so we would generally ignore that permission. Also, it is unclear to me what abilities the superuser should have (in the general sense, not necessarily within sepostgresql). Is this just a permission to override SQL DAC, or does it also give administrative abilities like setting audit configurations, or "all the above." I think you said before that it would not allow MAC override, correct?
RUBIX currently has four privileged "roles":
Database Administrator: DAC override
Security Administrator: MAC override, to some degree. With SELinux much of this can be done with discrete rules.
Audit Administrator: administer audit trail and criteria Database Operator: do the normal day-today administrative DBMS tasks, like backup.
I am curious, if the intended use of the db_database superuser permission would be an encapsulation of our all of our roles, excluding the Security Administrator.
As a side note, without knowing too much about the intent of the superuser permission, I would think the categories of "roles" RUBIX uses would be general enough for just about any database. Thus, providing equivalent permissions might be useful (excluding the Security Administrator, which I am guessing the community would say is not needed because MAC override mechanisms exist within SELinux already) .
Quoted 148 lines · KaiGai Kohei
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
*db_catalogclass
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under thedb_databasedirectly.It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
*
db_schemaclass
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Their meanings are similar to ones in
db_catalogclass except for the schema to be replaced by database objects.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the database (or catalog, if availabel) as a target.*
db_sequenceclass
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.It inherits common database and defines the following two permissions:
{ get_value set_value }Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the
get_valuepermission.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the schema as a target.Change definition of object classes
-----------------------------------
*db_databaseclass
The db_database:{get_paramset_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_ttypes
-------------------------
* Currently,sepgsql_proc_tis assigned to the procedures created by unprivileged and unprefixed clients, likehttpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.My preference is the
user_sepgsql_xxxx_tis also assigned to procedures created by unprivileged and unprfixed client.A schema for temporary obejcts
------------------------------
* Thesepgsql_schema_tis the default type for schema objects, and rest of database objects within the schema is labeled with the chain ofTYPE_TRANSITIONrules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from thesepgsql_enable_users_ddl.Booelean behavior:
sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. Butdb_schemaobject class enables to control user's DDLs in the schema level checks mainly, so nowsepgsql_enable_user_ddlfocuses ondb_schemaclass permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples withsepgsql_sysobj_tbut not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls onlyuser_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:SELECT 1 FROM t WHERE k = "$1" FOR SHARE;The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided viatype_transitionon the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allowspostgresql_tdomain to write out messages to system audit.
*sepgsql_proc_tis aliased tosepgsql_proc_exec_t.
* db_procedure:{install} is revoked fromsepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most ofpostgresql_role()are shared withpostgresql_unpriv_client(), except for "role $1 typessepgsql_trusted_proc_t;"
*/etc/selinux/$POLICYTYPE/contexts/db_contextsforselabel_lookup(3)
Quoted 2 lines
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20090331/8207c5eb/attachment.html
Quoted 7 lines · Andy Warner
looks good to me.
One minor comment. For the superuser permission, this may be common use of DBMS's but I believe is not a standard SQL feature. RUBIX has no such concept, so we would generally ignore that permission. Also, it is unclear to me what abilities the superuser should have (in the general sense, not necessarily within sepostgresql).
It is a request from the pgsql-hackers.
In addition, the permission is well symmetrical with root capability on operating system.
In PostgreSQL, database users with superuser privilege are allowed various kind of operating, such as ignoring DAC policy, ignoring ownership of database objects, installing shared libraries and so on. The db_database:{superuser} enables to control these capabilities.
Quoted 4 lines
Is this just a permission
to override SQL DAC, or does it also give administrative abilities like setting audit configurations, or "all the above." I think you said before that it would not allow MAC override, correct?
SELinux does not allow anyone to override MAC.
The unconfined domain is allowed anything in the result of access controls.
Quoted 11 lines
RUBIX currently has four privileged "roles":
Database Administrator: DAC override
Security Administrator: MAC override, to some degree. With SELinux much of this can be done with discrete rules.
Audit Administrator: administer audit trail and criteria Database Operator: do the normal day-today administrative DBMS tasks, like backup.I am curious, if the intended use of the
db_databasesuperuser permission would be an encapsulation of our all of our roles, excluding the Security Administrator.
My preference is to adopt common design *as far as possible*. If you need finer-grained privileges, please propose it as a characteristic part for Trusted RUBIX, as if we did on db_catalog class. Anyway, I cannot believe the pgsql-hackers accepts its design changes due to the RUBIX's design.
Thanks,
Signature · 1 line
KaiGai Kohei <[email protected]>
Quoted 11 lines · KaiGai Kohei
Quoted 8 lines · Andy Warner
looks good to me.
One minor comment. For the superuser permission, this may be common use of DBMS's but I believe is not a standard SQL feature. RUBIX has no such concept, so we would generally ignore that permission. Also, it is unclear to me what abilities the superuser should have (in the general sense, not necessarily within sepostgresql).
Quoted 10 lines
It is a request from the pgsql-hackers.
In addition, the permission is well symmetrical with root capability on operating system.
In PostgreSQL, database users with superuser privilege are allowed various kind of operating, such as ignoring DAC policy, ignoring ownership of database objects, installing shared libraries and so on. The db_database:{superuser} enables to control these capabilities.
Sounds like our DBA role. Basically, its just a different name. I agree that the superuser is a common concept in OS's, but note that its use is often discouraged. I'm note sure introducing it for databases is a great idea. But, as I said before, we would just ignore it as primarily its there to satisfy postgresql.
Quoted 9 lines
Quoted 5 lines
Is this just a permission
to override SQL DAC, or does it also give administrative abilities like setting audit configurations, or "all the above." I think you said before that it would not allow MAC override, correct?SELinux does not allow anyone to override MAC.
The unconfined domain is allowed anything in the result of access controls.
I am referring to things like:
mlsconstrain { db_tuple } { use select }
(( l1 dom l2 ) or
(( t1 == mlsdbreadtoclr ) and ( h1 dom l2 )) or
( t1 == mlsdbread ) or
( t2 == mlstrustedobject ));
where t1 == mlsdbread seems to imply an object is trusted to read strictly dominating objects. Unless I am missing the meaning here, I would call this a MAC override. I realize there is no concept of a TE override, but MLS is part of MAC, no? And, this violates B&L rules. This is something we would control with a Security Administrator "role". Or, is this mlsdbread something that is impossible to give to a domain in a DBMS policy?
Quoted 14 lines
Quoted 9 lines
RUBIX currently has four privileged "roles":
Database Administrator: DAC override
Security Administrator: MAC override, to some degree. With SELinux much of this can be done with discrete rules.
Audit Administrator: administer audit trail and criteria Database Operator: do the normal day-today administrative DBMS tasks, like backup.Quoted 4 lines
I am curious, if the intended use of the
db_databasesuperuser permission would be an encapsulation of our all of our roles, excluding the Security Administrator.
Quoted 8 lines
My preference is to adopt common design *as far as possible*. If you need finer-grained privileges, please propose it as a characteristic part for Trusted RUBIX, as if we did on
db_catalogclass. Anyway, I cannot believe the pgsql-hackers accepts its design changes due to the RUBIX's design.Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20090331/25855cfc/attachment.html
Quoted 7 lines
I am referring to things like:
mlsconstrain {
db_tuple} { use select }(( l1 dom l2 ) or (( t1 == mlsdbreadtoclr ) and ( h1 dom l2 )) or ( t1 == mlsdbread ) or ( t2 == mlstrustedobject ));
I noticed the db_xxx:{use} permission remained here. :-)
Quoted 7 lines
where t1 == mlsdbread seems to imply an object is trusted to read strictly dominating objects. Unless I am missing the meaning here, I would call this a MAC override. I realize there is no concept of a TE override, but MLS is part of MAC, no? And, this violates B&L rules. This is something we would control with a Security Administrator "role". Or, is this mlsdbread something that is impossible to give to a domain in a DBMS policy?
It is different from my usage of terms.
Some of domains are allowed to access the tuple, and others are disallowed as the result of access controls using the security policy.
I understood the term of "MAC override" to express what actions are allowed without any checks based on security policy, as if root stuff can ignore DAC checks.
Thanks,
Signature · 1 line
KaiGai Kohei <[email protected]>
Quoted 11 lines · KaiGai Kohei
Quoted 8 lines
I am referring to things like:
mlsconstrain {
db_tuple} { use select }(( l1 dom l2 ) or (( t1 == mlsdbreadtoclr ) and ( h1 dom l2 )) or ( t1 == mlsdbread ) or ( t2 == mlstrustedobject ));I noticed the db_xxx:{use} permission remained here. :-)
The example I used above is from an older version of the reference policy.
Quoted 10 lines
Quoted 9 lines
where t1 == mlsdbread seems to imply an object is trusted to read strictly dominating objects. Unless I am missing the meaning here, I would call this a MAC override. I realize there is no concept of a TE override, but MLS is part of MAC, no? And, this violates B&L rules. This is something we would control with a Security Administrator "role". Or, is this mlsdbread something that is impossible to give to a domain in a DBMS policy?
Quoted 9 lines
It is different from my usage of terms.
Some of domains are allowed to access the tuple, and others are disallowed as the result of access controls using the security policy.I understood the term of "MAC override" to express what actions are allowed without any checks based on security policy, as if root stuff can ignore DAC checks.
Ya, definitions, definitions :-) Coming from an MLS world, MAC override meant superseding the B&L policy. In a general sense we use special authorizations for that (our Security Admin role), while SELinux has a built in mechanism (mlsdbread)
Quoted 2 lines
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20090331/1bdb4cb0/attachment.html
Quoted 30 lines · Andy Warner
Quoted 11 lines · KaiGai Kohei
Quoted 8 lines
I am referring to things like:
mlsconstrain {
db_tuple} { use select }(( l1 dom l2 ) or (( t1 == mlsdbreadtoclr ) and ( h1 dom l2 )) or ( t1 == mlsdbread ) or ( t2 == mlstrustedobject ));I noticed the db_xxx:{use} permission remained here. :-)
The example I used above is from an older version of the reference policy.
Quoted 15 lines
Quoted 9 lines
where t1 == mlsdbread seems to imply an object is trusted to read strictly dominating objects. Unless I am missing the meaning here, I would call this a MAC override. I realize there is no concept of a TE override, but MLS is part of MAC, no? And, this violates B&L rules. This is something we would control with a Security Administrator "role". Or, is this mlsdbread something that is impossible to give to a domain in a DBMS policy?
It is different from my usage of terms.
Some of domains are allowed to access the tuple, and others are disallowed as the result of access controls using the security policy.
Quoted 8 lines
Quoted 4 lines
I understood the term of "MAC override" to express what actions are allowed without any checks based on security policy, as if root stuff can ignore DAC checks.
Ya, definitions, definitions :-) Coming from an MLS world, MAC override meant superseding the B&L policy. In a general sense we use special authorizations for that (our Security Admin role), while SELinux has a built in mechanism (mlsdbread)
SELinux doesn't have a built in mechanism, mlsdbread is an attribute that you give to domains that can violate this particular MLS constraint. Rather than having a generic MAC_OVERRIDE like other MLS implementations we went with finer grained overrides, you can see them all in kernel/mls.te.
there are also interfaces in mls.if to do the various overrides (rather than adding the attribute yourself), for example if you wanted foo_t to be able to read files of all levels you could call:
mls_file_read_all_levels(foo_t)
http://oss.tresys.com/docs/refpolicy/api/kernel_mls.html
--
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.
Quoted 39 lines · Joshua Brindle
Quoted 37 lines · Andy Warner
Quoted 12 lines · KaiGai Kohei
Quoted 9 lines
I am referring to things like:
mlsconstrain {
db_tuple} { use select }(( l1 dom l2 ) or (( t1 == mlsdbreadtoclr ) and ( h1 dom l2 )) or ( t1 == mlsdbread ) or ( t2 == mlstrustedobject ));I noticed the db_xxx:{use} permission remained here. :-)
The example I used above is from an older version of the reference policy.
Quoted 21 lines
Quoted 11 lines
where t1 == mlsdbread seems to imply an object is trusted to read strictly dominating objects. Unless I am missing the meaning here, I would call this a MAC override. I realize there is no concept of a TE override, but MLS is part of MAC, no? And, this violates B&L rules. This is something we would control with a Security Administrator "role". Or, is this mlsdbread something that is impossible to give to a domain in a DBMS policy?
It is different from my usage of terms.
Some of domains are allowed to access the tuple, and others are disallowed as the result of access controls using the security policy.I understood the term of "MAC override" to express what actions are allowed without any checks based on security policy, as if root stuff can ignore DAC checks.
Quoted 7 lines
Quoted 5 lines
Ya, definitions, definitions :-) Coming from an MLS world, MAC override meant superseding the B&L policy. In a general sense we use special authorizations for that (our Security Admin role), while SELinux has a built in mechanism (mlsdbread)
SELinux doesn't have a built in mechanism,
By built in mechanism I meant exactly what you describe below. Maybe it wasn't the best choice of words. The SELinux policy (the MLS policy) provides a mechanism for the policy writer to assign the ability to violate B&L information flow. Thus, it would be redundant for the db_database object to have a permissions for something like "read-up", etc. If I were to compare that with the Trusted Solaris type policy mechanism, there was no such mechanism. Our DB would have to perform the dominance check for an operation, then decide ourselves if the user had sufficient authorizations to violate B&L. With the current SELinux MLS policy, all of that is done with one access check. The mac override type privilege you would see in TSol 8, etc would allow a process to perform some operation while ignoring the mac policy. This does not help our DB make a policy decision on a subject as they access a DBMS object.
Quoted 5 lines
mlsdbread is an attribute that you
give to domains that can violate this particular MLS constraint. Rather than having a genericMAC_OVERRIDElike other MLS implementations we went with finer grained overrides, you can see them all inkernel/mls.te.
Yep, thats where i got the example above. Our past approach was to disallow any mac override directly and let them change their session level. We would then restrict them to read or read/write depending on their authorizations. The selinux mechanism is better as, by its nature, it may target specific objects, specific subjects, and specific overrides.
Quoted 9 lines
there are also interfaces in mls.if to do the various overrides (rather than adding the attribute yourself), for example if you wanted
foo_tto be able to read files of all levels you could call:
mls_file_read_all_levels(foo_t)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20090331/46c8b960/attachment.html
Chris,
The attached patch also reworks and fixes a few bugs in MLS/MCS policy for SE-PostgreSQL. Could you check it please?
List of updates:
* db_catalog, db_schema, db_sequence classes are newly constrained.
* Removed permissions (db_database:{get_param set_param} and db_xxx:{use}) have gone away.
* bugfix: MCS didn't constrain db_xxx:{getattr} permission.
* bugfix: MCS didn't constrain db_procedure:{ drop getattr setattr relabelfrom } permission.
* bugfix: MLS didn't constrain writer permission in db_procedure class.
Thanks,
Quoted 150 lines · KaiGai Kohei
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
*db_catalogclass
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under thedb_databasedirectly.It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
*
db_schemaclass
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Their meanings are similar to ones in
db_catalogclass except for the schema to be replaced by database objects.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the database (or catalog, if availabel) as a target.*
db_sequenceclass
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.It inherits common database and defines the following two permissions:
{ get_value set_value }Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the
get_valuepermission.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the schema as a target.Change definition of object classes
-----------------------------------
*db_databaseclass
The db_database:{get_paramset_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_ttypes
-------------------------
* Currently,sepgsql_proc_tis assigned to the procedures created by unprivileged and unprefixed clients, likehttpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.My preference is the
user_sepgsql_xxxx_tis also assigned to procedures created by unprivileged and unprfixed client.A schema for temporary obejcts
------------------------------
* Thesepgsql_schema_tis the default type for schema objects, and rest of database objects within the schema is labeled with the chain ofTYPE_TRANSITIONrules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from thesepgsql_enable_users_ddl.Booelean behavior:
sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. Butdb_schemaobject class enables to control user's DDLs in the schema level checks mainly, so nowsepgsql_enable_user_ddlfocuses ondb_schemaclass permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples withsepgsql_sysobj_tbut not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls onlyuser_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:SELECT 1 FROM t WHERE k = "$1" FOR SHARE;The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided viatype_transitionon the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allowspostgresql_tdomain to write out messages to system audit.
*sepgsql_proc_tis aliased tosepgsql_proc_exec_t.
* db_procedure:{install} is revoked fromsepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most ofpostgresql_role()are shared withpostgresql_unpriv_client(), except for "role $1 typessepgsql_trusted_proc_t;"
*/etc/selinux/$POLICYTYPE/contexts/db_contextsforselabel_lookup(3)Thanks,
Signature · 9 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> -------------- next part -------------- A non-text attachment was scrubbed... Name: refpolicy-sepgsql-mls-fixes.patch Type: text/x-patch Size: 7575 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090401/c475e053/attachment-0001.bin
Quoted 6 lines · Andy Warner
Quoted 2 lines · Joshua Brindle
SELinux doesn't have a built in mechanism,
Quoted 13 lines
By built in mechanism I meant exactly what you describe below. Maybe it wasn't the best choice of words. The SELinux policy (the MLS policy) provides a mechanism for the policy writer to assign the ability to violate B&L information flow. Thus, it would be redundant for the
db_databaseobject to have a permissions for something like "read-up", etc. If I were to compare that with the Trusted Solaris type policy mechanism, there was no such mechanism. Our DB would have to perform the dominance check for an operation, then decide ourselves if the user had sufficient authorizations to violate B&L. With the current SELinux MLS policy, all of that is done with one access check. The mac override type privilege you would see in TSol 8, etc would allow a process to perform some operation while ignoring the mac policy. This does not help our DB make a policy decision on a subject as they access a DBMS object.
This is absolutely correct, we want to use policy to specify mls exceptions rather than having the policy spread through several object managers, this makes it possible to do an analysis on the policy and actually see the information flow through all object managers.
--
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.
Chris,
What is your opinion about this reworks?
If its scale is too large to commit at once, I can separate it into several pieces.
Thanks,
Quoted 157 lines · KaiGai Kohei
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
*db_catalogclass
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under thedb_databasedirectly.It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
*
db_schemaclass
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Their meanings are similar to ones in
db_catalogclass except for the schema to be replaced by database objects.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the database (or catalog, if availabel) as a target.*
db_sequenceclass
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.It inherits common database and defines the following two permissions:
{ get_value set_value }Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the
get_valuepermission.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the schema as a target.Change definition of object classes
-----------------------------------
*db_databaseclass
The db_database:{get_paramset_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_ttypes
-------------------------
* Currently,sepgsql_proc_tis assigned to the procedures created by unprivileged and unprefixed clients, likehttpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.My preference is the
user_sepgsql_xxxx_tis also assigned to procedures created by unprivileged and unprfixed client.A schema for temporary obejcts
------------------------------
* Thesepgsql_schema_tis the default type for schema objects, and rest of database objects within the schema is labeled with the chain ofTYPE_TRANSITIONrules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from thesepgsql_enable_users_ddl.Booelean behavior:
sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. Butdb_schemaobject class enables to control user's DDLs in the schema level checks mainly, so nowsepgsql_enable_user_ddlfocuses ondb_schemaclass permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples withsepgsql_sysobj_tbut not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls onlyuser_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:SELECT 1 FROM t WHERE k = "$1" FOR SHARE;The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided viatype_transitionon the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allowspostgresql_tdomain to write out messages to system audit.
*sepgsql_proc_tis aliased tosepgsql_proc_exec_t.
* db_procedure:{install} is revoked fromsepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most ofpostgresql_role()are shared withpostgresql_unpriv_client(), except for "role $1 typessepgsql_trusted_proc_t;"
*/etc/selinux/$POLICYTYPE/contexts/db_contextsforselabel_lookup(3)Thanks,
------------------------------------------------------------------------
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 2 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]>
Quoted 6 lines · KaiGai Kohei
Chris,
What is your opinion about this reworks?
If its scale is too large to commit at once, I can separate it into several pieces.
I don't think it is a good idea to merge the object class changes at this point. The object classes and permissions are likely to change with sepostgresql going forward, as that community determines what they like and don't like access-control wise.
Additionally there is another object manager (RUBIX) that is now going to be reliant on these object classes so it would be nice for them to work out some of their implementation just to be sure these are sufficient and finally merging these object class changes is going to break the sepostgres that is in fedora right now.
I'm not sure how you plan to reconcile the sepostgres in Fedora vs. the work with upstream postgresql with the policies available in Fedora (and upstream refpolicy) but I don't think we can just start breaking things now, upstream refpolicy shouldn't be treated as a playground.
Quoted 162 lines
Thanks,
Quoted 157 lines · KaiGai Kohei
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
*db_catalogclass
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under thedb_databasedirectly.It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
*
db_schemaclass
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Their meanings are similar to ones in
db_catalogclass except for the schema to be replaced by database objects.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the database (or catalog, if availabel) as a target.*
db_sequenceclass
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.It inherits common database and defines the following two permissions:
{ get_value set_value }Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the
get_valuepermission.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the schema as a target.Change definition of object classes
-----------------------------------
*db_databaseclass
The db_database:{get_paramset_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_ttypes
-------------------------
* Currently,sepgsql_proc_tis assigned to the procedures created by unprivileged and unprefixed clients, likehttpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.My preference is the
user_sepgsql_xxxx_tis also assigned to procedures created by unprivileged and unprfixed client.A schema for temporary obejcts
------------------------------
* Thesepgsql_schema_tis the default type for schema objects, and rest of database objects within the schema is labeled with the chain ofTYPE_TRANSITIONrules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from thesepgsql_enable_users_ddl.Booelean behavior:
sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. Butdb_schemaobject class enables to control user's DDLs in the schema level checks mainly, so nowsepgsql_enable_user_ddlfocuses ondb_schemaclass permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples withsepgsql_sysobj_tbut not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls onlyuser_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:SELECT 1 FROM t WHERE k = "$1" FOR SHARE;The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided viatype_transitionon the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allowspostgresql_tdomain to write out messages to system audit.
*sepgsql_proc_tis aliased tosepgsql_proc_exec_t.
* db_procedure:{install} is revoked fromsepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most ofpostgresql_role()are shared withpostgresql_unpriv_client(), except for "role $1 typessepgsql_trusted_proc_t;"
*/etc/selinux/$POLICYTYPE/contexts/db_contextsforselabel_lookup(3)Thanks,
------------------------------------------------------------------------
_______________________________________________
refpolicy mailing list
[email protected]
http://oss.tresys.com/mailman/listinfo/refpolicy
--
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.
Quoted 13 lines · Joshua Brindle
Quoted 6 lines · KaiGai Kohei
Chris,
What is your opinion about this reworks?
If its scale is too large to commit at once, I can separate it into several pieces.I don't think it is a good idea to merge the object class changes at this point. The object classes and permissions are likely to change with sepostgresql going forward, as that community determines what they like and don't like access-control wise.
Quoted 5 lines
Additionally there is another object manager (RUBIX) that is now going to be reliant on these object classes so it would be nice for them to work out some of their implementation just to be sure these are sufficient and finally merging these object class changes is going to break the sepostgres that is in fedora right now.
Agreed. I don't want to merge any object class changes until they have settled down. I'd prefer that the patches to the object manager be on a path for upstream acceptance in both databases, if not already committed to their trees, before moving forward on the object class changes in the policy.
Quoted 4 lines
I'm not sure how you plan to reconcile the sepostgres in Fedora vs. the work with upstream postgresql with the policies available in Fedora (and upstream refpolicy) but I don't think we can just start breaking things now, upstream refpolicy shouldn't be treated as a playground.
Permissions shouldn't be deleted, as it causes compatibility issues. The permissions that are deprecated should be marked as such in access_vectors, so that at some point in the future we can reclaim them, if needed.
Quoted 161 lines
Quoted 160 lines
Quoted 157 lines · KaiGai Kohei
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
*db_catalogclass
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under thedb_databasedirectly.It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
*
db_schemaclass
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Their meanings are similar to ones in
db_catalogclass except for the schema to be replaced by database objects.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the database (or catalog, if availabel) as a target.*
db_sequenceclass
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.It inherits common database and defines the following two permissions:
{ get_value set_value }Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the
get_valuepermission.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the schema as a target.Change definition of object classes
-----------------------------------
*db_databaseclass
The db_database:{get_paramset_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_ttypes
-------------------------
* Currently,sepgsql_proc_tis assigned to the procedures created by unprivileged and unprefixed clients, likehttpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.My preference is the
user_sepgsql_xxxx_tis also assigned to procedures created by unprivileged and unprfixed client.A schema for temporary obejcts
------------------------------
* Thesepgsql_schema_tis the default type for schema objects, and rest of database objects within the schema is labeled with the chain ofTYPE_TRANSITIONrules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from thesepgsql_enable_users_ddl.Booelean behavior:
sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. Butdb_schemaobject class enables to control user's DDLs in the schema level checks mainly, so nowsepgsql_enable_user_ddlfocuses ondb_schemaclass permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples withsepgsql_sysobj_tbut not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls onlyuser_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:SELECT 1 FROM t WHERE k = "$1" FOR SHARE;The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided viatype_transitionon the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allowspostgresql_tdomain to write out messages to system audit.
*sepgsql_proc_tis aliased tosepgsql_proc_exec_t.
* db_procedure:{install} is revoked fromsepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most ofpostgresql_role()are shared withpostgresql_unpriv_client(), except for "role $1 typessepgsql_trusted_proc_t;"
*/etc/selinux/$POLICYTYPE/contexts/db_contextsforselabel_lookup(3)Thanks,
------------------------------------------------------------------------
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150
Quoted 19 lines · Joshua Brindle
Quoted 6 lines · KaiGai Kohei
Chris,
What is your opinion about this reworks?
If its scale is too large to commit at once, I can separate it into several pieces.I don't think it is a good idea to merge the object class changes at this point. The object classes and permissions are likely to change with sepostgresql going forward, as that community determines what they like and don't like access-control wise.
Additionally there is another object manager (RUBIX) that is now going to be reliant on these object classes so it would be nice for them to work out some of their implementation just to be sure these are sufficient and finally merging these object class changes is going to break the sepostgres that is in fedora right now.
Quoted 4 lines
I'm not sure how you plan to reconcile the sepostgres in Fedora vs. the work with upstream postgresql with the policies available in Fedora (and upstream refpolicy) but I don't think we can just start breaking things now, upstream refpolicy shouldn't be treated as a playground.
It is a deadlock for me... :(
I plan SE-PostgreSQL adopts the new object classes and permissions (and some of enhancements on libselinux) in the upcoming Fedora 11, but I'll also continue to maintain the current design on Fedora 10 or 9 already released.
The upstream PostgreSQL is going to have the next major version up very soon, and it does not undertake the disk format compatibility across the major versions. It means users need to migrate their database files for the new versions.
It is a good chance to switch to the new security design without breaking the current database.
During the efforts to upstream SE-PostgreSQL, I don't think pgsql hackers can modify or replace the security policy, so it needs to continue the proposition on the current design, but it also means we have to change the design at some future point.
I really really would like to get it merged in this timing.
Thanks,
Quoted 164 lines
Quoted 161 lines
Thanks,
Quoted 157 lines · KaiGai Kohei
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
*db_catalogclass
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under thedb_databasedirectly.It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
*
db_schemaclass
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Their meanings are similar to ones in
db_catalogclass except for the schema to be replaced by database objects.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the database (or catalog, if availabel) as a target.*
db_sequenceclass
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.It inherits common database and defines the following two permissions:
{ get_value set_value }Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the
get_valuepermission.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the schema as a target.Change definition of object classes
-----------------------------------
*db_databaseclass
The db_database:{get_paramset_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_ttypes
-------------------------
* Currently,sepgsql_proc_tis assigned to the procedures created by unprivileged and unprefixed clients, likehttpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.My preference is the
user_sepgsql_xxxx_tis also assigned to procedures created by unprivileged and unprfixed client.A schema for temporary obejcts
------------------------------
* Thesepgsql_schema_tis the default type for schema objects, and rest of database objects within the schema is labeled with the chain ofTYPE_TRANSITIONrules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from thesepgsql_enable_users_ddl.Booelean behavior:
sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. Butdb_schemaobject class enables to control user's DDLs in the schema level checks mainly, so nowsepgsql_enable_user_ddlfocuses ondb_schemaclass permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples withsepgsql_sysobj_tbut not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls onlyuser_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:SELECT 1 FROM t WHERE k = "$1" FOR SHARE;The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided viatype_transitionon the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allowspostgresql_tdomain to write out messages to system audit.
*sepgsql_proc_tis aliased tosepgsql_proc_exec_t.
* db_procedure:{install} is revoked fromsepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most ofpostgresql_role()are shared withpostgresql_unpriv_client(), except for "role $1 typessepgsql_trusted_proc_t;"
*/etc/selinux/$POLICYTYPE/contexts/db_contextsforselabel_lookup(3)Thanks,
------------------------------------------------------------------------
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 2 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]>
Quoted 19 lines · Christopher J. PeBenito
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · KaiGai Kohei
Chris,
What is your opinion about this reworks?
If its scale is too large to commit at once, I can separate it into several pieces.I don't think it is a good idea to merge the object class changes at this point. The object classes and permissions are likely to change with sepostgresql going forward, as that community determines what they like and don't like access-control wise.
Quoted 5 lines
Additionally there is another object manager (RUBIX) that is now going to be reliant on these object classes so it would be nice for them to work out some of their implementation just to be sure these are sufficient and finally merging these object class changes is going to break the sepostgres that is in fedora right now.
Quoted 5 lines
Agreed. I don't want to merge any object class changes until they have settled down. I'd prefer that the patches to the object manager be on a path for upstream acceptance in both databases, if not already committed to their trees, before moving forward on the object class changes in the policy.
As I noted in the previous message, it give me a deadlock. :(
I don't think it is a realistic assumption that pgsql-hackers are well motivated to modify or replace the default security policy to review and test the proposed features. I guess it gives us negative effect to upstream the SE-PostgreSQL feature in the v8.5 release.
At least, these new object classes don't have any strange behavior. The vanilla PostgreSQL also has similar permissions, so it convinces me they can accept these permissions, more than nothing for them.
Again, I would like to get the reworks merged in this timing. (In addition, it also makes RUBIX happy on Fedora 11 or later.)
Quoted 9 lines
Quoted 4 lines
I'm not sure how you plan to reconcile the sepostgres in Fedora vs. the work with upstream postgresql with the policies available in Fedora (and upstream refpolicy) but I don't think we can just start breaking things now, upstream refpolicy shouldn't be treated as a playground.
Permissions shouldn't be deleted, as it causes compatibility issues. The permissions that are deprecated should be marked as such in
access_vectors, so that at some point in the future we can reclaim them, if needed.
Something like ... ?
class db_table
inherits database
{
use # deprecated
select
update
:Do you intend it to be handled as a hint for the script to generate the <class>_all_perms?
Thanks,
Quoted 159 lines
Quoted 159 lines
Quoted 159 lines
Quoted 157 lines · KaiGai Kohei
As we have discussed for the recent week, I have a plan to rework some of security policy for SE-PostgreSQL.
The attached patch adds the significan changes, as follows. Could you give me any suggestion, approval or opposition?
New object classes and permissions
----------------------------------
*db_catalogclass
It shows the top level namespace in the database, and has a capability to store a set of schemas. Some of implementation does not support catalogs. In this case, we simply ignore this class and any schemas are placed under thedb_databasedirectly.It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Client should have db_catalog:{search} on the catalog when he refers any schemas under the catalog, and he should also have db_catalog:{add_object} and db_catalog:{remove_object} on the catalog when he tries to add or remove a shema within the catalog. These permissions are an analogy of dir object class.
The db_catalog:{associate}, which I've not introduced yet but noticed its necessity, is also checked when we create or relabel a schema within the catalog, and the schema should have db_catalog:{associate} on the catalog. It is an analogy of filesystem:{associate}. It prevents a schema is labeled unexpectedly.
*
db_schemaclass
It shows the second level namespace in the database, but it may be the top level one in some of implementation (like PostgreSQL). It has a capability to store a set of database objects (tables, procedures and so on).It defines the following four permissions and inherited ones:
{ search add_object remove_object associate }Their meanings are similar to ones in
db_catalogclass except for the schema to be replaced by database objects.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the database (or catalog, if availabel) as a target.*
db_sequenceclass
It shows the sequential number generator objects. We can also use them as a communication channel between two domains, so it is necessary to apply security policy.It inherits common database and defines the following two permissions:
{ get_value set_value }Client should have db_sequence:{get_value} when he fetch a value from the sequence generator, and db_sequence:{set_value} when he set a discretionary value. When he fetch a value from the sequence object, it implicitly increments internal counter, but it is covered by the
get_valuepermission.Its security context can be computed with
TYPE_TRANSITIONbetween the client as a subject and the schema as a target.Change definition of object classes
-----------------------------------
*db_databaseclass
The db_database:{get_paramset_param} is removed because these two permissions are nonsense.
The db_database:{superuser} is newly added. It is checked when client perform as database superuser. Stephen suggested it can be separated to more finer grained privileges. It makes sense, but this kind of separation which focuses on PostgreSQL makes hard to port the concept for other database management systems.* db_table/db_column/db_tuple:{use} permission
The db_xxx:{use} permission is integrated into db_xxx:{select} permission, because it can hide the risk to infer invisible information easily with well considered WHERE clauses.
user_sepgsql_xxxx_ttypes
-------------------------
* Currently,sepgsql_proc_tis assigned to the procedures created by unprivileged and unprefixed clients, likehttpd_t.
But I would like to handle it as a procedure created or relabeled by database administrator.
Basically, we consider user defined procedures are untrusted, so it should be checked before it becomes available for all the clients. So, we don't allow to install them as system internal entities, and don't allow unconfined domains to execute them directly.My preference is the
user_sepgsql_xxxx_tis also assigned to procedures created by unprivileged and unprfixed client.A schema for temporary obejcts
------------------------------
* Thesepgsql_schema_tis the default type for schema objects, and rest of database objects within the schema is labeled with the chain ofTYPE_TRANSITIONrules.
We have a characteristic scheme named as "pg_temp_*". Any database objects within the schema are cleared after the session closed, so its contents are always session local. We would like to assign special types on the temporary schema and delivered database objects withing the schema. In addition, users can create and use these database objects independently from thesepgsql_enable_users_ddl.Booelean behavior:
sepgsql_enable_users_ddl
-------------------------------------------
* Because the current design does not care about actions on schema objects, we need to assign separated label (sepgsql_sysobj_t) on system informations and apply checks as row-level controls. Butdb_schemaobject class enables to control user's DDLs in the schema level checks mainly, so nowsepgsql_enable_user_ddlfocuses ondb_schemaclass permissions and {create drop setattr} for any other database objects.
The attached patch allows users to modify tuples withsepgsql_sysobj_tbut not allows columns/tables. It means user can define database objects with proper way (like CREATE TABLE), but prevents to manipulate system information by hand.
In addition, this boolean controls onlyuser_sepgsql_xxxx_t. The unprefixed types are always not allowed to modify its definition by unprivileges users.db_table:{lock} for reader actions
----------------------------------
* db_table:{lock} is also necessary for reader side actions due to the implementation reason.
In PostgreSQL, FK constraints are implemented as trigger functions. It is invoked for each INSERT/UPDATE/DELETE on constrainted tuples, and run a secondary query to check whether the action satisfies FK constraints or not.
This query is described as:SELECT 1 FROM t WHERE k = "$1" FOR SHARE;The "FOR SHARE" clause means explicit table lock and requires db_table:{lock} permission. If we don't allow unpriv clients to lock read-only tables, it disables to set up FK constraint which refers read-only tables.
Miscellaneous changes
---------------------
* The security context of a new database is decided viatype_transitionon the server process's context. It enables to avoid conflicts when we have multiple DBMSs in a system.
* It allowspostgresql_tdomain to write out messages to system audit.
*sepgsql_proc_tis aliased tosepgsql_proc_exec_t.
* db_procedure:{install} is revoked fromsepgsql_trusted_proc_exec_t, because we don't need to run trusted procedure implicitly.
* Most ofpostgresql_role()are shared withpostgresql_unpriv_client(), except for "role $1 typessepgsql_trusted_proc_t;"
*/etc/selinux/$POLICYTYPE/contexts/db_contextsforselabel_lookup(3)Thanks,
------------------------------------------------------------------------
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 2 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]>
Quoted 25 lines · KaiGai Kohei
Quoted 18 lines · Christopher J. PeBenito
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · KaiGai Kohei
Chris,
What is your opinion about this reworks?
If its scale is too large to commit at once, I can separate it into several pieces.I don't think it is a good idea to merge the object class changes at this point. The object classes and permissions are likely to change with sepostgresql going forward, as that community determines what they like and don't like access-control wise.
Quoted 5 lines
Additionally there is another object manager (RUBIX) that is now going to be reliant on these object classes so it would be nice for them to work out some of their implementation just to be sure these are sufficient and finally merging these object class changes is going to break the sepostgres that is in fedora right now.
Quoted 5 lines
Agreed. I don't want to merge any object class changes until they have settled down. I'd prefer that the patches to the object manager be on a path for upstream acceptance in both databases, if not already committed to their trees, before moving forward on the object class changes in the policy.
Quoted 7 lines
As I noted in the previous message, it give me a deadlock. :(
I don't think it is a realistic assumption that pgsql-hackers are well motivated to modify or replace the default security policy to review and test the proposed features. I guess it gives us negative effect to upstream the SE-PostgreSQL feature in the v8.5 release.
They will have to do some policy updates to test the functionality no matter what. I don't think it is *that* unreasonable for them to update the base policy (from their perspective it shouldn't be any different anyway)
Quoted 4 lines
At least, these new object classes don't have any strange behavior. The vanilla PostgreSQL also has similar permissions, so it convinces me they can accept these permissions, more than nothing for them.
Except you were removing permissions in the patch, which would break the sepostgres that is in the Fedora tree.
Quoted 3 lines
Again, I would like to get the reworks merged in this timing. (In addition, it also makes RUBIX happy on Fedora 11 or later.)
Fedora 11 is already frozen, new object classes shouldn't be working their way in to that, so we have a release cycle to adjust the permissions to match the implementation, both on the upstream sepostgres side and the RUBIX side before pushing those in to refpolicy.
Once some implementation starts and the security model settles it may be a different story, I just don't think it is appropriate to merge them at this point. (In particular I want to see if the new proposed object classes and perms will really work for RUBIX, and I want to see how much of the patch the upstream postgres project will take for the next release).
As it stands we are going to have 3 selinux aware databases floating around using slightly different object classes and permissions, which is not ideal. Having all those in upstream refpolicy means it is harder to change them and the unused permissions are going to sit there causing confusion (even worse, they'll be unused by 2 of the 3 systems but still in use by the previous version of sepostgres).
--
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.
Quoted 8 lines · Joshua Brindle
Quoted 3 lines
Again, I would like to get the reworks merged in this timing. (In addition, it also makes RUBIX happy on Fedora 11 or later.)
Fedora 11 is already frozen, new object classes shouldn't be working their way in to that, so we have a release cycle to adjust the permissions to match the implementation, both on the upstream sepostgres side and the RUBIX side before pushing those in to refpolicy.
Hmm... It would seem that I need to provide a development purpose security policy package in the meanwhile.
The next development cycle in PostgreSQL will be open soon:
http://wiki.postgresql.org/wiki/CommitFest_2009-First
I'll propose the newer design for the commit fest, but also continue to maintain the current design on Fedora as far as the security policy keeps existing object classes and permissions.
I believe the current design should be switched to the newer one at some point in the future. In my hope, it should be done on Fedora 12.
Quoted 5 lines
Once some implementation starts and the security model settles it may be a different story, I just don't think it is appropriate to merge them at this point. (In particular I want to see if the new proposed object classes and perms will really work for RUBIX, and I want to see how much of the patch the upstream postgres project will take for the next release).
I also would like Andy to report whether the RUBIX with newer design and security policy performs well, or not.
The development purpose security policy which contains newer object classes and permissions will be available soon.
Quoted 2 lines
As it stands we are going to have 3 selinux aware databases floating around using slightly different object classes and permissions, which is not ideal.
Agreed.
Quoted 4 lines
Having all those in upstream refpolicy means it is harder to change them and the unused permissions are going to sit there causing confusion (even worse, they'll be unused by 2 of the 3 systems but still in use by the previous version of sepostgres).
I think the current design should be deprecated in the lifespan of distribution if the upstream refpolicy once gets newer design.
In finally, I believe only 2 of the system can share the design.
Thanks,
Signature · 1 line
KaiGai Kohei <[email protected]>
The attached patch provides some of reworks and bugfuxes except for new object classes and permissions.
- rework: Add a comment of "not currently in use" for deprecated permissions, but its definitions are not removed.
- bugfix: MCS policy did not constrain the following permissions.
db_database:{getattr}
db_table:{getattr lock}
db_column:{getattr}
db_procedure:{drop getattr setattr}
db_blob:{getattr import export}- rework: All the newly created database objects by unprivileged clients are prefixed with "user_", and these are controled via sepgsql_enable_users_ddl.
The current policy allows httpd_t to created a function labeled as sepgsql_proc_t which is also allowed to be installed as a system internal entity (db_procedure:{install}).
It is a potentially risk for trojan horse.
- rework: postgresql_role() shares most part of postgresql_unpriv_client().
- bugfix: some of permissions in db_procedure class are allowed on sepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them on sepgsql_trusted_proc_exec_t. I also aliased sepgsql_proc_t as sepgsql_proc_exec_t to avoid such kind of confusion, as Chris suggested before.
- rework: we should not allow db_procedure:{install} on the sepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.
- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
- bugfix: MLS policy didn't constrain the db_procedure class.
Thanks,
Signature · 9 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> -------------- next part -------------- A non-text attachment was scrubbed... Name: refpolicy-sepgsql-rework.3.patch Type: text/x-patch Size: 14309 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090406/e8464137/attachment.bin
SELinux packages version (svn2950)...
Hi All,
I work on a product that uses Linux Kernel 2.6.21. As such, I am currently using the following SELinux libs and related package versions:
audit 1.5.3 checkpolicy 1.33.1 libselinux 2.0.13 libsemanage 2.0.1 libsepol 2.0.3 libsetrans 0.1.18 policycoreutils 2.0.16
We are considering moving upto Linux Kernel 2.6.27, and as such we would automatically get upgraded to the following package versions:
audit 1.7.2 checkpolicy svn2950 libselinux svn2950 libsemanage svn2950 libsepol svn2950 libsetrans N/A policycoreutils svn2950
** My questions are:
1. Do all the packages of version (svn2950) play nicely together ?
2. What are the major advantages of upgrading to svn2950 ?
3. Are there any disadvantages, or any changes that I should be aware or cencerned about ?
4. Why is the version number so drastically different ? Is this a result of a totally new effort ?
5. Please feel free to share any thoughts / suggestions / advice as far as upgrading to this newer version...
Thanks in advance for all your help.
--
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.
Re: SELinux packages version (svn2950)...
Quoted 38 lines · Hasan Rezaul-CHR010 wrote:
Hi All,
I work on a product that uses Linux Kernel 2.6.21. As such, I am currently using the following SELinux libs and related package versions:
audit 1.5.3 checkpolicy 1.33.1 libselinux 2.0.13 libsemanage 2.0.1 libsepol 2.0.3 libsetrans 0.1.18 policycoreutils 2.0.16We are considering moving upto Linux Kernel 2.6.27, and as such we would automatically get upgraded to the following package versions:
audit 1.7.2 checkpolicy svn2950 libselinux svn2950 libsemanage svn2950 libsepol svn2950 libsetrans N/A policycoreutils svn2950** My questions are:
1. Do all the packages of version (svn2950) play nicely together ?
2. What are the major advantages of upgrading to svn2950 ?
3. Are there any disadvantages, or any changes that I should be aware or cencerned about ?
4. Why is the version number so drastically different ? Is this a result of a totally new effort ?
5. Please feel free to share any thoughts / suggestions / advice as far as upgrading to this newer version...
Quoted 2 lines
Thanks in advance for all your help.
There is no subversion repository anymore, all the subversion repos should be down at this point, where did you find that revision?
The packages are now in git at http://userspace.selinuxproject.org/ and a release was just made at http://userspace.selinuxproject.org/trac/wiki/Releases .
--
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.
RE: SELinux packages version (svn2950)...
We get our Linux OS and filesystem packaged from a third-party company. These are the versions of the SELinux packages included in the bundle. The version number looked a bit strange to me, so I wanted to check with the selinux community...
So are you saying this "svn2950" version doesn't officially exist anymore, and its *NOT* a stable and tested version ?
Thanks,
- Rezaul.
-----Original Message-----
From: Joshua Brindle [mailto:[email protected]]
Sent: Monday, April 06, 2009 2:19 PM
To: Hasan Rezaul-CHR010
Cc: Stephen Smalley; [email protected]
Subject: Re: SELinux packages version (svn2950)...
Quoted 4 lines · Hasan Rezaul-CHR010 wrote:
Hi All,
I work on a product that uses Linux Kernel 2.6.21. As such, I am currently using the following SELinux libs and related package
versions:
Quoted 34 lines
audit 1.5.3 checkpolicy 1.33.1 libselinux 2.0.13 libsemanage 2.0.1 libsepol 2.0.3 libsetrans 0.1.18 policycoreutils 2.0.16We are considering moving upto Linux Kernel 2.6.27, and as such we would automatically get upgraded to the following package versions:
audit 1.7.2 checkpolicy svn2950 libselinux svn2950 libsemanage svn2950 libsepol svn2950 libsetrans N/A policycoreutils svn2950** My questions are:
1. Do all the packages of version (svn2950) play nicely together ?
2. What are the major advantages of upgrading to svn2950 ?
3. Are there any disadvantages, or any changes that I should be aware or cencerned about ?
4. Why is the version number so drastically different ? Is this a result of a totally new effort ?
5. Please feel free to share any thoughts / suggestions / advice as far as upgrading to this newer version...
Quoted 2 lines
Thanks in advance for all your help.
There is no subversion repository anymore, all the subversion repos should be down at this point, where did you find that revision?
The packages are now in git at http://userspace.selinuxproject.org/ and a release was just made at
http://userspace.selinuxproject.org/trac/wiki/Releases .
--
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.
Re: SELinux packages version (svn2950)...
Quoted 8 lines · Hasan Rezaul-CHR010 wrote:
We get our Linux OS and filesystem packaged from a third-party company. These are the versions of the SELinux packages included in the bundle. The version number looked a bit strange to me, so I wanted to check with the selinux community...
So are you saying this "svn2950" version doesn't officially exist anymore, and its *NOT* a stable and tested version ?
svn 2950 was the last revision we had in the subversion tree on sourceforge. We have since moved to git on userspace.selinuxproject.org. There was never a release rolled from that revision in subversion as far as I know. Therefore yes, it does not officially exist, except as the first checkin to our git tree, and was not released as stable.
Quoted 48 lines
Thanks,
- Rezaul.
-----Original Message-----
From: Joshua Brindle [mailto:[email protected]] Sent: Monday, April 06, 2009 2:19 PM
To: Hasan Rezaul-CHR010
Cc: Stephen Smalley; [email protected]
Subject: Re: SELinux packages version (svn2950)...Quoted 3 lines · Hasan Rezaul-CHR010 wrote:
Hi All,
I work on a product that uses Linux Kernel 2.6.21. As such, I am currently using the following SELinux libs and related package
versions:
Quoted 23 lines
audit 1.5.3 checkpolicy 1.33.1 libselinux 2.0.13 libsemanage 2.0.1 libsepol 2.0.3 libsetrans 0.1.18 policycoreutils 2.0.16We are considering moving upto Linux Kernel 2.6.27, and as such we would automatically get upgraded to the following package versions:
audit 1.7.2 checkpolicy svn2950 libselinux svn2950 libsemanage svn2950 libsepol svn2950 libsetrans N/A policycoreutils svn2950** My questions are:
Quoted 8 lines
1. Do all the packages of version (svn2950) play nicely together ?
2. What are the major advantages of upgrading to svn2950 ?
3. Are there any disadvantages, or any changes that I should be aware or cencerned about ?
4. Why is the version number so drastically different ? Is this a result of a totally new effort ?
5. Please feel free to share any thoughts / suggestions / advice as far as upgrading to this newer version...Thanks in advance for all your help.
Quoted 7 lines
There is no subversion repository anymore, all the subversion repos should be down at this point, where did you find that revision?
The packages are now in git at http://userspace.selinuxproject.org/ and a release was just made at
http://userspace.selinuxproject.org/trac/wiki/Releases .
--
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.
RE: SELinux packages version (svn2950)...
In reply to Joshua BrindleThanks so much :-)
So the versions below are the latest and greatest, and officially stable and tested ?
checkpolicy-2.0.19
libselinux-2.0.79
libsemanage-2.0.31
libsepol-2.0.36
policycoreutils-2.0.62
sepolgen-1.0.16
- Rezaul.
-----Original Message-----
From: Hasan Rezaul-CHR010
Sent: Monday, April 06, 2009 2:49 PM
To: 'Joshua Brindle'
Cc: Stephen Smalley; [email protected]; Cheng Heilung-HCHENG1
Subject: RE: SELinux packages version (svn2950)...
We get our Linux OS and filesystem packaged from a third-party company. These are the versions of the SELinux packages included in the bundle. The version number looked a bit strange to me, so I wanted to check with the selinux community...
So are you saying this "svn2950" version doesn't officially exist anymore, and its *NOT* a stable and tested version ?
Thanks,
- Rezaul.
-----Original Message-----
From: Joshua Brindle [mailto:[email protected]]
Sent: Monday, April 06, 2009 2:19 PM
To: Hasan Rezaul-CHR010
Cc: Stephen Smalley; [email protected]
Subject: Re: SELinux packages version (svn2950)...
Quoted 4 lines · Hasan Rezaul-CHR010 wrote:
Hi All,
I work on a product that uses Linux Kernel 2.6.21. As such, I am currently using the following SELinux libs and related package
versions:
Quoted 34 lines
audit 1.5.3 checkpolicy 1.33.1 libselinux 2.0.13 libsemanage 2.0.1 libsepol 2.0.3 libsetrans 0.1.18 policycoreutils 2.0.16We are considering moving upto Linux Kernel 2.6.27, and as such we would automatically get upgraded to the following package versions:
audit 1.7.2 checkpolicy svn2950 libselinux svn2950 libsemanage svn2950 libsepol svn2950 libsetrans N/A policycoreutils svn2950** My questions are:
1. Do all the packages of version (svn2950) play nicely together ?
2. What are the major advantages of upgrading to svn2950 ?
3. Are there any disadvantages, or any changes that I should be aware or cencerned about ?
4. Why is the version number so drastically different ? Is this a result of a totally new effort ?
5. Please feel free to share any thoughts / suggestions / advice as far as upgrading to this newer version...
Quoted 2 lines
Thanks in advance for all your help.
There is no subversion repository anymore, all the subversion repos should be down at this point, where did you find that revision?
The packages are now in git at http://userspace.selinuxproject.org/ and a release was just made at
http://userspace.selinuxproject.org/trac/wiki/Releases .
--
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.
Re: SELinux packages version (svn2950)...
Quoted 9 lines · Hasan Rezaul-CHR010 wrote:
Thanks so much :-)
So the versions below are the latest and greatest, and officially stable and tested ?
checkpolicy-2.0.19 libselinux-2.0.79 libsemanage-2.0.31 libsepol-2.0.36 policycoreutils-2.0.62 sepolgen-1.0.16
- Rezaul.
They are official releases from the upstream project and are the latest and greatest. The testing upstream has unit tests and some integration tests but most of our testing comes from rawhide users after Dan Walsh has pulled the packages in to rawhide (which he has).
Quoted 64 lines
-----Original Message-----
From: Hasan Rezaul-CHR010 Sent: Monday, April 06, 2009 2:49 PM
To: 'Joshua Brindle'
Cc: Stephen Smalley; [email protected]; Cheng Heilung-HCHENG1
Subject: RE: SELinux packages version (svn2950)...We get our Linux OS and filesystem packaged from a third-party company. These are the versions of the SELinux packages included in the bundle. The version number looked a bit strange to me, so I wanted to check with the selinux community...
So are you saying this "svn2950" version doesn't officially exist anymore, and its *NOT* a stable and tested version ?
Thanks,
- Rezaul.
-----Original Message-----
From: Joshua Brindle [mailto:[email protected]]
Sent: Monday, April 06, 2009 2:19 PM
To: Hasan Rezaul-CHR010
Cc: Stephen Smalley; [email protected]
Subject: Re: SELinux packages version (svn2950)...Quoted 3 lines · Hasan Rezaul-CHR010 wrote:
Hi All,
I work on a product that uses Linux Kernel 2.6.21. As such, I am currently using the following SELinux libs and related package
versions:
Quoted 23 lines
audit 1.5.3 checkpolicy 1.33.1 libselinux 2.0.13 libsemanage 2.0.1 libsepol 2.0.3 libsetrans 0.1.18 policycoreutils 2.0.16We are considering moving upto Linux Kernel 2.6.27, and as such we would automatically get upgraded to the following package versions:
audit 1.7.2 checkpolicy svn2950 libselinux svn2950 libsemanage svn2950 libsepol svn2950 libsetrans N/A policycoreutils svn2950** My questions are:
Quoted 8 lines
1. Do all the packages of version (svn2950) play nicely together ?
2. What are the major advantages of upgrading to svn2950 ?
3. Are there any disadvantages, or any changes that I should be aware or cencerned about ?
4. Why is the version number so drastically different ? Is this a result of a totally new effort ?
5. Please feel free to share any thoughts / suggestions / advice as far as upgrading to this newer version...Thanks in advance for all your help.
Quoted 7 lines
There is no subversion repository anymore, all the subversion repos should be down at this point, where did you find that revision?
The packages are now in git at http://userspace.selinuxproject.org/ and a release was just made at
http://userspace.selinuxproject.org/trac/wiki/Releases .
--
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.
Chris,
what is your opinion for the reworks and bugfixes?
Quoted 51 lines · KaiGai Kohei
The attached patch provides some of reworks and bugfuxes except for new object classes and permissions.
- rework: Add a comment of "not currently in use" for deprecated permissions, but its definitions are not removed.
- bugfix: MCS policy did not constrain the following permissions.
db_database:{getattr} db_table:{getattr lock} db_column:{getattr} db_procedure:{drop getattr setattr} db_blob:{getattr import export}- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.
The current policy allowshttpd_tto created a function labeled assepgsql_proc_twhich is also allowed to be installed as a system internal entity (db_procedure:{install}).
It is a potentially risk for trojan horse.- rework:
postgresql_role()shares most part ofpostgresql_unpriv_client().- bugfix: some of permissions in
db_procedureclass are allowed onsepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them onsepgsql_trusted_proc_exec_t. I also aliasedsepgsql_proc_tassepgsql_proc_exec_tto avoid such kind of confusion, as Chris suggested before.- rework: we should not allow db_procedure:{install} on the
sepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
- bugfix: MLS policy didn't constrain the
db_procedureclass.Thanks,
------------------------------------------------------------------------
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 2 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]>
Quoted 5 lines · KaiGai Kohei
The attached patch provides some of reworks and bugfuxes except for new object classes and permissions.
- rework: Add a comment of "not currently in use" for deprecated permissions, but its definitions are not removed.
"deprecated" should be sufficient.
Quoted 6 lines
- bugfix: MCS policy did not constrain the following permissions.
db_database:{getattr} db_table:{getattr lock} db_column:{getattr} db_procedure:{drop getattr setattr} db_blob:{getattr import export}
Looks ok to me.
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.
I don't think we should be mixing user content with other unpriv clients.
Quoted 6 lines
The current policy allows
httpd_tto created a function labeled assepgsql_proc_twhich is also allowed to be installed as a system internal entity (db_procedure:{install}).
It is a potentially risk for trojan horse.- rework:
postgresql_role()shares most part ofpostgresql_unpriv_client().
See above comment.
Quoted 10 lines
- bugfix: some of permissions in
db_procedureclass are allowed onsepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them onsepgsql_trusted_proc_exec_t. I also aliasedsepgsql_proc_tassepgsql_proc_exec_tto avoid such kind of confusion, as Chris suggested before.- rework: we should not allow db_procedure:{install} on the
sepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.
Quoted 8 lines
- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
- bugfix: MLS policy didn't constrain the
db_procedureclass.
Seems ok.
It would be helpful to break up the patch into a set to make it easier to review in the future.
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150
Quoted 8 lines · Christopher J. PeBenito
Quoted 5 lines · KaiGai Kohei
The attached patch provides some of reworks and bugfuxes except for new object classes and permissions.
- rework: Add a comment of "not currently in use" for deprecated permissions, but its definitions are not removed.
"deprecated" should be sufficient.
OK
Quoted 6 lines
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
I would like to discriminate between a procedure declared by unpriv client and by administrative client, because the policy allows the unprefixed "sepgsql_proc_exec_t" to be installed as a system internal component, but it is undesirable to install unpriv-user defined procedures as is.
If the "user_" prefix is unpreferable, how do you think other prefixes something like "anon_", "unpriv_" and so on?
Quoted 26 lines
Quoted 6 lines
The current policy allows
httpd_tto created a function labeled assepgsql_proc_twhich is also allowed to be installed as a system internal entity (db_procedure:{install}).
It is a potentially risk for trojan horse.- rework:
postgresql_role()shares most part ofpostgresql_unpriv_client().See above comment.
Quoted 17 lines
- bugfix: some of permissions in
db_procedureclass are allowed onsepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them onsepgsql_trusted_proc_exec_t. I also aliasedsepgsql_proc_tassepgsql_proc_exec_tto avoid such kind of confusion, as Chris suggested before.- rework: we should not allow db_procedure:{install} on the
sepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
Quoted 6 lines
Quoted 1 line
- bugfix: MLS policy didn't constrain the
db_procedureclass.Seems ok.
It would be helpful to break up the patch into a set to make it easier to review in the future.
OK,
Thanks,
Signature · 2 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]>
Chris, the attached patch is the part you already OK'ed.
- rework: Add a comment of "deprecated" for deprecated permissions.
- bugfix: MCS policy did not constrain the following permissions.
db_database:{getattr}
db_table:{getattr lock}
db_column:{getattr}
db_procedure:{drop getattr setattr}
db_blob:{getattr import export}- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: some of permissions in db_procedure class are allowed on sepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them on sepgsql_trusted_proc_exec_t.
I also aliased sepgsql_proc_t as sepgsql_proc_exec_t to avoid such kind of confusion, as Chris suggested before.
- rework: we should not allow db_procedure:{install} on the sepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
- bugfix: MLS policy didn't constrain the db_procedure class.
I'll send the rest of patches after we determine what prefix is preferable for unprivileged domains.
Thanks,
Quoted 58 lines · Christopher J. PeBenito
Quoted 5 lines · KaiGai Kohei
The attached patch provides some of reworks and bugfuxes except for new object classes and permissions.
- rework: Add a comment of "not currently in use" for deprecated permissions, but its definitions are not removed.
"deprecated" should be sufficient.
Quoted 6 lines
- bugfix: MCS policy did not constrain the following permissions.
db_database:{getattr} db_table:{getattr lock} db_column:{getattr} db_procedure:{drop getattr setattr} db_blob:{getattr import export}Looks ok to me.
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
Quoted 6 lines
The current policy allows
httpd_tto created a function labeled assepgsql_proc_twhich is also allowed to be installed as a system internal entity (db_procedure:{install}).
It is a potentially risk for trojan horse.- rework:
postgresql_role()shares most part ofpostgresql_unpriv_client().See above comment.
Quoted 10 lines
- bugfix: some of permissions in
db_procedureclass are allowed onsepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them onsepgsql_trusted_proc_exec_t. I also aliasedsepgsql_proc_tassepgsql_proc_exec_tto avoid such kind of confusion, as Chris suggested before.- rework: we should not allow db_procedure:{install} on the
sepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.Quoted 8 lines
- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
- bugfix: MLS policy didn't constrain the
db_procedureclass.Seems ok.
It would be helpful to break up the patch into a set to make it easier to review in the future.
Signature · 9 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> -------------- next part -------------- A non-text attachment was scrubbed... Name: refpolicy-sepgsql-bugfixes.4.patch Type: text/x-patch Size: 10216 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090421/88754dc6/attachment-0001.bin
Quoted 13 lines · KaiGai Kohei
Quoted 11 lines · Christopher J. PeBenito
Quoted 7 lines · KaiGai Kohei
The attached patch provides some of reworks and bugfuxes except for new object classes and permissions.
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
Quoted 8 lines
I would like to discriminate between a procedure declared by unpriv client and by administrative client, because the policy allows the unprefixed "
sepgsql_proc_exec_t" to be installed as a system internal component, but it is undesirable to install unpriv-user defined procedures as is.If the "
user_" prefix is unpreferable, how do you think other prefixes something like "anon_", "unpriv_" and so on?
I think we should go with unpriv_ for now.
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150
Quoted 24 lines · KaiGai Kohei
Chris, the attached patch is the part you already OK'ed.
- rework: Add a comment of "deprecated" for deprecated permissions.
- bugfix: MCS policy did not constrain the following permissions.db_database:{getattr} db_table:{getattr lock} db_column:{getattr} db_procedure:{drop getattr setattr} db_blob:{getattr import export}- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: some of permissions indb_procedureclass are allowed onsepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them onsepgsql_trusted_proc_exec_t.
I also aliasedsepgsql_proc_tassepgsql_proc_exec_tto avoid such kind of confusion, as Chris suggested before.
- rework: we should not allow db_procedure:{install} on thesepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
- bugfix: MLS policy didn't constrain thedb_procedureclass.
Quoted 2 lines
I'll send the rest of patches after we determine what prefix is preferable for unprivileged domains.
Merged.
Quoted 61 lines
Quoted 58 lines · Christopher J. PeBenito
Quoted 5 lines · KaiGai Kohei
The attached patch provides some of reworks and bugfuxes except for new object classes and permissions.
- rework: Add a comment of "not currently in use" for deprecated permissions, but its definitions are not removed.
"deprecated" should be sufficient.
Quoted 6 lines
- bugfix: MCS policy did not constrain the following permissions.
db_database:{getattr} db_table:{getattr lock} db_column:{getattr} db_procedure:{drop getattr setattr} db_blob:{getattr import export}Looks ok to me.
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
Quoted 6 lines
The current policy allows
httpd_tto created a function labeled assepgsql_proc_twhich is also allowed to be installed as a system internal entity (db_procedure:{install}).
It is a potentially risk for trojan horse.- rework:
postgresql_role()shares most part ofpostgresql_unpriv_client().See above comment.
Quoted 10 lines
- bugfix: some of permissions in
db_procedureclass are allowed onsepgsql_trusted_proc_t, but it is a domain, not a procedure. It should allow them onsepgsql_trusted_proc_exec_t. I also aliasedsepgsql_proc_tassepgsql_proc_exec_tto avoid such kind of confusion, as Chris suggested before.- rework: we should not allow db_procedure:{install} on the
sepgsql_trusted_proc_exec_t, because of a risk to invoke trusted procedure implicitly.Quoted 8 lines
- rework: db_table:{lock} is moved to reader side, because it makes impossible to refer read-only table with foreign-key constraint. (FK checks internally acquire explicit locks.)
- bugfix: MLS policy dealt db_blob:{export} as writer-side permission, but it is required whrn the largeobject is refered.
- bugfix: MLS policy didn't constrain the
db_procedureclass.Seems ok.
It would be helpful to break up the patch into a set to make it easier to review in the future.
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
I would like to discriminate between a procedure declared by unpriv client and by administrative client, because the policy allows the unprefixed "
sepgsql_proc_exec_t" to be installed as a system internal component, but it is undesirable to install unpriv-user defined procedures as is.
Quoted 4 lines
Quoted 2 lines
If the "
user_" prefix is unpreferable, how do you think other prefixes something like "anon_", "unpriv_" and so on?I think we should go with
unpriv_for now.
OK, the attached patch adds the following types for unprivileged clients.
- unpriv_sepgsql_table_t
- unpriv_sepgsql_sysobj_t
- unpriv_sepgsql_proc_exec_t
- unpriv_sepgsql_blob_t
These types are the default for unprivileged and unprefixed domains, such as httpd_t and others.
In addition, TYPE_TRANSITION rules are moved to outside of tunable of the sepgsql_enable_users_ddl. IIRC, it was enclosed within the tunable because UBAC domains (user_t and so on) were allowed to create sepgsql_table_t, and its default was pointed to this type when sepgsql_enable_users_ddl is disabled.
However, it has different meanings now, so the TYPE_TRANSITION rules should be unconditional.
Thanks,
Signature · 9 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> -------------- next part -------------- A non-text attachment was scrubbed... Name: refpolicy-sepgsql-1-unpriv-types.patch Type: text/x-patch Size: 4557 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090508/9306855a/attachment.bin
The attached patch fixes incorrect behavior in sepgsql_enable_users_ddl.
The current policy allows users/unprivs to run ALTER TABLE statement unconditionally, because db_table/db_column:{setattr} is allowed outside of the boolean. It should be moved to conditional section.
In addition, they are also allowed to db_procedure:{create drop setattr} for xxxx_sepgsql_proc_exec_t, but it means we allows them to create, drop or alter definition of the functions unconditionally. So, it also should be moved to conditional section.
The postgresql.te allows sepgsql_client_type to modify sepgsql_table_t and sepgsql_sysobj_t when sepgsql_enable_users_ddl is enabled, but it should not be allowed.
Thanks,
Quoted 33 lines · KaiGai Kohei
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
I would like to discriminate between a procedure declared by unpriv client and by administrative client, because the policy allows the unprefixed "
sepgsql_proc_exec_t" to be installed as a system internal component, but it is undesirable to install unpriv-user defined procedures as is.Quoted 3 lines
Quoted 2 lines
If the "
user_" prefix is unpreferable, how do you think other prefixes something like "anon_", "unpriv_" and so on?I think we should go with
unpriv_for now.OK, the attached patch adds the following types for unprivileged clients.
-unpriv_sepgsql_table_t
-unpriv_sepgsql_sysobj_t
-unpriv_sepgsql_proc_exec_t
-unpriv_sepgsql_blob_tThese types are the default for unprivileged and unprefixed domains, such as
httpd_tand others.In addition,
TYPE_TRANSITIONrules are moved to outside of tunable of thesepgsql_enable_users_ddl. IIRC, it was enclosed within the tunable because UBAC domains (user_tand so on) were allowed to createsepgsql_table_t, and its default was pointed to this type whensepgsql_enable_users_ddlis disabled.
However, it has different meanings now, so theTYPE_TRANSITIONrules should be unconditional.Thanks,
Signature · 9 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> -------------- next part -------------- A non-text attachment was scrubbed... Name: refpolicy-sepgsql-2-correct-sepgsql_enable_users_ddl.patch Type: text/x-patch Size: 3331 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090508/440c820d/attachment.bin
The attached patch allows unprivileged clients to export from or import to the largeobject owned by themselves.
The current security policy does not allow them to import/export any largeobjects without any clear reason.
NOTE: Export of the largeobject means that it dumps whole of the largeobject into a local file, so SE-PostgreSQL checks both of db_blob:{read export} on the largeobject and file:{write} on the local file. Import is a reversal behavior.
Thanks,
Quoted 41 lines · KaiGai Kohei
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
I would like to discriminate between a procedure declared by unpriv client and by administrative client, because the policy allows the unprefixed "
sepgsql_proc_exec_t" to be installed as a system internal component, but it is undesirable to install unpriv-user defined procedures as is.Quoted 3 lines
Quoted 2 lines
If the "
user_" prefix is unpreferable, how do you think other prefixes something like "anon_", "unpriv_" and so on?I think we should go with
unpriv_for now.OK, the attached patch adds the following types for unprivileged clients.
-unpriv_sepgsql_table_t
-unpriv_sepgsql_sysobj_t
-unpriv_sepgsql_proc_exec_t
-unpriv_sepgsql_blob_tThese types are the default for unprivileged and unprefixed domains, such as
httpd_tand others.In addition,
TYPE_TRANSITIONrules are moved to outside of tunable of thesepgsql_enable_users_ddl. IIRC, it was enclosed within the tunable because UBAC domains (user_tand so on) were allowed to createsepgsql_table_t, and its default was pointed to this type whensepgsql_enable_users_ddlis disabled.
However, it has different meanings now, so theTYPE_TRANSITIONrules should be unconditional.Thanks,
------------------------------------------------------------------------
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
Signature · 9 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> -------------- next part -------------- A non-text attachment was scrubbed... Name: refpolicy-sepgsql-3-db_blob-import-export.patch Type: text/x-patch Size: 1082 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090508/a3d74af0/attachment.bin
Quoted 28 lines · KaiGai Kohei
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
I would like to discriminate between a procedure declared by unpriv client and by administrative client, because the policy allows the unprefixed "
sepgsql_proc_exec_t" to be installed as a systeminternal
Quoted 4 lines
Quoted 4 lines
component, but it is undesirable to install unpriv-user defined procedures as is.
If the "
user_" prefix is unpreferable, how do you think otherprefixes
Quoted 3 lines
Quoted 1 line
something like "
anon_", "unpriv_" and so on?I think we should go with
unpriv_for now.OK, the attached patch adds the following types for unprivileged clients.
-unpriv_sepgsql_table_t
-unpriv_sepgsql_sysobj_t
-unpriv_sepgsql_proc_exec_t
-unpriv_sepgsql_blob_tThese types are the default for unprivileged and unprefixed domains, such as
httpd_tand others.
Quoted 7 lines
In addition,
TYPE_TRANSITIONrules are moved to outside of tunable of thesepgsql_enable_users_ddl. IIRC, it was enclosed within the tunable because UBAC domains (user_tand so on) were allowed to createsepgsql_table_t, and its default was pointed to this type whensepgsql_enable_users_ddlis disabled.
However, it has different meanings now, so theTYPE_TRANSITIONrules should be unconditional.
Merged.
Quoted 145 lines
Index: policy/modules/services/postgresql.if
===================================================================modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +0
-4@@ -47,18 +47,17 @@ tunable_policy(`sepgsql_enable_users_ddl',` allow $2 user_sepgsql_table_t:db_table { create drop }; - type_transition $2 sepgsql_database_type:db_table user_sepgsql_table_t; - allow $2 user_sepgsql_table_t:db_column { create drop }; - allow $2 user_sepgsql_sysobj_t:db_tuple { update insert delete }; - type_transition $2 sepgsql_sysobj_table_type:db_tuple user_sepgsql_sysobj_t; ') allow $2 user_sepgsql_table_t:db_table { getattr setattr use select update insert delete lock }; allow $2 user_sepgsql_table_t:db_column { getattr setattr useselect update insert };
allow $2 user_sepgsql_table_t:db_tuple { use select update
insert delete };
+type_transition$2 sepgsql_database_type:db_tableuser_sepgsql_table_t;modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +2
-0+ allow $2 user_sepgsql_sysobj_t:db_tuple { use select }; + type_transition $2 sepgsql_sysobj_table_type:db_tuple
user_sepgsql_sysobj_t;allow $2 user_sepgsql_proc_exec_t:db_procedure { create drop
getattr setattr execute };
type_transition$2 sepgsql_database_type:db_procedureuser_sepgsql_proc_exec_t;modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +15
-4@@ -313,24 +312,55 @@ # interface(`postgresql_unpriv_client',` gen_require(` + class db_database all_db_database_perms; class db_table all_db_table_perms; class db_procedure all_db_procedure_perms; + class db_column all_db_column_perms; + class db_tuple all_db_tuple_perms; class db_blob all_db_blob_perms; attribute sepgsql_client_type; + attribute sepgsql_database_type, sepgsql_sysobj_table_type; - type sepgsql_db_t, sepgsql_table_t, sepgsql_proc_exec_t, sepgsql_blob_t; type sepgsql_trusted_proc_t, sepgsql_trusted_proc_exec_t; + type unpriv_sepgsql_blob_t, unpriv_sepgsql_proc_exec_t; + type unpriv_sepgsql_sysobj_t, unpriv_sepgsql_table_t; ') + ######################################## + # + # Declarations + # + typeattribute $1 sepgsql_client_type; - type_transition $1 sepgsql_db_t:db_table sepgsql_table_t; - type_transition $1 sepgsql_db_t:db_procedure sepgsql_proc_exec_t; - type_transition $1 sepgsql_db_t:db_blob sepgsql_blob_t; + ######################################## + # + # Client local policy + # type_transition $1 sepgsql_trusted_proc_exec_t:processsepgsql_trusted_proc_t; allow $1 sepgsql_trusted_proc_t:process transition;modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +3
-0+ + tunable_policy(`sepgsql_enable_users_ddl',` + allow $1 unpriv_sepgsql_table_t:db_table { create dropsetattr };
+ allow $1 unpriv_sepgsql_table_t:db_column { create
drop setattr };
+ allow $1 unpriv_sepgsql_sysobj_t:db_tuple { update
insert delete };modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +3
-0+ ') + + allow $1 unpriv_sepgsql_table_t:db_table { getattr use selectupdate insert delete lock };
+ allow $1 unpriv_sepgsql_table_t:db_column { getattr use select
update insert };
+ allow $1 unpriv_sepgsql_table_t:db_tuple { use select update
insert delete };
+type_transition$1 sepgsql_database_type:db_tableunpriv_sepgsql_table_t;modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +3
-0+ + allow $1 unpriv_sepgsql_sysobj_t:db_tuple { use select }; + type_transition $1 sepgsql_sysobj_table_type:db_tuple
unpriv_sepgsql_sysobj_t;modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +2
-0+ + allow $1 unpriv_sepgsql_proc_exec_t:db_procedure { create dropgetattr setattr execute };
+type_transition$1 sepgsql_database_type:db_procedureunpriv_sepgsql_proc_exec_t;modules/services/postgresql.if (working copy) renamed from modules/services/postgresql.if (revision 2982) +2
-0+ + allow $1 unpriv_sepgsql_blob_t:db_blob { create drop getattrsetattr read write };
+type_transition$1 sepgsql_database_type:db_blobunpriv_sepgsql_blob_t;
')########################################
Index: policy/modules/services/postgresql.te
===================================================================modules/services/postgresql.te (working copy) renamed from modules/services/postgresql.te (revision 2982) +14
-0@@ -97,6 +97,20 @@ postgresql_unconfined(sepgsql_trusted_proc_t) role system_r types sepgsql_trusted_proc_t; +# Types for unprivileged client +type unpriv_sepgsql_blob_t; +postgresql_blob_object(unpriv_sepgsql_blob_t) + +type unpriv_sepgsql_proc_exec_t; +postgresql_procedure_object(unpriv_sepgsql_proc_exec_t) + +type unpriv_sepgsql_sysobj_t; +postgresql_system_table_object(unpriv_sepgsql_sysobj_t) + +type unpriv_sepgsql_table_t; +postgresql_table_object(unpriv_sepgsql_table_t) + +# Types for UBAC type user_sepgsql_blob_t; typealias user_sepgsql_blob_t alias { staff_sepgsql_blob_t sysadm_sepgsql_blob_t };typealias
user_sepgsql_blob_talias {auditadm_sepgsql_blob_tsecadm_sepgsql_blob_t};
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150
Quoted 16 lines · KaiGai Kohei
The attached patch fixes incorrect behavior in
sepgsql_enable_users_ddl.The current policy allows users/unprivs to run ALTER TABLE statement unconditionally, because db_table/db_column:{setattr} is allowed outside
of the boolean. It should be moved to conditional section.In addition, they are also allowed to db_procedure:{create drop setattr}
forxxxx_sepgsql_proc_exec_t, but it means we allows them to create, drop
or alter definition of the functions unconditionally. So, it also should
be moved to conditional section.
Quoted 3 lines
The postgresql.te allows
sepgsql_client_typeto modifysepgsql_table_tandsepgsql_sysobj_twhensepgsql_enable_users_ddlis enabled, but it should not be allowed.
Merged. I fixed the user section which removed the unconditional getattr instead of the unconditional setattr.
Quoted 153 lines
Quoted 6 lines · KaiGai Kohei
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
I would like to discriminate between a procedure declared by
unpriv
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
client and by administrative client, because the policy allows the unprefixed "
sepgsql_proc_exec_t" to be installed as a systeminternal
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
component, but it is undesirable to install unpriv-user defined procedures as is.
If the "
user_" prefix is unpreferable, how do you think otherprefixes
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
something like "
anon_", "unpriv_" and so on?I think we should go with
unpriv_for now.OK, the attached patch adds the following types for unprivileged
clients.
Quoted 17 lines
-
unpriv_sepgsql_table_t
-unpriv_sepgsql_sysobj_t
-unpriv_sepgsql_proc_exec_t
-unpriv_sepgsql_blob_tThese types are the default for unprivileged and unprefixed domains, such as
httpd_tand others.In addition,
TYPE_TRANSITIONrules are moved to outside of tunable of thesepgsql_enable_users_ddl. IIRC, it was enclosed within the tunable because UBAC domains (user_tand so on) were allowed to createsepgsql_table_t, and its default was pointed to this type whensepgsql_enable_users_ddlis disabled.
However, it has different meanings now, so theTYPE_TRANSITIONrules should be unconditional.Thanks,
Signature · 18 lines
OSS Platform Development Division, NEC KaiGai Kohei <[email protected]> differences between files attachment (refpolicy-sepgsql-2-correct-sepgsql_enable_users_ddl.patch) --- policy/modules/services/postgresql.if 2009-05-08 12:32:51.000000000 +0900 +++ policy/modules/services/postgresql.if.2 2009-05-08 11:58:46.000000000 +0900(quoted diff) +5
-4@@ -46,20 +46,21 @@ # tunable_policy(`sepgsql_enable_users_ddl',` - allow $2 user_sepgsql_table_t:db_table { create drop }; - allow $2 user_sepgsql_table_t:db_column { create drop }; + allow $2 user_sepgsql_table_t:db_table { create drop setattr }; + allow $2 user_sepgsql_table_t:db_column { create drop setattr }; allow $2 user_sepgsql_sysobj_t:db_tuple { update insert delete }; + allow $2 user_sepgsql_proc_exec_t:db_procedure { create drop setattr }; ') - allow $2 user_sepgsql_table_t:db_table { getattr setattr use select update insert delete lock }; - allow $2 user_sepgsql_table_t:db_column { getattr setattr use select update insert }; + allow $2 user_sepgsql_table_t:db_table { setattr use select update insert delete lock }; + allow $2 user_sepgsql_table_t:db_column { setattr use select update insert };allow $2 user_sepgsql_table_t:db_tuple { use select update
insert delete };
type_transition$2 sepgsql_database_type:db_tableuser_sepgsql_table_t;allow $2 user_sepgsql_sysobj_t:db_tuple { use select };
type_transition$2 sepgsql_sysobj_table_type:db_tupleuser_sepgsql_sysobj_t;- allow $2 user_sepgsql_proc_exec_t:db_procedure { create drop
getattr setattr execute };
+ allow $2 user_sepgsql_proc_exec_t:db_procedure { getattr
execute };
type_transition$2 sepgsql_database_type:db_procedureuser_sepgsql_proc_exec_t;allow $2 user_sepgsql_blob_t:db_blob { create drop getattr
setattr read write };(quoted diff) +1
-0@@ -346,6 +347,7 @@ allow $1 unpriv_sepgsql_table_t:db_table { create drop setattr }; allow $1 unpriv_sepgsql_table_t:db_column { create drop setattr }; allow $1 unpriv_sepgsql_sysobj_t:db_tuple { update insert delete }; + allow $1 unpriv_sepgsql_proc_exec_t:db_procedure{ create drop setattr };
')allow $1 unpriv_sepgsql_table_t:db_table { getattr use select
update insert delete lock };(quoted diff) +1
-1@@ -356,7 +358,7 @@ allow $1 unpriv_sepgsql_sysobj_t:db_tuple { use select }; type_transition $1 sepgsql_sysobj_table_type:db_tuple unpriv_sepgsql_sysobj_t; - allow $1 unpriv_sepgsql_proc_exec_t:db_procedure { create drop getattr setattr execute }; + allow $1 unpriv_sepgsql_proc_exec_t:db_procedure { getattr execute };
type_transition$1 sepgsql_database_type:db_procedureunpriv_sepgsql_proc_exec_t;allow $1 unpriv_sepgsql_blob_t:db_blob { create drop getattr
setattr read write };
--- policy/modules/services/postgresql.te 2009-05-08
12:38:30.000000000 +0900
+++ policy/modules/services/postgresql.te.2 2009-05-08
12:39:10.000000000 +0900(quoted diff) +0
-0@@ -338,12 +338,6 @@ # Therefore, the following rule is applied for any domains which canconnect SE-PostgreSQL.
dontaudit {postgresql_tsepgsql_client_typesepgsql_unconfined_type} {sepgsql_table_type-sepgsql_sysobj_table_type }:db_tuple { use select update insert delete };(quoted diff) +0
-2-tunable_policy(`sepgsql_enable_users_ddl',` - allow sepgsql_client_type sepgsql_table_t:db_table { createdrop setattr };
- allowsepgsql_client_typesepgsql_table_t:db_column { create
drop setattr };
- allowsepgsql_client_typesepgsql_sysobj_t:db_tuple { update
insert delete };
-')
-
########################################
#
# Unconfined access to this module
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150
Quoted 11 lines · KaiGai Kohei
The attached patch allows unprivileged clients to export from or import
to the largeobject owned by themselves.The current security policy does not allow them to import/export any largeobjects without any clear reason.
NOTE: Export of the largeobject means that it dumps whole of the largeobject into a local file, so SE-PostgreSQL checks both of db_blob:{read export} on the largeobject and file:{write} on the local file. Import is a reversal behavior.
Merged.
Quoted 70 lines
Quoted 6 lines · KaiGai Kohei
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
- rework: All the newly created database objects by unprivileged clients are prefixed with "
user_", and these are controled viasepgsql_enable_users_ddl.I don't think we should be mixing user content with other unpriv clients.
I would like to discriminate between a procedure declared by
unpriv
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
client and by administrative client, because the policy allows the unprefixed "
sepgsql_proc_exec_t" to be installed as a systeminternal
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
component, but it is undesirable to install unpriv-user defined procedures as is.
If the "
user_" prefix is unpreferable, how do you think otherprefixes
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
something like "
anon_", "unpriv_" and so on?I think we should go with
unpriv_for now.OK, the attached patch adds the following types for unprivileged
clients.
Quoted 8 lines
-
unpriv_sepgsql_table_t
-unpriv_sepgsql_sysobj_t
-unpriv_sepgsql_proc_exec_t
-unpriv_sepgsql_blob_tThese types are the default for unprivileged and unprefixed domains, such as
httpd_tand others.Quoted 8 lines
In addition,
TYPE_TRANSITIONrules are moved to outside of tunable of thesepgsql_enable_users_ddl. IIRC, it was enclosed within the tunable because UBAC domains (user_tand so on) were allowed to createsepgsql_table_t, and its default was pointed to this type whensepgsql_enable_users_ddlis disabled.
However, it has different meanings now, so theTYPE_TRANSITIONrules should be unconditional.differences
between files
attachment
(refpolicy-sepgsql-3-db_blob-import-export.patch)modules/services/postgresql.if.3 2009-05-08 11:59:28.000000000 +0900 renamed from modules/services/postgresql.if.2 2009-05-08 11:58:46.000000000 +0900 +2
-2@@ -63,7 +63,7 @@ allow $2 user_sepgsql_proc_exec_t:db_procedure { getattr execute }; type_transition $2 sepgsql_database_type:db_procedure user_sepgsql_proc_exec_t; - allow $2 user_sepgsql_blob_t:db_blob { create drop getattr setattr read write }; + allow $2 user_sepgsql_blob_t:db_blob { create drop getattr setattr read write import export }; type_transition $2 sepgsql_database_type:db_blob user_sepgsql_blob_t; allow $2 sepgsql_trusted_proc_t:process transition;@@ -361,7 +361,7 @@ allow $1 unpriv_sepgsql_proc_exec_t:db_procedure { getattr execute }; type_transition $1 sepgsql_database_type:db_procedure unpriv_sepgsql_proc_exec_t; - allow $1 unpriv_sepgsql_blob_t:db_blob { create drop getattr setattr read write }; + allow $1 unpriv_sepgsql_blob_t:db_blob { create drop getattr setattr read write import export }; type_transition $1 sepgsql_database_type:db_blob unpriv_sepgsql_blob_t; ')
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150