Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: ChenXiaoSong <chenxiaosong@chenxiaosong.com>
To: Aleksandr Khromov <haa@amicon.ru>,
	linkinjeon@kernel.org, sfrench@samba.org
Cc: senozhatsky@chromium.org, tom@talpey.com,
	linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org, rrv@amicon.ru
Subject: Re: [PATCH] ksmbd: zero the object ID before filling FS_OBJECT_ID_INFORMATION
Date: Fri, 21 Aug 2026 22:34:59 +0800	[thread overview]
Message-ID: <51d4f1ec-381d-4566-a1c8-96fd03e3520d@chenxiaosong.com> (raw)
In-Reply-To: <20260821135801.3790290-1-haa@amicon.ru>

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@chenxiaosong.com>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en


  reply	other threads:[~2026-08-21 14:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 13:58 [PATCH] ksmbd: zero the object ID before filling FS_OBJECT_ID_INFORMATION Aleksandr Khromov
2026-08-21 14:34 ` ChenXiaoSong [this message]
2026-08-24 10:22 ` [PATCH v2 0/3] ksmbd: fix information leaks in smb2_get_info_filesystem() Aleksandr Khromov
2026-08-24 10:22   ` [PATCH v2 1/3] ksmbd: zero the FS_OBJECT_ID_INFORMATION buffer before filling it in Aleksandr Khromov
2026-08-24 12:25     ` Namjae Jeon
2026-08-24 10:22   ` [PATCH v2 2/3] ksmbd: initialize FileSystemControlFlags in FS_CONTROL_INFORMATION Aleksandr Khromov
2026-08-24 12:25     ` Namjae Jeon
2026-08-24 10:22   ` [PATCH v2 3/3] ksmbd: fill in FileSysIdentifier in FS_POSIX_INFORMATION Aleksandr Khromov
2026-08-24 12:10     ` Namjae Jeon
2026-08-24 14:40     ` [PATCH v3] " Aleksandr Khromov
2026-08-25  3:05       ` Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51d4f1ec-381d-4566-a1c8-96fd03e3520d@chenxiaosong.com \
    --to=chenxiaosong@chenxiaosong.com \
    --cc=haa@amicon.ru \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=rrv@amicon.ru \
    --cc=senozhatsky@chromium.org \
    --cc=sfrench@samba.org \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox