Message ID | 20220325150421.220368778@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22031C43217 for <stable@archiver.kernel.org>; Fri, 25 Mar 2022 15:27:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376678AbiCYP14 (ORCPT <rfc822;stable@archiver.kernel.org>); Fri, 25 Mar 2022 11:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378312AbiCYPZT (ORCPT <rfc822;stable@vger.kernel.org>); Fri, 25 Mar 2022 11:25:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 530C3ECDB0; Fri, 25 Mar 2022 08:20:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AB76760F06; Fri, 25 Mar 2022 15:20:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACEBDC340E9; Fri, 25 Mar 2022 15:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648221616; bh=tdXfN3dVELg7WjnAzE0xfkgquffdF7QCQ8MnLKjaJPU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wlFTCII3uNLJs2cFA1DsExnD3Ayf9RQ1VNwLgMOWV952JyBbYzp6vGRGv+5FEhNXN oiBH2v6jf9RHR5q85NHe2gFEXny3S08h9e7huDj3uGTpy2bCmLjAHJ6WApQiyh0EMy A6taKpbvg41c90Yg01c6yc+VS/OdVGFvxFIh+6Ew= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Matthias Kretschmer <mathias.kretschmer@fit.fraunhofer.de>, =?utf-8?q?Linus?= =?utf-8?q?_L=C3=BCssing?= <ll@simonwunderlich.de>, Johannes Berg <johannes.berg@intel.com> Subject: [PATCH 5.17 34/39] mac80211: fix potential double free on mesh join Date: Fri, 25 Mar 2022 16:14:49 +0100 Message-Id: <20220325150421.220368778@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150420.245733653@linuxfoundation.org> References: <20220325150420.245733653@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2148,14 +2148,12 @@ static int copy_mesh_setup(struct ieee80 const struct mesh_setup *setup) { u8 *new_ie; - const u8 *old_ie; struct ieee80211_sub_if_data *sdata = container_of(ifmsh, struct ieee80211_sub_if_data, u.mesh); int i; /* allocate information elements */ new_ie = NULL; - old_ie = ifmsh->ie; if (setup->ie_len) { new_ie = kmemdup(setup->ie, setup->ie_len, @@ -2165,7 +2163,6 @@ static int copy_mesh_setup(struct ieee80 } ifmsh->ie_len = setup->ie_len; ifmsh->ie = new_ie; - kfree(old_ie); /* now copy the rest of the setup parameters */ ifmsh->mesh_id_len = setup->mesh_id_len;