vasi / squashfuse

FUSE filesystem to mount squashfs archives
Other
294 stars 69 forks source link

where's trusted namespace being overridden? #78

Closed hallyn closed 1 year ago

hallyn commented 1 year ago

I have squashfs files which were created from an overlay upperdir. So inodes have xattrs like trusted.overlay.origin.

When I mount them using 'sudo mount -t squashfs x.squashfs /dest', then listxattr(2) will return 'trusted.overlay.origin'. But when I use squashfuse, even as root, then listxattr(2) will return 'security.overlay.origin'. I can't find where in the squashfuse source or kernel's fs/fuse/ or fs/xattr.c this would be happening. Most importantly - is it by design? Is there a way to change the behavior? I'd prefer they (trusted. xattrs) show up as user. or just not show up at all.

hallyn commented 1 year ago

Allow me to amend this from a question to a bug report. Using the file http://hallyn.com:55589/bad.squashfs ,

# squashfs kernel module produces trusted.overlay.origin xattr
serge@jerom ~/squashfs-with-xattrs$ sudo mount -t squashfs bad.squashfs mnt
serge@jerom ~/squashfs-with-xattrs$ sudo getfattr -d -m - mnt/mnt
# file: mnt/mnt
trusted.overlay.origin=0sAPsdAAEOHyeFUrBKnIbE2XJojxZc3RAQACM+Ayk=
serge@jerom ~/squashfs-with-xattrs$ sudo umount mnt

# but squashfuse produces security.overlay.origin xattr (even as root)
serge@jerom ~/squashfs-with-xattrs$ sudo squashfuse bad.squashfs mnt
serge@jerom ~/squashfs-with-xattrs$ sudo getfattr -d -m - mnt/mnt
# file: mnt/mnt
security.overlay.origin=0sAPsdAAEOHyeFUrBKnIbE2XJojxZc3RAQACM+Ayk=
DrDaveD commented 1 year ago

I believe this is because of the bug fixed in #83.