userdomain: main user data confidentiality patch
PATCH 1/33 userdomain: main user data confidentiality patch
This is the main patch to curb on userdomain file read and/or write permissions for all daemons and applications that are currently allowed such permissions indiscriminately.
It aims to ensure user data confidentiality.
A boolean has been introduced to revert the previous read/write behavior (where possible, its name starts with the module name and ends with "_enable_home_dirs").
--- policy/modules/system/userdomain.fc | 4 policy/modules/system/userdomain.if | 459 +++++++++++++++++++++++++++++++++++- policy/modules/system/userdomain.te | 12 3 files changed, 464 insertions(+), 11 deletions(-)
policy/modules/system/userdomain.fc +4 -0
@@ -1,6 +1,10 @@ HOME_DIR -d gen_context(system_u:object_r:user_home_dir_t,s0-mls_systemhigh) HOME_DIR/.+ gen_context(system_u:object_r:user_home_t,s0) +HOME_DIR/\.cache(/.*)? gen_context(system_u:object_r:user_cache_t,s0) +HOME_DIR/\.config(/.*)? gen_context(system_u:object_r:user_config_t,s0) +HOME_DIR/\.local(/.*)? gen_context(system_u:object_r:user_data_t,s0) HOME_DIR/\.pki(/.*)? gen_context(system_u:object_r:user_cert_t,s0) +HOME_DIR/Downloads gen_context(system_u:object_r:user_downloads_t,s0) /tmp/gconfd-%{USERNAME} -d gen_context(system_u:object_r:user_tmp_t,s0)
policy/modules/system/userdomain.if +448 -11
514 lines not on this page · raw message
policy/modules/system/userdomain.te +12 -0
@@ -93,14 +93,26 @@ files_associate_tmp(user_home_t) files_poly_parent(user_home_t) files_mountpoint(user_home_t) +type user_cache_t; +userdom_user_home_content(user_cache_t) + type user_cert_t; userdom_user_home_content(user_cert_t) +type user_config_t; +userdom_user_home_content(user_config_t) + +type user_data_t; +userdom_user_home_content(user_data_t) + type user_devpts_t alias { staff_devpts_t sysadm_devpts_t secadm_devpts_t auditadm_devpts_t unconfined_devpts_t }; dev_node(user_devpts_t) files_type(user_devpts_t) ubac_constrained(user_devpts_t) +type user_downloads_t; +userdom_user_home_content(user_downloads_t) + type user_tmp_t alias { staff_tmp_t sysadm_tmp_t secadm_tmp_t auditadm_tmp_t unconfined_tmp_t }; typealias user_tmp_t alias { staff_untrusted_content_tmp_t sysadm_untrusted_content_tmp_t secadm_untrusted_content_tmp_t auditadm_untrusted_content_tmp_t unconfined_untrusted_content_tmp_t }; files_tmp_file(user_tmp_t)
PATCH v2 1/33 userdomain: main user data confidentiality patch
This is the main patch to curb on userdomain file read and/or write permissions for all daemons and applications that are currently allowed such permissions indiscriminately.
It aims to ensure user data confidentiality.
A boolean has been introduced to revert the previous read/write behavior (where possible, its name starts with the module name and ends with "_enable_home_dirs").
This second version simply removes unrelated bits that slipped in.
--- policy/modules/system/userdomain.fc | 4 policy/modules/system/userdomain.if | 457 +++++++++++++++++++++++++++++++++++- policy/modules/system/userdomain.te | 12 3 files changed, 462 insertions(+), 11 deletions(-)
policy/modules/system/userdomain.fc +4 -0
@@ -1,6 +1,10 @@ HOME_DIR -d gen_context(system_u:object_r:user_home_dir_t,s0-mls_systemhigh) HOME_DIR/.+ gen_context(system_u:object_r:user_home_t,s0) +HOME_DIR/\.cache(/.*)? gen_context(system_u:object_r:user_cache_t,s0) +HOME_DIR/\.config(/.*)? gen_context(system_u:object_r:user_config_t,s0) +HOME_DIR/\.local(/.*)? gen_context(system_u:object_r:user_data_t,s0) HOME_DIR/\.pki(/.*)? gen_context(system_u:object_r:user_cert_t,s0) +HOME_DIR/Downloads gen_context(system_u:object_r:user_downloads_t,s0) /tmp/gconfd-%{USERNAME} -d gen_context(system_u:object_r:user_tmp_t,s0)
policy/modules/system/userdomain.if +446 -11
506 lines not on this page · raw message
policy/modules/system/userdomain.te +12 -0
@@ -93,14 +93,26 @@ files_associate_tmp(user_home_t) files_poly_parent(user_home_t) files_mountpoint(user_home_t) +type user_cache_t; +userdom_user_home_content(user_cache_t) + type user_cert_t; userdom_user_home_content(user_cert_t) +type user_config_t; +userdom_user_home_content(user_config_t) + +type user_data_t; +userdom_user_home_content(user_data_t) + type user_devpts_t alias { staff_devpts_t sysadm_devpts_t secadm_devpts_t auditadm_devpts_t unconfined_devpts_t }; dev_node(user_devpts_t) files_type(user_devpts_t) ubac_constrained(user_devpts_t) +type user_downloads_t; +userdom_user_home_content(user_downloads_t) + type user_tmp_t alias { staff_tmp_t sysadm_tmp_t secadm_tmp_t auditadm_tmp_t unconfined_tmp_t }; typealias user_tmp_t alias { staff_untrusted_content_tmp_t sysadm_untrusted_content_tmp_t secadm_untrusted_content_tmp_t auditadm_untrusted_content_tmp_t unconfined_untrusted_content_tmp_t }; files_tmp_file(user_tmp_t)