Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fbc2211 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "crypto: msm: Fix issues related to non-zero byteoffset input"

parents 3f0d02d1 3e88ed60
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1339,7 +1339,7 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq,
				areq->cipher_op_req.vbuf.src[0].len))
		return -EFAULT;

	k_align_src += areq->cipher_op_req.vbuf.src[0].len;
	k_align_src += byteoffset + areq->cipher_op_req.vbuf.src[0].len;

	for (i = 1; i < areq->cipher_op_req.entries; i++) {
		user_src =
@@ -1696,6 +1696,13 @@ static int qcedev_check_cipher_params(struct qcedev_cipher_op_req *req,
			goto error;
		}
	}

	if (req->data_len < req->byteoffset) {
		pr_err("%s: req data length %u is less than byteoffset %u\n",
				__func__, req->data_len, req->byteoffset);
		goto error;
	}

	/* Ensure zer ivlen for ECB  mode  */
	if (req->ivlen > 0) {
		if ((req->mode == QCEDEV_AES_MODE_ECB) ||