Re: [PATCH v2 0/2] ksmbd: exclude metadata-only opens from sharing checks

From: Ian Bridges

Date: Fri Nov 06 2026 - 07:22:07 EST


Hi Namjae,

Both issues are older than this series. A test that runs smb2_open()
on the base and on v2 gives the same results for each.

The first is about the earlier open. When an open overwrites or
supersedes the file, or creates a named stream, without asking for
FILE_WRITE_DATA, a later open that does not share write is still
checked only against the earlier open's requested access. So it is not
refused, also in the window before the earlier open truncates. v2
counts the implied write for the new open, which is the case you
reported on v1. For the earlier open, v2 uses the implied write only
to decide whether the pair is checked.

The second is about attribute-only stream opens. Such an open that
creates or overwrites a named stream is still skipped against opens
that are not attribute-only, as before. The series keeps that rule
unchanged. In the stream delete check, the base already refused every
stream open without FILE_SHARE_DELETE, so patch 2 gives this open the
same result as before.

So both look like real bugs, but they are separate from what this
series changes. I'd argue that they should be dealt with in separate
patches. But if you prefer, I can look into addressing them as part of
this patch series. I suspect the fixes won't be small, though.

Thanks,
Ian