Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp256787pxa; Thu, 27 Aug 2020 01:05:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVo01Q5+Us4RnXSkHFkgrxvB7ulfwH8pvxy4n/2wtzR5CooHfxt9PQO6GCVQ9XaWP1EeSZ X-Received: by 2002:a17:906:1604:: with SMTP id m4mr19210090ejd.6.1598515542773; Thu, 27 Aug 2020 01:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598515542; cv=none; d=google.com; s=arc-20160816; b=Qiv2DCDobchc/4Jx/dzbJmLeH0LDbmYXTs4qTR/X8vCg17Fepl5FzS3CdkT2bMKgfh pf9jZqqVoIpgQEaShUpluqTcmAOzMuqDox184OdCWuBZE9g3dN9n/WPefn0kh1VM6Br7 dXUvnchcBqL+AEk+NL2qsCv1U/I5LaRTXYselhZ6h/bozKntQrgn3cqvb8W4oytfWnob 5cUvlu0ktGz1Dmsd0xP+yMjcnGUyNJledRc259cevizWN3Wq7DUDz6dElZ9IwVkahiuX ERi07Gq7W8hjFCTNrc2Q0xRBBIGdZpXxnaJmvZu/3l9A1azYNIT3NSNJoK9e4yhFk/AG XHCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature; bh=deplzEvxYDzNg5sadmLOiZaUYk7lhFmqIsbII+EbBmw=; b=kUcg4ztXgVkIlsDVpiVlyjClYH5/d7eE0Q5cWu0zqGoPiQ+W1U3wCdxdCVB/DPaK0V 8ru6XAz1V3P3zXj5fM2qJzxnteuR0h78XnZt76BzKTs/NXZXBvfSfHkWKUbGhTWCrxxd mY2Utg4WoBIE0p5L/MhkCd3B/517sf5Iy3LytQNcVFImTwOZKRPNk8sPMH5dTqfQKVOs 4vQRdCsuoLM8ygaI0GztI3xKzyH2Q/M5vlPFQW1KmbeIvttqLELhfk/u5jqswEjvt/oE yGr6DkGO0WUY+GIkTqOE/6XzzuVfJlind2tCz5n090XyOms+dfSiliyUEn1ZfiivwZJ+ ZzvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=sHpuHPRk; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si935855edd.121.2020.08.27.01.05.17; Thu, 27 Aug 2020 01:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=sHpuHPRk; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727929AbgH0IDG (ORCPT + 99 others); Thu, 27 Aug 2020 04:03:06 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:51318 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727115AbgH0IDD (ORCPT ); Thu, 27 Aug 2020 04:03:03 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1598515382; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=deplzEvxYDzNg5sadmLOiZaUYk7lhFmqIsbII+EbBmw=; b=sHpuHPRkAnHKlWa32cv3WScxW8xLfzFcfr5yjtglkapQgn94cdXZK0lc5NWNQfEh0xFdmiVJ 0nC2+Za7ztTATyyBIky52WwA3ywnTwJLpA62vz+qkwTIij8ZwkTscUD1SbRIda5GguO/ud8V kgFBWq2TSm1Bo7yORgh+58UEPRc= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 5f47689ae2d4d29fc8d95bb9 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 27 Aug 2020 08:02:34 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 661A6C43387; Thu, 27 Aug 2020 08:02:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from x230.qca.qualcomm.com (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 02436C433C6; Thu, 27 Aug 2020 08:02:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 02436C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Brian Norris Cc: Maximilian Luz , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , "David S. Miller" , Jakub Kicinski , Dan Carpenter , linux-wireless , "\" , Linux Kernel , Kaloyan Nikolov Subject: Re: [PATCH net] mwifiex: Increase AES key storage size to 256 bits References: <20200825153829.38043-1-luzmaximilian@gmail.com> Date: Thu, 27 Aug 2020 11:02:28 +0300 In-Reply-To: (Brian Norris's message of "Tue, 25 Aug 2020 12:30:28 -0700") Message-ID: <87mu2gldnv.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Brian Norris writes: > Hi, > > On Tue, Aug 25, 2020 at 8:38 AM Maximilian Luz wrote: >> >> Following commit e18696786548 ("mwifiex: Prevent memory corruption >> handling keys") the mwifiex driver fails to authenticate with certain >> networks, specifically networks with 256 bit keys, and repeatedly asks >> for the password. The kernel log repeats the following lines (id and >> bssid redacted): >> >> mwifiex_pcie 0000:01:00.0: info: trying to associate to '' bssid >> mwifiex_pcie 0000:01:00.0: info: associated to bssid successfully >> mwifiex_pcie 0000:01:00.0: crypto keys added >> mwifiex_pcie 0000:01:00.0: info: successfully disconnected from : reason code 3 >> >> Tracking down this problem lead to the overflow check introduced by the >> aforementioned commit into mwifiex_ret_802_11_key_material_v2(). This >> check fails on networks with 256 bit keys due to the current storage >> size for AES keys in struct mwifiex_aes_param being only 128 bit. >> >> To fix this issue, increase the storage size for AES keys to 256 bit. >> >> Signed-off-by: Maximilian Luz >> Reported-by: Kaloyan Nikolov >> Tested-by: Kaloyan Nikolov > > Thanks for this! I just happened to notice this breakage here, as we > just merged the relevant -stable updates. I think it would be wise to > get the Fixes tag Dan noted, when Kalle lands this. Ok, I'll queue this for v5.9 and add the Fixes tag. If anyone is bored it would be great to get patchwork automatically pickup the Fixes tags :) It already does that Acked-by, Reported-by and Tested-by tags: Signed-off-by: Maximilian Luz Reported-by: Kaloyan Nikolov Tested-by: Kaloyan Nikolov Reviewed-by: Dan Carpenter Reviewed-by: Brian Norris Tested-by: Brian Norris -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches