[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIy6cGtTFLZ5emr3@duo.ucw.cz>
Date: Fri, 16 Jun 2023 21:39:28 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Steve French <stfrench@...rosoft.com>,
kernel test robot <lkp@...el.com>,
Dan Carpenter <error27@...il.com>, pc@....nz, pc@...guebit.com,
ematsumiya@...e.de, lsahlber@...hat.com, sprasad@...rosoft.com,
vl@...ba.org, metze@...ba.org
Subject: Re: [PATCH AUTOSEL 6.1 07/16] smb3: missing null check in
SMB2_change_notify
Hi!
> From: Steve French <stfrench@...rosoft.com>
>
> [ Upstream commit b535cc796a4b4942cd189652588e8d37c1f5925a ]
>
> If plen is null when passed in, we only checked for null
> in one of the two places where it could be used. Although
> plen is always valid (not null) for current callers of the
> SMB2_change_notify function, this change makes it more consistent.
Changelog explains problem can not happen, so... is this important
enough to backport?
Best regards,
Pavel
> Reported-by: kernel test robot <lkp@...el.com>
> Reported-by: Dan Carpenter <error27@...il.com>
> Closes: https://lore.kernel.org/all/202305251831.3V1gbbFs-lkp@intel.com/
> Signed-off-by: Steve French <stfrench@...rosoft.com>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
> fs/cifs/smb2pdu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index 537e8679900b8..3ca593cdda76e 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -3779,7 +3779,7 @@ SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon,
> if (*out_data == NULL) {
> rc = -ENOMEM;
> goto cnotify_exit;
> - } else
> + } else if (plen)
> *plen = le32_to_cpu(smb_rsp->OutputBufferLength);
> }
>
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists