public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Steve French <stfrench@microsoft.com>,
	Stefan Metzmacher <metze@samba.org>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org
Subject: [PATCH AUTOSEL 4.14 20/21] SMB3: incorrect file id in requests compounded with open
Date: Mon, 24 May 2021 10:50:39 -0400	[thread overview]
Message-ID: <20210524145040.2499322-20-sashal@kernel.org> (raw)
In-Reply-To: <20210524145040.2499322-1-sashal@kernel.org>

From: Steve French <stfrench@microsoft.com>

[ Upstream commit c0d46717b95735b0eacfddbcca9df37a49de9c7a ]

See MS-SMB2 3.2.4.1.4, file ids in compounded requests should be set to
0xFFFFFFFFFFFFFFFF (we were treating it as u32 not u64 and setting
it incorrectly).

Signed-off-by: Steve French <stfrench@microsoft.com>
Reported-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/cifs/smb2pdu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 2097b5fd51ba..77a9aeaf2cb1 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -2518,10 +2518,10 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
 			 * Related requests use info from previous read request
 			 * in chain.
 			 */
-			shdr->SessionId = 0xFFFFFFFF;
+			shdr->SessionId = 0xFFFFFFFFFFFFFFFF;
 			shdr->TreeId = 0xFFFFFFFF;
-			req->PersistentFileId = 0xFFFFFFFF;
-			req->VolatileFileId = 0xFFFFFFFF;
+			req->PersistentFileId = 0xFFFFFFFFFFFFFFFF;
+			req->VolatileFileId = 0xFFFFFFFFFFFFFFFF;
 		}
 	}
 	if (remaining_bytes > io_parms->length)
-- 
2.30.2


  parent reply	other threads:[~2021-05-24 15:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 14:50 [PATCH AUTOSEL 4.14 01/21] platform/x86: hp_accel: Avoid invoking _INI to speed up resume Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 02/21] serial: max310x: unregister uart driver in case of failure and abort Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 03/21] net: fujitsu: fix potential null-ptr-deref Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 04/21] net: caif: remove BUG_ON(dev == NULL) in caif_xmit Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 05/21] char: hpet: add checks after calling ioremap Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 06/21] ALSA: sb8: Add a comment note regarding an unused pointer Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 07/21] isdn: mISDNinfineon: check/cleanup ioremap failure correctly in setup_io Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 08/21] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd() Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 09/21] dmaengine: qcom_hidma: comment platform_driver_register call Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 10/21] libertas: register sysfs groups properly Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 11/21] media: dvb: Add check on sp8870_readreg return Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 12/21] media: gspca: mt9m111: Check write_bridge for timeout Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 13/21] media: gspca: properly check for errors in po1030_probe() Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 14/21] cdrom: gdrom: initialize global variable at init time Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 15/21] scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 16/21] openrisc: Define memory barrier mb Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 17/21] btrfs: do not BUG_ON in link_to_fixup_dir Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 18/21] platform/x86: hp-wireless: add AMD's hardware id to the supported list Sasha Levin
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 19/21] platform/x86: intel_punit_ipc: Append MODULE_DEVICE_TABLE for ACPI Sasha Levin
2021-05-24 14:50 ` Sasha Levin [this message]
2021-05-24 14:50 ` [PATCH AUTOSEL 4.14 21/21] drm/amdgpu: Fix a use-after-free 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=20210524145040.2499322-20-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=samba-technical@lists.samba.org \
    --cc=sprasad@microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=stfrench@microsoft.com \
    /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