* [PATCH] cifs: add check for returning value of SMB2_close_init
@ 2022-11-15 14:27 Anastasia Belova
2022-11-15 18:59 ` Steve French
2022-11-18 14:51 ` Paulo Alcantara
0 siblings, 2 replies; 3+ messages in thread
From: Anastasia Belova @ 2022-11-15 14:27 UTC (permalink / raw)
To: Steve French
Cc: Anastasia Belova, Paulo Alcantara, Ronnie Sahlberg,
Shyam Prasad N, Tom Talpey, Aurelien Aptel, linux-cifs,
samba-technical, linux-kernel, lvc-project
If the returning value of SMB2_close_init is an error-value,
exit the function.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 352d96f3acc6 ("cifs: multichannel: move channel selection above transport layer")
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..9737296c0fbc 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1126,6 +1126,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
rqst[2].rq_nvec = 1;
rc = SMB2_close_init(tcon, server,
&rqst[2], COMPOUND_FID, COMPOUND_FID, false);
+ if (rc)
+ goto sea_exit;
smb2_set_related(&rqst[2]);
rc = compound_send_recv(xid, ses, server,
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cifs: add check for returning value of SMB2_close_init
2022-11-15 14:27 [PATCH] cifs: add check for returning value of SMB2_close_init Anastasia Belova
@ 2022-11-15 18:59 ` Steve French
2022-11-18 14:51 ` Paulo Alcantara
1 sibling, 0 replies; 3+ messages in thread
From: Steve French @ 2022-11-15 18:59 UTC (permalink / raw)
To: Anastasia Belova
Cc: Steve French, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N,
Tom Talpey, Aurelien Aptel, linux-cifs, samba-technical,
linux-kernel, lvc-project
good catch.
merged into cifs-2.6.git for-next
On Tue, Nov 15, 2022 at 8:41 AM Anastasia Belova <abelova@astralinux.ru> wrote:
>
> If the returning value of SMB2_close_init is an error-value,
> exit the function.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 352d96f3acc6 ("cifs: multichannel: move channel selection above transport layer")
>
> 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..9737296c0fbc 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1126,6 +1126,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
> rqst[2].rq_nvec = 1;
> rc = SMB2_close_init(tcon, server,
> &rqst[2], COMPOUND_FID, COMPOUND_FID, false);
> + if (rc)
> + goto sea_exit;
> smb2_set_related(&rqst[2]);
>
> rc = compound_send_recv(xid, ses, server,
> --
> 2.30.2
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cifs: add check for returning value of SMB2_close_init
2022-11-15 14:27 [PATCH] cifs: add check for returning value of SMB2_close_init Anastasia Belova
2022-11-15 18:59 ` 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,
Aurelien Aptel, linux-cifs, samba-technical, linux-kernel,
lvc-project
Anastasia Belova <abelova@astralinux.ru> writes:
> If the returning value of SMB2_close_init is an error-value,
> exit the function.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 352d96f3acc6 ("cifs: multichannel: move channel selection above transport layer")
>
> 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-15 14:27 [PATCH] cifs: add check for returning value of SMB2_close_init Anastasia Belova
2022-11-15 18:59 ` 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