Re: [PATCH] ksmbd: zero the object ID before filling FS_OBJECT_ID_INFORMATION
From: ChenXiaoSong
Date: Fri Aug 21 2026 - 10:41:09 EST
Should we clear `info`? Will `info->extended_info.version_string` also leak?
```
7437 case FS_OBJECT_ID_INFORMATION:
7438 {
7439 struct object_id_info *info;
7440
7441 info = (struct object_id_info *)(rsp->Buffer);
...
7454 memcpy(info->extended_info.version_string, "1.1.0", strlen("1.1.0"));
7455 rsp->OutputBufferLength = cpu_to_le32(64);
...
7458 }
```
On 8/21/2026 9:58 PM, Aleksandr Khromov wrote:
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -6093,6 +6093,7 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
info = (struct object_id_info *)(rsp->Buffer);
+ memset(info->objid, 0, sizeof(info->objid));
if (path.mnt->mnt_sb->s_uuid_len == 16)
memcpy(info->objid, path.mnt->mnt_sb->s_uuid.b,
path.mnt->mnt_sb->s_uuid_len);
--
ChenXiaoSong <chenxiaosong@xxxxxxxxxxxxxxxx>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en