Compare commits

...

9 Commits

Author SHA1 Message Date
Bill Zissimopoulos
4fdec4d37f sys: FspFsvolCreate, FspFsvolSetSecurity: absolute security descriptors
Some third party filters send us security descriptors in absolute rather
than self-relative format. Handle this case by converting them to self-
relative format ourselves.
2024-10-10 12:34:04 +01:00
Bill Zissimopoulos
2da97d48f5 tools: make-release: add new signatures 2024-09-11 14:48:55 +01:00
Bill Zissimopoulos
7c5dc48414 build: version: 2024 Beta2 2024-09-11 14:46:38 +01:00
Bill Zissimopoulos
93c057571a changelog: 2024 Beta2 2024-09-11 13:23:41 +01:00
Bill Zissimopoulos
da16d0e6ea
Merge pull request #567 from siketyan/fix/string-h-import
fix: Add missing string.h import in winfsp_fuse.h
2024-09-10 09:25:12 +01:00
Natsuki Ikeguchi
dbaee25ed2
fix: Add missing string.h import in winfsp_fuse.h
Signed-off-by: Naoki Ikeguchi <me@s6n.jp>
2024-09-10 01:02:29 +09:00
Bill Zissimopoulos
2bf9a6c16e sys: mup: correctly handle relative file object chain (#561) 2024-06-20 12:44:35 +01:00
Bill Zissimopoulos
b058925692 tst: launcher-secrets: secret: replace gets with fgets 2024-06-03 11:49:38 +01:00
Bill Zissimopoulos
507c794470 doc: known file systems: remove nodejs library with no support for WinFsp 2024-02-20 13:18:30 +00:00
10 changed files with 57 additions and 9 deletions

View File

@ -1,6 +1,15 @@
# Changelog
## v2.1B2 (2024 Beta2)
- [FIX] Fixes a rare BSOD on recent versions of Windows. See commit a482183 for details.
- [FIX] Fixes a rare problem when using `NtCreateFile` to perform "relative" opens on a network drive (see GitHub issue #561).
- [FIX] Fixes a racing issue with two processes competing to start the FSD discovered during testing.
## v2.1B1 (2024 Beta1)
- [FIX] Fixes a rare BSOD on recent versions of Windows. See commit a482183 for details.

View File

@ -67,6 +67,7 @@ CONTRIBUTOR LIST
|John Oberschelp |john at oberschelp.net
|John Tyner |jtyner at gmail.com
|Konstantinos Karakostas |noiredev at protonmail.com
|Naoki Ikeguchi |me at s6n.jp
|Paweł Wegner (Google LLC, https://google.com) |lemourin at google.com
|Pedro Frejo (Arpa System, https://arpasystem.com) |pedro.frejo at arpasystem.com
|Ronny Chan |ronny at ronnychan.ca

View File

@ -20,7 +20,7 @@
<MyCanonicalVersion>2.1</MyCanonicalVersion>
<MyProductVersion>2024 Beta1</MyProductVersion>
<MyProductVersion>2024 Beta2</MyProductVersion>
<MyProductStage>Beta</MyProductStage>
<MyCrossCert>DigiCertGlobalG3CodeSigningECCSHA3842021CA1.cer</MyCrossCert>

View File

@ -30,7 +30,6 @@ This document contains a list of known open-source file systems and file system
- https://github.com/winfsp/cgofuse[Go: cgofuse] - Cross-platform FUSE library for Go
- https://github.com/SerCeMan/jnr-fuse[Java: jnr-fuse] - FUSE implementation in Java using Java Native Runtime (JNR)
- https://github.com/jnr-winfsp-team/jnr-winfsp[Java: jnr-winfsp] - A Java binding for WinFsp using Java Native Runtime (JNR)
- https://github.com/DuroSoft/fuse-bindings[Nodejs: fuse-bindings] - Fully maintained FUSE bindings for Node that aims to cover the entire FUSE api
- https://github.com/billziss-gh/fusepy[Python: fusepy] - Simple ctypes bindings for FUSE
- https://github.com/pleiszenburg/refuse[Python: refuse] - Simple cross-plattform ctypes bindings for libfuse / FUSE for macOS / WinFsp
- https://github.com/Scille/winfspy[Python: winfspy] - WinFSP binding for Python

View File

@ -27,6 +27,7 @@
#include <stdint.h>
#if !defined(WINFSP_DLL_INTERNAL)
#include <stdlib.h>
#include <string.h>
#endif
#ifdef __cplusplus

View File

@ -298,6 +298,8 @@ static NTSTATUS FspFsvolCreateNoLock(
ULONG CreateOptions = IrpSp->Parameters.Create.Options;
USHORT FileAttributes = IrpSp->Parameters.Create.FileAttributes;
PSECURITY_DESCRIPTOR SecurityDescriptor = AccessState->SecurityDescriptor;
BOOLEAN SecurityDescriptorRelative = 0 != SecurityDescriptor &&
BooleanFlagOn(((SECURITY_DESCRIPTOR *)SecurityDescriptor)->Control, SE_SELF_RELATIVE);
ULONG SecurityDescriptorSize = 0;
UINT64 AllocationSize = Irp->Overlay.AllocationSize.QuadPart;
UINT64 AllocationUnit;
@ -406,7 +408,10 @@ static NTSTATUS FspFsvolCreateNoLock(
if (!RtlValidSecurityDescriptor(SecurityDescriptor))
return STATUS_INVALID_PARAMETER;
#endif
SecurityDescriptorSize = RtlLengthSecurityDescriptor(SecurityDescriptor);
if (SecurityDescriptorRelative)
SecurityDescriptorSize = RtlLengthSecurityDescriptor(SecurityDescriptor);
else
RtlAbsoluteToSelfRelativeSD(SecurityDescriptor, 0, &SecurityDescriptorSize);
}
/* align allocation size */
@ -702,8 +707,18 @@ static NTSTATUS FspFsvolCreateNoLock(
/* copy the security descriptor (if any) into the request */
if (0 != SecurityDescriptorSize)
RtlCopyMemory(Request->Buffer + Request->Req.Create.SecurityDescriptor.Offset,
SecurityDescriptor, SecurityDescriptorSize);
{
if (SecurityDescriptorRelative)
RtlCopyMemory(
Request->Buffer + Request->Req.Create.SecurityDescriptor.Offset,
SecurityDescriptor,
SecurityDescriptorSize);
else
RtlAbsoluteToSelfRelativeSD(
SecurityDescriptor,
(PSECURITY_DESCRIPTOR)(Request->Buffer + Request->Req.Create.SecurityDescriptor.Offset),
&SecurityDescriptorSize);
}
/* copy the extra buffer (if any) into the request */
if (0 != ExtraBuffer)

View File

@ -250,7 +250,7 @@ NTSTATUS FspMupHandleIrp(
* Every other CREATE request must be forwarded to the appropriate fsvol device.
*/
if (0 != FileObject->RelatedFileObject)
while (0 != FileObject->RelatedFileObject)
FileObject = FileObject->RelatedFileObject;
FspFsmupDeviceLockPrefixTable(FsmupDeviceObject);

View File

@ -207,6 +207,8 @@ static NTSTATUS FspFsvolSetSecurity(
FSP_FILE_DESC *FileDesc = FileObject->FsContext2;
SECURITY_INFORMATION SecurityInformation = IrpSp->Parameters.SetSecurity.SecurityInformation;
PSECURITY_DESCRIPTOR SecurityDescriptor = IrpSp->Parameters.SetSecurity.SecurityDescriptor;
BOOLEAN SecurityDescriptorRelative =
BooleanFlagOn(((SECURITY_DESCRIPTOR *)SecurityDescriptor)->Control, SE_SELF_RELATIVE);
ULONG SecurityDescriptorSize = 0;
ASSERT(FileNode == FileDesc->FileNode);
@ -216,7 +218,10 @@ static NTSTATUS FspFsvolSetSecurity(
if (0 == SecurityDescriptor || !RtlValidSecurityDescriptor(SecurityDescriptor))
return STATUS_INVALID_PARAMETER;
#endif
SecurityDescriptorSize = RtlLengthSecurityDescriptor(SecurityDescriptor);
if (SecurityDescriptorRelative)
SecurityDescriptorSize = RtlLengthSecurityDescriptor(SecurityDescriptor);
else
RtlAbsoluteToSelfRelativeSD(SecurityDescriptor, 0, &SecurityDescriptorSize);
FspFileNodeAcquireExclusive(FileNode, Full);
@ -236,7 +241,16 @@ static NTSTATUS FspFsvolSetSecurity(
Request->Req.SetSecurity.SecurityInformation = SecurityInformation;
Request->Req.SetSecurity.SecurityDescriptor.Offset = 0;
Request->Req.SetSecurity.SecurityDescriptor.Size = (UINT16)SecurityDescriptorSize;
RtlCopyMemory(Request->Buffer, SecurityDescriptor, SecurityDescriptorSize);
if (SecurityDescriptorRelative)
RtlCopyMemory(
Request->Buffer,
SecurityDescriptor,
SecurityDescriptorSize);
else
RtlAbsoluteToSelfRelativeSD(
SecurityDescriptor,
(PSECURITY_DESCRIPTOR)Request->Buffer,
&SecurityDescriptorSize);
FspFileNodeSetOwner(FileNode, Full, Request);
FspIopRequestContext(Request, RequestFileNode) = FileNode;

View File

@ -304,6 +304,8 @@ function Submit-AssetsToHwapi {
"WINDOWS_v100_ARM64_CO_FULL"
"WINDOWS_v100_X64_NI_FULL"
"WINDOWS_v100_ARM64_NI_FULL"
"WINDOWS_v100_X64_GE_FULL"
"WINDOWS_v100_ARM64_GE_FULL"
)
foreach ($Signature in $DocRequestedSignatures) {
if ($RequestedSignatures -contains $Signature) {

View File

@ -16,7 +16,14 @@ int main()
{
char pass[256];
gets(pass);
fgets(pass, sizeof pass, stdin);
for (char *p = pass; *p; p++)
if ('\n' == *p)
{
*p = '\0';
break;
}
if (0 == strcmp("foobar", pass))
{
puts("OK");