lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKYAXd-E2sSk-8Kw3uZPm-CH8KSr8h0fcCvjFm2YK3eyN1BC3g@mail.gmail.com>
Date: Sat, 15 Nov 2025 16:41:18 +0900
From: Namjae Jeon <linkinjeon@...nel.org>
To: chenxiaosong.chenxiaosong@...ux.dev
Cc: sfrench@...ba.org, smfrench@...il.com, linkinjeon@...ba.org, 
	christophe.jaillet@...adoo.fr, linux-cifs@...r.kernel.org, 
	linux-kernel@...r.kernel.org, chenxiaosong@...nxiaosong.com, 
	ChenXiaoSong <chenxiaosong@...inos.cn>
Subject: Re: [PATCH v7 2/2] smb: move FILE_SYSTEM_ATTRIBUTE_INFO to common/fscc.h

On Thu, Nov 13, 2025 at 10:34 PM <chenxiaosong.chenxiaosong@...ux.dev> wrote:
>
> From: ChenXiaoSong <chenxiaosong@...inos.cn>
>
> Modify the following places:
>
>   - struct filesystem_attribute_info -> FILE_SYSTEM_ATTRIBUTE_INFO
>   - client: remove MIN_FS_ATTR_INFO_SIZE definition,
>             MIN_FS_ATTR_INFO_SIZE -> sizeof(FILE_SYSTEM_ATTRIBUTE_INFO)
>
> Then move FILE_SYSTEM_ATTRIBUTE_INFO to common header file.
>
> Suggested-by: Namjae Jeon <linkinjeon@...nel.org>
> Signed-off-by: ChenXiaoSong <chenxiaosong@...inos.cn>
> ---
>  fs/smb/client/cifspdu.h    | 10 ----------
>  fs/smb/client/smb2pdu.c    |  2 +-
>  fs/smb/common/fscc.h       |  8 ++++++++
>  fs/smb/server/smb2pdu.c    |  6 +++---
>  fs/smb/server/smb_common.h |  7 -------
>  5 files changed, 12 insertions(+), 21 deletions(-)
>
> diff --git a/fs/smb/client/cifspdu.h b/fs/smb/client/cifspdu.h
> index d84e10b1477f..49f35cb3cf2e 100644
> --- a/fs/smb/client/cifspdu.h
> +++ b/fs/smb/client/cifspdu.h
> @@ -2068,16 +2068,6 @@ typedef struct {
>  #define FILE_PORTABLE_DEVICE                   0x00004000
>  #define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000
>
> -/* minimum includes first three fields, and empty FS Name */
> -#define MIN_FS_ATTR_INFO_SIZE 12
> -
> -typedef struct {
> -       __le32 Attributes;
> -       __le32 MaxPathNameComponentLength;
> -       __le32 FileSystemNameLen;
> -       char FileSystemName[52]; /* do not have to save this - get subset? */
> -} __attribute__((packed)) FILE_SYSTEM_ATTRIBUTE_INFO;
> -
>  /******************************************************************************/
>  /* QueryFileInfo/QueryPathinfo (also for SetPath/SetFile) data buffer formats */
>  /******************************************************************************/
> diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
> index 30c391424022..4ccc8d1e130d 100644
> --- a/fs/smb/client/smb2pdu.c
> +++ b/fs/smb/client/smb2pdu.c
> @@ -5982,7 +5982,7 @@ SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon,
>                 min_len = sizeof(FILE_SYSTEM_DEVICE_INFO);
>         } else if (level == FS_ATTRIBUTE_INFORMATION) {
>                 max_len = sizeof(FILE_SYSTEM_ATTRIBUTE_INFO);
> -               min_len = MIN_FS_ATTR_INFO_SIZE;
> +               min_len = sizeof(FILE_SYSTEM_ATTRIBUTE_INFO);
FILE_SYSTEM_ATTRIBUTE_INFO is being used elsewhere on the smb client,
and there are cases where sizeof(FILE_SYSTEM_ATTRIBUTE_INFO) is being
used. Will there really be no problems if we change it to flex-array?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ