From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D25F31DDCE; Tue, 16 Jul 2024 15:57:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721145478; cv=none; b=Bcxbvfp0kN9PqeBljn6jQySBL9K1eVZjly9WukyfHVH/UvMSJvOzNMxNCRGddob/bMhhgFSTXz3oRKRI1wsMknuhnZDgz/0De8A8WblinD9AKZjr07kEOgVUna2bd0oHlu6Eot4MnNeqoEleQv+s90uDvocxep3unDfLzNaoG9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721145478; c=relaxed/simple; bh=bZlItLHhCmbpaEhx0R0geBZh6v7pSnGoQSlEj2UxELI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oobWEE9caE4bhCNbcWO3Ej95TblpoaTVoy1JyEeXDMDPRhWhus/Rb2sK3BdpQa1eXQptLQseKbDVgDMaKuhNwt7dpqhFhLVVGoLlEr/huOPkCGmCh5qg0wS47spZxrKOLoQCDAPAV+1fConYkJ1rshvaOJZvxH8+yVqgyeXi7dM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1bIgRpZ9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1bIgRpZ9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12EBFC116B1; Tue, 16 Jul 2024 15:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721145478; bh=bZlItLHhCmbpaEhx0R0geBZh6v7pSnGoQSlEj2UxELI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1bIgRpZ9JyNA9dwOm9iB4kTFUL4NdXWgOzFcE7pt+m4qmBbAP4fatQF6BJlw4MTTX 3APgLKzsmgx10k6nKqT9s896bL2aHFr2QzHkaqIPa3DDKRqqsEaLzxct7tgcjHpKu9 KLOKS87L5M/YP2CNslFuLkpKIFV2Sij5GObsU2l4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Ekansh Gupta , Dmitry Baryshkov , Caleb Connolly , Srinivas Kandagatla Subject: [PATCH 6.1 79/96] misc: fastrpc: Copy the complete capability structure to user Date: Tue, 16 Jul 2024 17:32:30 +0200 Message-ID: <20240716152749.550944790@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240716152746.516194097@linuxfoundation.org> References: <20240716152746.516194097@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ekansh Gupta commit e7f0be3f09c6e955dc8009129862b562d8b64513 upstream. User is passing capability ioctl structure(argp) to get DSP capabilities. This argp is copied to a local structure to get domain and attribute_id information. After getting the capability, only capability value is getting copied to user argp which will not be useful if the use is trying to get the capability by checking the capability member of fastrpc_ioctl_capability structure. Copy the complete capability structure so that user can get the capability value from the expected member of the structure. Fixes: 6c16fd8bdd40 ("misc: fastrpc: Add support to get DSP capabilities") Cc: stable Signed-off-by: Ekansh Gupta Reviewed-by: Dmitry Baryshkov Reviewed-by: Caleb Connolly Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240628114501.14310-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/misc/fastrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1603,7 +1603,7 @@ static int fastrpc_get_dsp_info(struct f if (err) return err; - if (copy_to_user(argp, &cap.capability, sizeof(cap.capability))) + if (copy_to_user(argp, &cap, sizeof(cap))) return -EFAULT; return 0;