libfuse accepts subtypes with slashes in them??
Subsystems (2)
Hey everyone,
So today I noticed that this happens on Debian 13:
$ mount -t fuse./bin/ls /root/ /etc/shadow ls: cannot access 'rw,dev,suid': No such file or directory -rw-r----- 1 root 1345 Nov 18 10:38 /etc/shadow
ls: cannot open directory '/root': Permission denied
Uh... is that intentional? It looks as though mount does:
execve("/sbin/mount.fuse", ["/sbin/mount.fuse", "/root", "/etc/shadow", "-o", "rw", "-t", "fuse./bin/ls"]...)
and then mount.fuse just trims off everything after the "fuse." and does:
execve("/bin/sh", ["/bin/sh", "-c", "'/bin/ls' '/root' '/etc/shadow' '-o' 'rw,dev,suid'"]...)
with the odd output that you see above. Is that supposed to happen? Or should libfuse reject subtypes with path separators?
--D
Miklos Szeredi
maintainerQuoted 15 lines · Darrick J. Wong
Hey everyone,
So today I noticed that this happens on Debian 13:
$ mount -t fuse./bin/ls /root/ /etc/shadow ls: cannot access 'rw,dev,suid': No such file or directory -rw-r----- 1 root 1345 Nov 18 10:38 /etc/shadowls: cannot open directory '/root': Permission denied
Uh... is that intentional? It looks as though mount does:
execve("/sbin/mount.fuse", ["
/sbin/mount.fuse", "/root", "/etc/shadow", "-o", "rw", "-t", "fuse./bin/ls"]...)
Quoted 7 lines
and then mount.fuse just trims off everything after the "fuse." and does:
execve("/bin/sh", ["/bin/sh", "-c", "'/bin/ls' '/root' '/etc/shadow' '-o' 'rw,dev,suid'"]...)with the odd output that you see above. Is that supposed to happen? Or should libfuse reject subtypes with path separators?
Probably should have done that. But now this is probably abused and would cause breakage if changed.
Thanks,
Miklos