From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70439C433E0 for ; Tue, 23 Jun 2020 11:54:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CADF20738 for ; Tue, 23 Jun 2020 11:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592913295; bh=RjEIut0NPVadlo5g+ZEZR8fyCE2EolV1S8tUeyGGEDs=; h=Subject:To:Cc:From:Date:List-ID:From; b=dw7fxIpTwwcVyw1gx7+rMMMLXngvZWEfLGHsnK4+a+dYZIXsLOKqz3RquvPl959ng 8LwOK0P8OoyOEAw489QqKo2ZqkSMfKVIjDRhnDZ5yQTBYI18L2t8gZh7xuLOlgLLLS bOyw8W+LA9xVEChXXUQ8uadTxceHHVVscDzIGby0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732364AbgFWLyz (ORCPT ); Tue, 23 Jun 2020 07:54:55 -0400 Received: from wforward4-smtp.messagingengine.com ([64.147.123.34]:34631 "EHLO wforward4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732225AbgFWLyy (ORCPT ); Tue, 23 Jun 2020 07:54:54 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id CEAC9A1D; Tue, 23 Jun 2020 07:54:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 23 Jun 2020 07:54:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=a91elt YdeWikXqJOsr9OG7hDF13OGY4MLgOwfMs0JAQ=; b=hO2EF8Y1p0fbYLFhHMQnrl XJVZx0xt7ayEjMO4HqCqdFwvXkeISeO7qj5czpHg6YjZHbo78N9Ao//8hMK1vSWe lWpOrqSx7RN4yTkhZexhPyZPcaYIFynZbsZq32s9Obexf4SxrqIayKiPu7Hqn8dh PsyoTpexI2a+A4E0JVMPZxvOlgreduSok3lvBS6Ihog4C8vGFjOcMpSgtx0bfipp GJ0fYoK+DrXiBmk51LbY4VkxVKrSVrHC7CfBs3ztgL1+yZemYDvtMyh9DDkja9PK 4QH78kjYfw/ewCwuf6vomER2IoPi9+qSod4iRprs9uI9RcNQwZIwo9nh91PaXCMg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekhedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuggftrfgrthhtvghrnhepieetveehuedvhfdtgfdvieeiheehfeelveevheejud etveeuveeludejjefgteehnecukfhppeekfedrkeeirdekledruddtjeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 1EC703280063; Tue, 23 Jun 2020 07:54:52 -0400 (EDT) Subject: FAILED: patch "[PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used" failed to apply to 4.4-stable tree To: herbert@gondor.apana.org.au, smueller@chronox.de, stable@vger.kernel.org Cc: From: Date: Tue, 23 Jun 2020 13:54:47 +0200 Message-ID: <1592913287234176@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 7cf81954705b7e5b057f7dc39a7ded54422ab6e1 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 29 May 2020 14:54:43 +1000 Subject: [PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used Somewhere along the line the cap on the SG list length for receive was lost. This patch restores it and removes the subsequent test which is now redundant. Fixes: 2d97591ef43d ("crypto: af_alg - consolidation of...") Cc: Signed-off-by: Herbert Xu Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index e2c8ab408bed..4c3bdffe0c3a 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -74,14 +74,10 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg, return PTR_ERR(areq); /* convert iovecs of output buffers into RX SGL */ - err = af_alg_get_rsgl(sk, msg, flags, areq, -1, &len); + err = af_alg_get_rsgl(sk, msg, flags, areq, ctx->used, &len); if (err) goto free; - /* Process only as much RX buffers for which we have TX data */ - if (len > ctx->used) - len = ctx->used; - /* * If more buffers are to be expected to be processed, process only * full block size buffers.