Re: [OSXFUSE] OSXFUSE can't mount Truecrypt encrypted NTFS Volume because of a software error!

818 views
Skip to first unread message

Gavin Hinfey

unread,
Dec 6, 2013, 12:30:37 PM12/6/13
to osxfus...@googlegroups.com
Hi All,

I know this conversation is old but...
Im looking to remove the 'fusefs_' prefix.

Is this possible?

Thanks
Gavin




On Friday, April 13, 2012 8:56:49 AM UTC+1, catacombae wrote:
Paweł Witas wrote 2012-04-11 23.12:
> Prefix "fusefs_" is 7 characters long, as well as "txantfs", even with
> two \0 *both* should fit in 16 characters.

Now you're confusing things. 'fusefs_' is 7 characters but 'osxfusefs_'
is 10 characters. the string "osxfusefs_txantfs\0" is 19 characters.

> Besides that, if there is an error message like  "fstypename can be at
> most /%n characters.", you should inform the user what is the
> fstypename that causes this problem./
> /I had to modify this error message to /"fstypename %s can be at most
> /%n characters." to be able diagnose my problem. This is the
> difference between informative and meaningless error messages./
>
> There is nothing wrong in Tuxera NTFS 10.1 and I won't buy a new
> version, because I have already solved my problem.

Here's a huge misunderstanding. There's no charge for updating to newer
versions with the license you have purchased. You can just download and
install it if you have bought a product key.

> I understand that its authors had to shorten fstypename "txantfs" to
> make it compatible with OSXFUSE.

No, see above. Tuxera NTFS for Mac 2010.1 was released a long time
before OSXFUSE was conceived.

Regards,

- Erik

Paweł Witas

unread,
Apr 9, 2012, 3:04:40 PM4/9/12
to osxfus...@googlegroups.com
Truecrypt attempts to mount "txantfs" filesystem type, but FUSE_FSTYPENAME_MAXLEN = 4 and Truecrypt fails with message box:"mount_osxfusefs: fstypename can be at most 4 characters. Did not receive a signal within 15.000000 seconds."
I corrected it in fuse_mount.h and now Truecrypt mounts and unmounts NTFS encrypted volume files and volumes just great!

struct fuse_mount_args {                                                                                                                 
    char     mntpath[MAXPATHLEN]; // path to the mount point                                                                             
    char     fsname[MAXPATHLEN];  // file system description string                                                                      
    char     fstypename[MFSTYPENAMELEN+4]; // file system type name (I added place for 4 chars for memory safety).
(...)
#define FUSE_FSTYPENAME_MAXLEN (MFSTYPENAMELEN - sizeof(OSXFUSE_FS_TYPE) + 2) // I replaced -2 by +2

I made a DMG installer:
But please correct this error in the next release!
fuse_mount.h

Benjamin Fleischer

unread,
Apr 9, 2012, 7:04:08 PM4/9/12
to osxfus...@googlegroups.com
Thanks for the bug report and fix. I will look into it. Every commit is very much appreciated.

Please do not use this mailing list to distribute unofficial OSXFUSE builds. The project is very much alive and patches are always welcome. That said, I strongly advice against using this build for the following reasons:

  • It is an unofficial release. As a general rule unofficial releases are not supported. They cause confusion and might cause more serious issues like data loss.
  • This release does not include binaries for Mac OS X 10.7
  • This release is based on an unfinished and mostly untested upcoming version of OSXFUSE. It is not a fixed version of OSXFUSE 2.3.9.
  • In order to download the build, you have to pay a fee or create an account. The fact that the website has no english localization does not help either. Not everyone speaks polish.

Paweł, I believe you have good intensions and I hope you understand my reasons for advising against using your build. In my opinion builds like this one have the potential of causing more harm than good. I think it would be best to take it down, but of course that's up to you. The only thing I ask of you is to not label it "OSXFUSE 2.3.9" for the above reasons.

Regards,
Benjamin

Paweł Witas

unread,
Apr 9, 2012, 7:53:38 PM4/9/12
to osxfus...@googlegroups.com
I'm aware that my fix was a quick and dirty "hack" done without deep understanding of internal working of this driver, therefore I didn't want to put it into your version control system. But it solved my problem. 
I've published it as a proof of work and to help others. It should be free to download now and with changed name. I'll remove it when this bug is corrected in official release.

Regards
Pawel

Benjamin Fleischer

unread,
Apr 10, 2012, 4:44:55 AM4/10/12
to osxfus...@googlegroups.com
Hi Pawel,

What version of TrueCrypt are you using? I did a quick test and mounting a container file containing an encrypted NTFS volume works out of the box for me using TrueCrypt 7.1a and OSXFUSE 2.3.9. I tested with NTFS-3G 2010.10.2 and Tuxera NTFS for Mac 2012.3.

Regards,
Benjamin

Paweł Witas

unread,
Apr 10, 2012, 7:40:10 AM4/10/12
to osxfus...@googlegroups.com
I'm using Hackintosh Hazard 10.6.8 (upgraded from 10.6.6), Tuxera NTFS 2010.1 and newest Truecrypt 7.1a. I checked on my laptop and desktop with OSXFuse modified to show filesystem type name in the error message.
My point is that the limit of only four characters for the filesystem type name is too small, maybe you are using another, shorter name than "txantfs" but there should be limit of 16 characters including \0, as stated in bsd/sys/mount.h, line 114 #define MFSTYPENAMELEN 16
I don't know what OSXFUSE_FS_TYPE (=10) is, but it is certainly something different than MFSTYPENAMELEN. If you concatenate two strings, please make sure that there is enough space for the result provided.

Paweł Witas

unread,
Apr 10, 2012, 8:14:15 AM4/10/12
to osxfus...@googlegroups.com
And I've been trying to mount Truecrypt encrypted NTFS partitions, so I think that it is rather a problem with cooperation of Tuxera NTFS 2010.1 with OSXFuse, caused by this limit of 4 characters. I couldn't mount Truecrypt volume file on NTFS formatted external USB disk also, because I couldn't even access this file!

Regards
Pawel

Benjamin Fleischer

unread,
Apr 10, 2012, 9:47:41 AM4/10/12
to osxfus...@googlegroups.com
Am 10.04.2012 um 13:40 schrieb Paweł Witas:

I'm using Hackintosh Hazard 10.6.8 (upgraded from 10.6.6), Tuxera NTFS 2010.1 and newest Truecrypt 7.1a. I checked on my laptop and desktop with OSXFuse modified to show filesystem type name in the error message.

I can confirm the TrueCrypt 7.1a + OSXFUSE 2.3.9 + Tuxera NTFS for Mac 2012.3 work on Mac OS X 10.6. You are using a very outdated version of Tuxera's NTFS driver. Please install the latest version.

My point is that the limit of only four characters for the filesystem type name is too small, maybe you are using another, shorter name than "txantfs" but there should be limit of 16 characters including \0, as stated in bsd/sys/mount.h, line 114 #define MFSTYPENAMELEN 16
I don't know what OSXFUSE_FS_TYPE (=10) is, but it is certainly something different than MFSTYPENAMELEN. If you concatenate two strings, please make sure that there is enough space for the result provided.

Please take a look at struct vfsstatfs in bsd/sys/mount.h.

struct vfsstatfs {
uint32_t f_bsize; /* fundamental file system block size */
size_t f_iosize; /* optimal transfer block size */
uint64_t f_blocks; /* total data blocks in file system */
uint64_t f_bfree; /* free blocks in fs */
uint64_t f_bavail; /* free blocks avail to non-superuser */
uint64_t f_bused; /* free blocks avail to non-superuser */
uint64_t f_files; /* total file nodes in file system */
uint64_t f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
uid_t f_owner; /* user that mounted the filesystem */
uint64_t f_flags; /* copy of mount exported flags */ 
char f_fstypename[MFSTYPENAMELEN];/* fs type name inclus */
char f_mntonname[MAXPATHLEN];/* directory on which mounted */
char f_mntfromname[MAXPATHLEN];/* mounted filesystem */
uint32_t f_fssubtype;     /* fs sub-type (flavor) */
void *f_reserved[2]; /* For future use == 0 */
}; 

As you can see the f_fstypename field is limited to MFSTYPENAMELEN characters. You can't just increase that number. Your patch simply cuts off the last part of the type name. I'm not convinced that this is the right thing to do.


Am 10.04.2012 um 14:14 schrieb Paweł Witas:

And I've been trying to mount Truecrypt encrypted NTFS partitions, so I think that it is rather a problem with cooperation of Tuxera NTFS 2010.1 with OSXFuse, caused by this limit of 4 characters.

OSXFUSE has never been tested with this particular version of Tuxera's NTFS driver, at least not by me. Nonetheless I get your point about the 4 characters limit. The only way to "fix" this properly would be to shorten the prefix. Dropping  the prefix completely would break the ALLOW_RECURSION (recursive mounts) mechanism.

Regards,
Benjamin

Erik Larsson

unread,
Apr 11, 2012, 2:55:37 AM4/11/12
to osxfus...@googlegroups.com
Hi,


Benjamin Fleischer wrote 2012-04-10 15.47:
Am 10.04.2012 um 13:40 schrieb Paweł Witas:

I'm using Hackintosh Hazard 10.6.8 (upgraded from 10.6.6), Tuxera NTFS 2010.1 and newest Truecrypt 7.1a. I checked on my laptop and desktop with OSXFuse modified to show filesystem type name in the error message.

I can confirm the TrueCrypt 7.1a + OSXFUSE 2.3.9 + Tuxera NTFS for Mac 2012.3 work on Mac OS X 10.6. You are using a very outdated version of Tuxera's NTFS driver. Please install the latest version.

Tuxera NTFS for Mac abandoned the MacFUSE dependency mid-2010. It's definitely time to upgrade. :-)


My point is that the limit of only four characters for the filesystem type name is too small, maybe you are using another, shorter name than "txantfs" but there should be limit of 16 characters including \0, as stated in bsd/sys/mount.h, line 114 #define MFSTYPENAMELEN 16
I don't know what OSXFUSE_FS_TYPE (=10) is, but it is certainly something different than MFSTYPENAMELEN. If you concatenate two strings, please make sure that there is enough space for the result provided.

Please take a look at struct vfsstatfs in bsd/sys/mount.h.

struct vfsstatfs {
uint32_t f_bsize; /* fundamental file system block size */
size_t f_iosize; /* optimal transfer block size */
uint64_t f_blocks; /* total data blocks in file system */
uint64_t f_bfree; /* free blocks in fs */
uint64_t f_bavail; /* free blocks avail to non-superuser */
uint64_t f_bused; /* free blocks avail to non-superuser */
uint64_t f_files; /* total file nodes in file system */
uint64_t f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
uid_t f_owner; /* user that mounted the filesystem */
uint64_t f_flags; /* copy of mount exported flags */ 
char f_fstypename[MFSTYPENAMELEN];/* fs type name inclus */
char f_mntonname[MAXPATHLEN];/* directory on which mounted */
char f_mntfromname[MAXPATHLEN];/* mounted filesystem */
uint32_t f_fssubtype;     /* fs sub-type (flavor) */
void *f_reserved[2]; /* For future use == 0 */
}; 

As you can see the f_fstypename field is limited to MFSTYPENAMELEN characters. You can't just increase that number. Your patch simply cuts off the last part of the type name. I'm not convinced that this is the right thing to do.

It sure isn't. This must match the limitations in the system struct definitions. Anything else would be madness.
Paweł, please contact Tuxera's support email if you need assistance with Tuxera NTFS for Mac. This is not the place for such questions.
Simply downloading and installing the latest version will fix this problem.


Am 10.04.2012 um 14:14 schrieb Paweł Witas:

And I've been trying to mount Truecrypt encrypted NTFS partitions, so I think that it is rather a problem with cooperation of Tuxera NTFS 2010.1 with OSXFuse, caused by this limit of 4 characters.

OSXFUSE has never been tested with this particular version of Tuxera's NTFS driver, at least not by me.

Same here. This version is too old and should just be abandoned. The typename was designed with the MFSTYPENAMELEN limit in mind, given that 'fusefs_' is the prefix.

Regards,

- Erik

Paweł Witas

unread,
Apr 11, 2012, 5:12:28 PM4/11/12
to osxfus...@googlegroups.com

Prefix "fusefs_" is 7 characters long, as well as "txantfs", even with two \0 both should fit in 16 characters. 

Besides that, if there is an error message like  "fstypename can be at most %n characters.", you should inform the user what is the fstypename that causes this problem.
I had to modify this error message to "fstypename %s can be at most %n characters." to be able diagnose my problem. This is the difference between informative and meaningless error messages.

There is nothing wrong in Tuxera NTFS 10.1 and I won't buy a new version, because I have already solved my problem. 
I understand that its authors had to shorten fstypename "txantfs" to make it compatible with OSXFUSE.

Regards
Pawel

Erik Larsson

unread,
Apr 13, 2012, 3:56:49 AM4/13/12
to osxfus...@googlegroups.com
Paweł Witas wrote 2012-04-11 23.12:
> Prefix "fusefs_" is 7 characters long, as well as "txantfs", even with
> two \0 *both* should fit in 16 characters.

Now you're confusing things. 'fusefs_' is 7 characters but 'osxfusefs_'

is 10 characters. the string "osxfusefs_txantfs\0" is 19 characters.

> Besides that, if there is an error message like "fstypename can be at

> most /%n characters.", you should inform the user what is the
> fstypename that causes this problem./
> /I had to modify this error message to /"fstypename %s can be at most
> /%n characters." to be able diagnose my problem. This is the
> difference between informative and meaningless error messages./


>
> There is nothing wrong in Tuxera NTFS 10.1 and I won't buy a new
> version, because I have already solved my problem.

Here's a huge misunderstanding. There's no charge for updating to newer

versions with the license you have purchased. You can just download and
install it if you have bought a product key.

> I understand that its authors had to shorten fstypename "txantfs" to

> make it compatible with OSXFUSE.

No, see above. Tuxera NTFS for Mac 2010.1 was released a long time

Reply all
Reply to author
Forward
0 new messages