* [PATCH] smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV
@ 2026-08-20 21:22 Frank Sorenson
2026-08-20 23:53 ` Namjae Jeon
2026-08-21 17:05 ` Paulo Alcantara
0 siblings, 2 replies; 3+ messages in thread
From: Frank Sorenson @ 2026-08-20 21:22 UTC (permalink / raw)
To: linux-cifs; +Cc: pc, linkinjeon, stable
The LXDEV block in cifs_query_path_info() uses SMB2_WSL_XATTR_MODE_SIZE
(4) instead of SMB2_WSL_XATTR_DEV_SIZE (8), undercounting eas_len by 4
bytes per $LXDEV EA.
eas_len is used only as a zero/non-zero presence flag so there is no
current functional impact, but the value is incorrect and misleading.
Fixes: 97db41604555 ("smb: client: parse uid, gid, mode and dev from WSL reparse points")
Cc: stable@vger.kernel.org
Cc: Paulo Alcantara <pc@manguebit.org>
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
---
fs/smb/client/smb1ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c
index 7e2b29060f51..3ac4126267f6 100644
--- a/fs/smb/client/smb1ops.c
+++ b/fs/smb/client/smb1ops.c
@@ -721,7 +721,7 @@ static int cifs_query_path_info(const unsigned int xid,
ea->ea_value_length = cpu_to_le16(SMB2_WSL_XATTR_DEV_SIZE);
memcpy(&ea->ea_data[0], SMB2_WSL_XATTR_DEV, SMB2_WSL_XATTR_NAME_LEN + 1);
data->wsl.eas_len += ALIGN(sizeof(*ea) + SMB2_WSL_XATTR_NAME_LEN + 1 +
- SMB2_WSL_XATTR_MODE_SIZE, 4);
+ SMB2_WSL_XATTR_DEV_SIZE, 4);
rc = 0;
} else if (rc >= 0) {
/* It is an error if EA $LXDEV has wrong size. */
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV
2026-08-20 21:22 [PATCH] smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV Frank Sorenson
@ 2026-08-20 23:53 ` Namjae Jeon
2026-08-21 17:05 ` Paulo Alcantara
1 sibling, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2026-08-20 23:53 UTC (permalink / raw)
To: Frank Sorenson; +Cc: linux-cifs, pc, stable
On Fri, Aug 21, 2026 at 6:22 AM Frank Sorenson <sorenson@redhat.com> wrote:
>
> The LXDEV block in cifs_query_path_info() uses SMB2_WSL_XATTR_MODE_SIZE
> (4) instead of SMB2_WSL_XATTR_DEV_SIZE (8), undercounting eas_len by 4
> bytes per $LXDEV EA.
>
> eas_len is used only as a zero/non-zero presence flag so there is no
> current functional impact, but the value is incorrect and misleading.
>
> Fixes: 97db41604555 ("smb: client: parse uid, gid, mode and dev from WSL reparse points")
> Cc: stable@vger.kernel.org
> Cc: Paulo Alcantara <pc@manguebit.org>
> Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV
2026-08-20 21:22 [PATCH] smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV Frank Sorenson
2026-08-20 23:53 ` Namjae Jeon
@ 2026-08-21 17:05 ` Paulo Alcantara
1 sibling, 0 replies; 3+ messages in thread
From: Paulo Alcantara @ 2026-08-21 17:05 UTC (permalink / raw)
To: Frank Sorenson, linux-cifs; +Cc: linkinjeon, stable
Frank Sorenson <sorenson@redhat.com> writes:
> The LXDEV block in cifs_query_path_info() uses SMB2_WSL_XATTR_MODE_SIZE
> (4) instead of SMB2_WSL_XATTR_DEV_SIZE (8), undercounting eas_len by 4
> bytes per $LXDEV EA.
>
> eas_len is used only as a zero/non-zero presence flag so there is no
> current functional impact, but the value is incorrect and misleading.
> ...
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-21 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 21:22 [PATCH] smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV Frank Sorenson
2026-08-20 23:53 ` Namjae Jeon
2026-08-21 17:05 ` Paulo Alcantara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).