Certain flags in StructFuseFileInfo were mapped as individual variables when they should have been mapped as bitfields.
This is a serious bug that results in:
Memory beyond the allocated fuse struct being accessed and modified, potentially leading to a buffer overflow exploit.
Making it difficult to utilize any of these flags
Making it impossible to created file-handle based file systems, as the fh variable comes after this variable.
The source in fuse_common.h is specified as follows:
unsigned int direct_io : 1;
unsigned int keep_cache : 1;
unsigned int flush : 1;
unsigned int nonseekable : 1;
unsigned int flock_release : 1;
unsigned int padding : 27;
This change will fix this issue by making these flags as bitfields. Unfortunately, there isn't a clean way to do this mapping in JNA, so bitmask operations are used on a 32bit integer to accomplish this.
Certain flags in StructFuseFileInfo were mapped as individual variables when they should have been mapped as bitfields.
This is a serious bug that results in:
The source in fuse_common.h is specified as follows:
This change will fix this issue by making these flags as bitfields. Unfortunately, there isn't a clean way to do this mapping in JNA, so bitmask operations are used on a 32bit integer to accomplish this.