-
-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fuse: pass default_options #3903
Comments
Not sure what they all mean, whether they make sense for us or since when default_options is available in llfuse. So, double check that please and then do a PR. :) |
See python-llfuse/python-llfuse#12 about the documentation for its values.
|
Hmm, somehow embarassing that the default_options must be explicitly given and are not the default(*)... Same for the default_permissions. (*) in fact, they are the default value for the init argument. but that's not practically helpful as in many cases one needs to pass other options there, so the argument default is not used. |
@blueyed can you evaluate whether this means a security or performance issue for:
|
@blueyed do not bump the required version, but use something like:
|
@blueyed you said Did you mean security reasons? If not, can you explain the performance impact? |
By now I would say "security reasons", but initially I've read something along that otherwise the program would have to do checks, which might be slower then. |
considering the PRs have been merged into master and 1.1-maint, guess we can close this? |
ehrm, looks like I misinterpreted my own comment #3903 (comment) - "related" did not mean this issue has been fixed there, just related stuff... reopening... |
ok, looks like we need a security fix here, I am working on this currently and will release 1.1.9 ASAP. @LocutusOfBorg can you help with getting a CVE for this? A) When B) If C) As unfixed borg versions did not give A) and C) together mean that uid/gid/mode as present in a borg archive are visible (e.g. (*) This is especially the case if the UIDs/GIDs stored in the borg archive match the system executing the mount - then users would likely expect it behaving like a local filesystem, enforcing permissions perfectly. If UIDs/GIDs do not match between system and archive, there is a fundamental problem with that mismatch, of course (this is not borgfs specific, but happens with all filesystems). |
@blueyed could you review the PRs? |
Bah, this is a mess. :-( From mount.fuse(8):
So, the llfuse docs recommend llfuse users (== [borg] developers) use OTOH, the OTOH, the name A related problem is: if we give some options by default, how does one get rid of them in case one wants different behaviour? It looks like llfuse implements some stuff like |
nitpick: |
related: libfuse/libfuse#15 |
any comments about how to deal with this? |
|
@Nikratio passed where by whom? do you mean by the end user to |
I updated PR #4331 according to these ideas:
|
@LocutusOfBorg considering that mount.fuse documents that there is no permissions checking, I guess borg does not need a CVE, sorry for the noise. Not sure if that is a sane situation in fuse/kernel, but that's not our problem. After the PR we will at least keep users from falling into that pitfall accidentally. |
Passed to |
@Nikratio ah. well, as you've maybe read above, that has its issues. what i did not talk about yet are potential platform issues (like some platform not supporting some option or some platform requiring some option). i didn't feel like inventing a negated (or negated negated) option just for the case somebody running into such an issue for all the options in what (ll)fuse could do better here is at least have all options in negated and non-negated form. |
The default options are platform-dependent. If a platform doesn't support an option, then on that platform it will never be included in |
platform dependency: ok, sounds good. i thought i have seen some code removing some options for macOS, but I don't remember it exactly. assuming that 1) a software calls then, if you have "foo" in default_options, the software needs to offer "nofoo" to the cli user to override that. if you have "nobar" in default_options, the software needs to offer "bar" to the user to override that. of course the software needs to give the options to |
…ckup#3903 "default_permissions" is now enforced by borg by default to let the kernel check uid/gid/mode based permissions. "ignore_permissions" can be given to not enforce "default_permissions". note: man mount.fuse explicitly tells about the security issue: default_permissions By default FUSE doesn't check file access permissions, ... This option enables permission checking, restricting access based on file mode. This option is usually useful together with the allow_other mount option. We consider this a pitfall waiting for someone to fall into and this is why we chose to change the default behaviour for borg.
…ckup#3903 "default_permissions" is now enforced by borg by default to let the kernel check uid/gid/mode based permissions. "ignore_permissions" can be given to not enforce "default_permissions". note: man mount.fuse explicitly tells about the security issue: default_permissions By default FUSE doesn't check file access permissions, ... This option enables permission checking, restricting access based on file mode. This option is usually useful together with the allow_other mount option. We consider this a pitfall waiting for someone to fall into and this is why we chose to change the default behaviour for borg.
#4331 fixed 1.1-maint. |
@LocutusOfBorg is it already too late or can this (borg 1.1.9) still get into next debian? |
You mean the one that is already ongoing in unstable? |
as far as i could see on packages.debian.org, unstable (sid) has 1.1.8 still (1.1.9 is brand new, just released it). |
…ckup#3903 "default_permissions" is now enforced by borg by default to let the kernel check uid/gid/mode based permissions. "ignore_permissions" can be given to not enforce "default_permissions". note: man mount.fuse explicitly tells about the security issue: default_permissions By default FUSE doesn't check file access permissions, ... This option enables permission checking, restricting access based on file mode. This option is usually useful together with the allow_other mount option. We consider this a pitfall waiting for someone to fall into and this is why we chose to change the default behaviour for borg. (cherry picked from commit 1b277cb)
…ckup#3903 "default_permissions" is now enforced by borg by default to let the kernel check uid/gid/mode based permissions. "ignore_permissions" can be given to not enforce "default_permissions". note: man mount.fuse explicitly tells about the security issue: default_permissions By default FUSE doesn't check file access permissions, ... This option enables permission checking, restricting access based on file mode. This option is usually useful together with the allow_other mount option. We consider this a pitfall waiting for someone to fall into and this is why we chose to change the default behaviour for borg. (cherry picked from commit 1b277cb)
security fix: configure FUSE with "default_permissions", fixes #3903
security fix: configure FUSE with "default_permissions", fixes #3903
|
llfuse's documentation recommends using
llfuse.default_options
.I've tried this, and it appears to work.
In particular "default_permissions" might be useful for performance reasons.
I'd be happy to provide a PR for this, if you agree that it makes sense.
The text was updated successfully, but these errors were encountered: