From: Pavel Machek <pavel@denx.de>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Steve French <stfrench@microsoft.com>,
kernel test robot <lkp@intel.com>,
Dan Carpenter <error27@gmail.com>,
pc@cjr.nz, pc@manguebit.com, ematsumiya@suse.de,
lsahlber@redhat.com, sprasad@microsoft.com, vl@samba.org,
metze@samba.org
Subject: Re: [PATCH AUTOSEL 6.1 07/16] smb3: missing null check in SMB2_change_notify
Date: Fri, 16 Jun 2023 21:39:28 +0200 [thread overview]
Message-ID: <ZIy6cGtTFLZ5emr3@duo.ucw.cz> (raw)
In-Reply-To: <20230615113816.649135-7-sashal@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
Hi!
> From: Steve French <stfrench@microsoft.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@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Closes: https://lore.kernel.org/all/202305251831.3V1gbbFs-lkp@intel.com/
> Signed-off-by: Steve French <stfrench@microsoft.com>
> Signed-off-by: Sasha Levin <sashal@kernel.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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2023-06-16 19:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 11:38 [PATCH AUTOSEL 6.1 01/16] regmap: Account for register length when chunking Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 02/16] iommu/amd: Handle GALog overflows Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 03/16] scsi: target: iscsi: Prevent login threads from racing between each other Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 04/16] HID: google: add jewel USB id Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 05/16] HID: wacom: Add error check to wacom_parse_and_register() Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 06/16] arm64: Add missing Set/Way CMO encodings Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 07/16] smb3: missing null check in SMB2_change_notify Sasha Levin
2023-06-16 19:39 ` Pavel Machek [this message]
2023-06-20 14:44 ` Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 08/16] media: cec: core: disable adapter in cec_devnode_unregister Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 09/16] media: cec: core: don't set last_initiator if tx in progress Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 10/16] nfcsim.c: Fix error checking for debugfs_create_dir Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 11/16] btrfs: fix an uninitialized variable warning in btrfs_log_inode Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 12/16] usb: gadget: udc: fix NULL dereference in remove() Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 13/16] nvme: double KA polling frequency to avoid KATO with TBKAS on Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 14/16] nvme: check IO start time when deciding to defer KA Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 15/16] ext4: enable the lazy init thread when remounting read/write Sasha Levin
2023-06-15 11:38 ` [PATCH AUTOSEL 6.1 16/16] nvme: improve handling of long keep alives Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZIy6cGtTFLZ5emr3@duo.ucw.cz \
--to=pavel@denx.de \
--cc=ematsumiya@suse.de \
--cc=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lsahlber@redhat.com \
--cc=metze@samba.org \
--cc=pc@cjr.nz \
--cc=pc@manguebit.com \
--cc=sashal@kernel.org \
--cc=sprasad@microsoft.com \
--cc=stable@vger.kernel.org \
--cc=stfrench@microsoft.com \
--cc=vl@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®