Re: [PATCH] ksmbd: zero the object ID before filling FS_OBJECT_ID_INFORMATION

ChenXiaoSong <[email protected]>
Newsgroups org.kernel.vger.linux-cifs,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.