SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* Intent to add support for cryfs
@ 2019-11-10 18:32 Nicolas Iooss
  2019-11-12 10:28 ` Dominick Grift
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2019-11-10 18:32 UTC (permalink / raw)
  To: refpolicy

Hello,
I am using CryFS (https://www.cryfs.org/) in order to encrypt some
files in a shared directory. Before writing a policy for this software
and upstreaming it to refpolicy, I am wondering how this should be
handled.

CryFS is a software that can be run by non-root users that have access
to /dev/fuse. Its command is directly used to mount a directory
("/usr/bin/cryfs basedir mountpoint"), like command "mount".
Unmounting a mountpoint is done with "fusermount -u mountpoint",
/usr/bin/fusermount being a setuid-root program labeled mount_exec_t.
Currently, sysadm_t cannot use CryFS because it is not allowed to open
and use /dev/fuse (ie. fuse_device_t). Moreover labeling CryFS as
mount_exec_t makes mount_t require more accesses (reading a
configuration file from the base directory, reading
/proc/sys/crypto/fips_enabled, using pipes, etc.).

Therefore I am thinking of creating a new policy module for cryfs,
which could be shared with other similar software like EncFS
(https://vgough.github.io/encfs/). Does this sound like something
acceptable? Did I miss an existing module that can be extended in
order to support CryFS?

Thanks,
Nicolas


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Intent to add support for cryfs
  2019-11-10 18:32 Intent to add support for cryfs Nicolas Iooss
@ 2019-11-12 10:28 ` Dominick Grift
  0 siblings, 0 replies; 2+ messages in thread
From: Dominick Grift @ 2019-11-12 10:28 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: refpolicy

[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]

On Sun, Nov 10, 2019 at 07:32:43PM +0100, Nicolas Iooss wrote:
> Hello,
> I am using CryFS (https://www.cryfs.org/) in order to encrypt some
> files in a shared directory. Before writing a policy for this software
> and upstreaming it to refpolicy, I am wondering how this should be
> handled.

Sounds somewhat like gocryptfs.
This is how i implemented policy for that:
https://defensec.nl/gitweb/dssp2.git/blob/HEAD:/policy/applications/g/gocryptfs.cil


> 
> CryFS is a software that can be run by non-root users that have access
> to /dev/fuse. Its command is directly used to mount a directory
> ("/usr/bin/cryfs basedir mountpoint"), like command "mount".
> Unmounting a mountpoint is done with "fusermount -u mountpoint",
> /usr/bin/fusermount being a setuid-root program labeled mount_exec_t.
> Currently, sysadm_t cannot use CryFS because it is not allowed to open
> and use /dev/fuse (ie. fuse_device_t). Moreover labeling CryFS as
> mount_exec_t makes mount_t require more accesses (reading a
> configuration file from the base directory, reading
> /proc/sys/crypto/fips_enabled, using pipes, etc.).
> 
> Therefore I am thinking of creating a new policy module for cryfs,
> which could be shared with other similar software like EncFS
> (https://vgough.github.io/encfs/). Does this sound like something
> acceptable? Did I miss an existing module that can be extended in
> order to support CryFS?
> 
> Thanks,
> Nicolas
> 

-- 
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-10 18:32 Intent to add support for cryfs Nicolas Iooss
2019-11-12 10:28 ` Dominick Grift

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org
	public-inbox-index selinux-refpolicy

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git