* [PATCH] cifs: add check for returning value of SMB2_set_info_init
@ 2022-11-16 14:10 Anastasia Belova
2022-11-16 18:28 ` Steve French
2022-11-18 14:51 ` Paulo Alcantara
0 siblings, 2 replies; 3+ messages in thread
From: Anastasia Belova @ 2022-11-16 14:10 UTC (permalink / raw)
To: Steve French
Cc: Anastasia Belova, Paulo Alcantara, Ronnie Sahlberg,
Shyam Prasad N, Tom Talpey, linux-cifs, samba-technical,
linux-kernel, lvc-project
If the returning value of SMB2_set_info_init is an error-value,
exit the function.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 0967e5457954 ("cifs: use a compound for setting an xattr")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
---
fs/cifs/smb2ops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 880cd494afea..c77e49b3fcc6 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1116,6 +1116,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
COMPOUND_FID, current->tgid,
FILE_FULL_EA_INFORMATION,
SMB2_O_INFO_FILE, 0, data, size);
+ if (rc)
+ goto sea_exit;
smb2_set_next_command(tcon, &rqst[1]);
smb2_set_related(&rqst[1]);
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: add check for returning value of SMB2_set_info_init
2022-11-16 14:10 [PATCH] cifs: add check for returning value of SMB2_set_info_init Anastasia Belova
@ 2022-11-16 18:28 ` Steve French
2022-11-18 14:51 ` Paulo Alcantara
1 sibling, 0 replies; 3+ messages in thread
From: Steve French @ 2022-11-16 18:28 UTC (permalink / raw)
To: Anastasia Belova
Cc: Steve French, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N,
Tom Talpey, linux-cifs, samba-technical, linux-kernel,
lvc-project
merged into cifs-2.6.git for-next
On Wed, Nov 16, 2022 at 8:26 AM Anastasia Belova <abelova@astralinux.ru> wrote:
>
> If the returning value of SMB2_set_info_init is an error-value,
> exit the function.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 0967e5457954 ("cifs: use a compound for setting an xattr")
>
> Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
> ---
> fs/cifs/smb2ops.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 880cd494afea..c77e49b3fcc6 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1116,6 +1116,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
> COMPOUND_FID, current->tgid,
> FILE_FULL_EA_INFORMATION,
> SMB2_O_INFO_FILE, 0, data, size);
> + if (rc)
> + goto sea_exit;
> smb2_set_next_command(tcon, &rqst[1]);
> smb2_set_related(&rqst[1]);
>
> --
> 2.30.2
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: add check for returning value of SMB2_set_info_init
2022-11-16 14:10 [PATCH] cifs: add check for returning value of SMB2_set_info_init Anastasia Belova
2022-11-16 18:28 ` Steve French
@ 2022-11-18 14:51 ` Paulo Alcantara
1 sibling, 0 replies; 3+ messages in thread
From: Paulo Alcantara @ 2022-11-18 14:51 UTC (permalink / raw)
To: Anastasia Belova, Steve French
Cc: Anastasia Belova, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
linux-cifs, samba-technical, linux-kernel, lvc-project
Anastasia Belova <abelova@astralinux.ru> writes:
> If the returning value of SMB2_set_info_init is an error-value,
> exit the function.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 0967e5457954 ("cifs: use a compound for setting an xattr")
>
> Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
> ---
> fs/cifs/smb2ops.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-18 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16 14:10 [PATCH] cifs: add check for returning value of SMB2_set_info_init Anastasia Belova
2022-11-16 18:28 ` Steve French
2022-11-18 14:51 ` Paulo Alcantara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox