Unverified Commit 0b8f0d9d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14473 smb: client: fix NULL ptr deref in crypto_aead_setkey()

parents ff58f8a1 b4f579c8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -963,7 +963,9 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
	 * SMB3.0 supports only 1 cipher and doesn't have a encryption neg context
	 * Set the cipher type manually.
	 */
	if (server->dialect == SMB30_PROT_ID && (server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION))
	if ((server->dialect == SMB30_PROT_ID ||
	     server->dialect == SMB302_PROT_ID) &&
	    (server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION))
		server->cipher_type = SMB2_ENCRYPTION_AES128_CCM;

	security_blob = smb2_get_data_area_len(&blob_offset, &blob_length,