Skip to contentSkip to conversation

Denial of cryptsetup reading cracklib database

PATCH In review Sugar, David 2 participants 2 messages Mar 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Denial of cryptsetup reading cracklib database

When setting up a LUKS encrypted partition, cryptsetup is reading the cracklib databases to ensure password strength. This is allowing the needed access.

type=AVC msg=audit(1553216939.261:2652): avc:  denied  { search } for  pid=8107 comm="cryptsetup" name="cracklib" dev="dm-1" ino=6388736 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0
type=AVC msg=audit(1553216980.909:2686): avc:  denied  { read } for  pid=8125 comm="cryptsetup" name="pw_dict.pwd" dev="dm-1" ino=6388748 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1
type=AVC msg=audit(1553216980.909:2686): avc:  denied  { open } for  pid=8125 comm="cryptsetup" path="/usr/share/cracklib/pw_dict.pwd" dev="dm-1" ino=6388748 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1
type=AVC msg=audit(1553216980.909:2687): avc:  denied  { getattr } for  pid=8125 comm="cryptsetup" path="/usr/share/cracklib/pw_dict.pwi" dev="dm-1" ino=6388749 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1
---
 policy/modules/system/lvm.te | 4 ++++
 1 file changed, 4 insertions(+)
policy/modules/system/lvm.te +4 -0
index ba64c39d..bb71e7b9 100644
@@ -375,6 +375,10 @@ optional_policy(`
 	udev_read_pid_files(lvm_t)
 ')
 
+optional_policy(`
+	usermanage_read_crack_db(lvm_t)
+')
+
 optional_policy(`
 	virt_manage_images(lvm_t)
 ')
Signature · 1 line
2.20.1
#1 lore raw
Quoted 19 lines · David

When setting up a LUKS encrypted partition, cryptsetup is reading the cracklib databases to ensure password strength. This is allowing the needed access.

type=AVC msg=audit(1553216939.261:2652): avc:  denied  { search } for  pid=8107 comm="cryptsetup" name="cracklib" dev="dm-1" ino=6388736 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0
type=AVC msg=audit(1553216980.909:2686): avc:  denied  { read } for  pid=8125 comm="cryptsetup" name="pw_dict.pwd" dev="dm-1" ino=6388748 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1
type=AVC msg=audit(1553216980.909:2686): avc:  denied  { open } for  pid=8125 comm="cryptsetup" path="/usr/share/cracklib/pw_dict.pwd" dev="dm-1" ino=6388748 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1
type=AVC msg=audit(1553216980.909:2687): avc:  denied  { getattr } for  pid=8125 comm="cryptsetup" path="/usr/share/cracklib/pw_dict.pwi" dev="dm-1" ino=6388749 scontext=sysadm_u:sysadm_r:lvm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1
---
  policy/modules/system/lvm.te | 4 ++++
  1 file changed, 4 insertions(+)
policy/modules/system/lvm.te +0 -0
index ba64c39d..bb71e7b9 100644

policy/modules/system/lvm.te optional_policy(` · line 384

Quoted 10 lines
policy/modules/system/lvm.te +4 -0
@@ -375,6 +375,10 @@ optional_policy(`
  	udev_read_pid_files(lvm_t)
  ')
 
+optional_policy(`
+	usermanage_read_crack_db(lvm_t)
+')
+
  optional_policy(`
  	virt_manage_images(lvm_t)
  ')

Merged.

Signature · 1 line
Chris PeBenito