<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/smb/client/reparse.c, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-10-10T10:00:12Z</updated>
<entry>
<title>cifs: Do not convert delimiter when parsing NFS-style symlinks</title>
<updated>2024-10-10T10:00:12Z</updated>
<author>
<name>Pali Rohár</name>
</author>
<published>2024-09-28T21:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7609b0257cdd61e310503efbf2e321b9e2e405ca'/>
<id>urn:sha1:7609b0257cdd61e310503efbf2e321b9e2e405ca</id>
<content type='text'>
[ Upstream commit d3a49f60917323228f8fdeee313260ef14f94df7 ]

NFS-style symlinks have target location always stored in NFS/UNIX form
where backslash means the real UNIX backslash and not the SMB path
separator.

So do not mangle slash and backslash content of NFS-style symlink during
readlink() syscall as it is already in the correct Linux form.

This fixes interoperability of NFS-style symlinks with backslashes created
by Linux NFS3 client throw Windows NFS server and retrieved by Linux SMB
client throw Windows SMB server, where both Windows servers exports the
same directory.

Fixes: d5ecebc4900d ("smb3: Allow query of symlinks stored as reparse points")
Acked-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: Fix buffer overflow when parsing NFS reparse points</title>
<updated>2024-10-10T10:00:12Z</updated>
<author>
<name>Pali Rohár</name>
</author>
<published>2024-09-29T10:22:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=803b3a39cb096d8718c0aebc03fd19f11c7dc919'/>
<id>urn:sha1:803b3a39cb096d8718c0aebc03fd19f11c7dc919</id>
<content type='text'>
[ Upstream commit e2a8910af01653c1c268984855629d71fb81f404 ]

ReparseDataLength is sum of the InodeType size and DataBuffer size.
So to get DataBuffer size it is needed to subtract InodeType's size from
ReparseDataLength.

Function cifs_strndup_from_utf16() is currentlly accessing buf-&gt;DataBuffer
at position after the end of the buffer because it does not subtract
InodeType size from the length. Fix this problem and correctly subtract
variable len.

Member InodeType is present only when reparse buffer is large enough. Check
for ReparseDataLength before accessing InodeType to prevent another invalid
memory access.

Major and minor rdev values are present also only when reparse buffer is
large enough. Check for reparse buffer size before calling reparse_mkdev().

Fixes: d5ecebc4900d ("smb3: Allow query of symlinks stored as reparse points")
Reviewed-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb: client: ignore unhandled reparse tags</title>
<updated>2024-08-29T15:36:06Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2024-08-21T03:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cda2ad784ffcab5c196203ac730b4a15884e4404'/>
<id>urn:sha1:cda2ad784ffcab5c196203ac730b4a15884e4404</id>
<content type='text'>
[ Upstream commit ec686804117a0421cf31d54427768aaf93aa0069 ]

Just ignore reparse points that the client can't parse rather than
bailing out and not opening the file or directory.

Reported-by: Marc &lt;1marc1@gmail.com&gt;
Closes: https://lore.kernel.org/r/CAMHwNVv-B+Q6wa0FEXrAuzdchzcJRsPKDDRrNaYZJd6X-+iJzw@mail.gmail.com
Fixes: 539aad7f14da ("smb: client: introduce -&gt;parse_reparse_point()")
Tested-by: Anthony Nandaa (Microsoft) &lt;profnandaa@gmail.com&gt;
Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb: client: handle lack of FSCTL_GET_REPARSE_POINT support</title>
<updated>2024-08-14T13:34:01Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2024-07-31T13:23:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e82abbb5539360e6ce456871243d19e089df138'/>
<id>urn:sha1:3e82abbb5539360e6ce456871243d19e089df138</id>
<content type='text'>
[ Upstream commit 4b96024ef2296b1d323af327cae5e52809b61420 ]

As per MS-FSA 2.1.5.10.14, support for FSCTL_GET_REPARSE_POINT is
optional and if the server doesn't support it,
STATUS_INVALID_DEVICE_REQUEST must be returned for the operation.

If we find files with reparse points and we can't read them due to
lack of client or server support, just ignore it and then treat them
as regular files or junctions.

Fixes: 5f71ebc41294 ("smb: client: parse reparse point flag in create response")
Reported-by: Sebastian Steinbeisser &lt;Sebastian.Steinbeisser@lrz.de&gt;
Tested-by: Sebastian Steinbeisser &lt;Sebastian.Steinbeisser@lrz.de&gt;
Acked-by: Tom Talpey &lt;tom@talpey.com&gt;
Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb: client: set correct d_type for reparse DFS/DFSR and mount point</title>
<updated>2024-03-11T00:33:58Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2024-02-02T16:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bd25b61c5a55bc769c6608e9ce95860759acdcb'/>
<id>urn:sha1:8bd25b61c5a55bc769c6608e9ce95860759acdcb</id>
<content type='text'>
Set correct dirent-&gt;d_type for IO_REPARSE_TAG_DFS{,R} and
IO_REPARSE_TAG_MOUNT_POINT reparse points.

Signed-off-by: Paulo Alcantara &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: parse uid, gid, mode and dev from WSL reparse points</title>
<updated>2024-03-11T00:33:58Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2024-01-29T00:52:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78e26bec4d6d3aef04276e28bed48a45fd00e116'/>
<id>urn:sha1:78e26bec4d6d3aef04276e28bed48a45fd00e116</id>
<content type='text'>
Parse the extended attributes from WSL reparse points to correctly
report uid, gid mode and dev from ther instantiated inodes.

Signed-off-by: Paulo Alcantara &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: introduce SMB2_OP_QUERY_WSL_EA</title>
<updated>2024-03-11T00:33:58Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2024-01-28T04:12:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea41367b2a602f602ea6594fc4a310520dcc64f4'/>
<id>urn:sha1:ea41367b2a602f602ea6594fc4a310520dcc64f4</id>
<content type='text'>
Add a new command to smb2_compound_op() for querying WSL extended
attributes from reparse points.

Signed-off-by: Paulo Alcantara &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs()</title>
<updated>2024-03-11T00:33:58Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2024-01-31T07:10:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0e1e09b2c41d383a2483f2ee5227b724860ced1'/>
<id>urn:sha1:e0e1e09b2c41d383a2483f2ee5227b724860ced1</id>
<content type='text'>
This was intended to be an IS_ERR() check.  The ea_create_context()
function doesn't return NULL.

Fixes: 1eab17fe485c ("smb: client: add support for WSL reparse points")
Reviewed-by: Paulo Alcantara &lt;pc@manguebit.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: add support for WSL reparse points</title>
<updated>2024-03-11T00:33:58Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2024-01-26T22:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49'/>
<id>urn:sha1:5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49</id>
<content type='text'>
Add support for creating special files via WSL reparse points when
using 'reparse=wsl' mount option.  They're faster than NFS reparse
points because they don't require extra roundtrips to figure out what
-&gt;d_type a specific dirent is as such information is already stored in
query dir responses and then making getdents() calls faster.

Signed-off-by: Paulo Alcantara &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: move most of reparse point handling code to common file</title>
<updated>2024-03-11T00:33:57Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2024-03-06T05:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c520ba7573a84bd37f8803a3beeb8f6f995bf9e1'/>
<id>urn:sha1:c520ba7573a84bd37f8803a3beeb8f6f995bf9e1</id>
<content type='text'>
In preparation to add support for creating special files also via WSL
reparse points in next commits.

Signed-off-by: Paulo Alcantara &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
