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]
Date:   Sun, 1 Oct 2023 14:59:01 -0500
From:   Steve French <smfrench@...il.com>
To:     Wedson Almeida Filho <wedsonaf@...il.com>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Wedson Almeida Filho <walmeida@...rosoft.com>,
        Steve French <sfrench@...ba.org>,
        Paulo Alcantara <pc@...guebit.com>,
        Ronnie Sahlberg <lsahlber@...hat.com>,
        Shyam Prasad N <sprasad@...rosoft.com>,
        Tom Talpey <tom@...pey.com>, linux-cifs@...r.kernel.org
Subject: Re: [PATCH 23/29] smb: move cifs_xattr_handlers to .rodata

Reviewed-by: Steve French <stfrench@...rosoft.com>

On Sat, Sep 30, 2023 at 6:27 AM Wedson Almeida Filho <wedsonaf@...il.com> wrote:
>
> From: Wedson Almeida Filho <walmeida@...rosoft.com>
>
> This makes it harder for accidental or malicious changes to
> cifs_xattr_handlers at runtime.
>
> Cc: Steve French <sfrench@...ba.org>
> Cc: Paulo Alcantara <pc@...guebit.com>
> Cc: Ronnie Sahlberg <lsahlber@...hat.com>
> Cc: Shyam Prasad N <sprasad@...rosoft.com>
> Cc: Tom Talpey <tom@...pey.com>
> Cc: linux-cifs@...r.kernel.org
> Signed-off-by: Wedson Almeida Filho <walmeida@...rosoft.com>
> ---
>  fs/smb/client/cifsfs.h | 2 +-
>  fs/smb/client/xattr.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/smb/client/cifsfs.h b/fs/smb/client/cifsfs.h
> index 15c8cc4b6680..a0472b539567 100644
> --- a/fs/smb/client/cifsfs.h
> +++ b/fs/smb/client/cifsfs.h
> @@ -134,7 +134,7 @@ extern int cifs_symlink(struct mnt_idmap *idmap, struct inode *inode,
>                         struct dentry *direntry, const char *symname);
>
>  #ifdef CONFIG_CIFS_XATTR
> -extern const struct xattr_handler *cifs_xattr_handlers[];
> +extern const struct xattr_handler * const cifs_xattr_handlers[];
>  extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
>  #else
>  # define cifs_xattr_handlers NULL
> diff --git a/fs/smb/client/xattr.c b/fs/smb/client/xattr.c
> index 4ad5531686d8..ac199160bce6 100644
> --- a/fs/smb/client/xattr.c
> +++ b/fs/smb/client/xattr.c
> @@ -478,7 +478,7 @@ static const struct xattr_handler smb3_ntsd_full_xattr_handler = {
>         .set = cifs_xattr_set,
>  };
>
> -const struct xattr_handler *cifs_xattr_handlers[] = {
> +const struct xattr_handler * const cifs_xattr_handlers[] = {
>         &cifs_user_xattr_handler,
>         &cifs_os2_xattr_handler,
>         &cifs_cifs_acl_xattr_handler,
> --
> 2.34.1
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ