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 C4634C433E1 for ; Tue, 23 Jun 2020 11:55:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0EB720774 for ; Tue, 23 Jun 2020 11:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592913302; bh=ufaXDTRQzSgsapfl5UbNpE/rDrM3Z9ocud0xFt2Br0g=; h=Subject:To:Cc:From:Date:List-ID:From; b=vP123hpdLYo9WeU2pCYPPNVv+HmS9LMXgU9vwAkskdkJFT2Lxafsaokb2c5XK5Lv2 ify2s2KPqu6ZAgWyresS2KTSg/RNwHka1qqkTK0k4l7JwW2XPsflphm9OOwGtW2vky ONtoM/lh3wXxDzJMsBavcJlw1z+zg1Tm3K+52zoI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732416AbgFWLzC (ORCPT ); Tue, 23 Jun 2020 07:55:02 -0400 Received: from wforward4-smtp.messagingengine.com ([64.147.123.34]:42147 "EHLO wforward4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732225AbgFWLzC (ORCPT ); Tue, 23 Jun 2020 07:55:02 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id 2E54C9C2; Tue, 23 Jun 2020 07:55:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 23 Jun 2020 07:55:01 -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=DjxbcW O1F4E8pFCPC3ByPWP5s36ZY3S6Qcsai7l0/D4=; b=upUi0HuqnPbvWn6gpa+Gjz d3bXg6jtN6YYqlR96eFxl7HfeCpsQuKBnEtBI3eFltLDIamFw8ty7IVlVhwPsA4A UV9UCiqlpSUONb6ux6Cp1azFrjQ/d737ccUXd2YKkx7KhnPzr6pSdAd7I8OTTLOP EbVgeYBihcvNyiPZNZ7NVE/Te8+ijZsS2EANKUamtYZVb6AA8Ycrr/9AAnctyqgR oHWgAV+Q3VEfDUdYge+Zr4HQpqjcsY7FelEWWH/igsbkeIKnj6+WmgtghmEiG9oK DwQMoBEqcB7fBzJEWROAQ00kEnjt7z2fPX0xlYh4pvSRei9eF/K/dNtB+/PRia8g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekhedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuggftrfgrthhtvghrnhepieetveehuedvhfdtgfdvieeiheehfeelveevheejud etveeuveeludejjefgteehnecukfhppeekfedrkeeirdekledruddtjeenucevlhhushht vghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh 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 4DB97328005A; Tue, 23 Jun 2020 07:55:00 -0400 (EDT) Subject: FAILED: patch "[PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used" failed to apply to 4.9-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: <1592913287117111@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.9-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.