Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1026530ybk; Wed, 13 May 2020 21:05:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJX22z0eXH85yf6ehhN2VcUCtT9G6v1cElHzhNqOZ2+ELAOL3Cabs12lcX9DiBhkLCyQvz X-Received: by 2002:a05:6402:128f:: with SMTP id w15mr612474edv.203.1589429139983; Wed, 13 May 2020 21:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589429139; cv=none; d=google.com; s=arc-20160816; b=cM2S49dEb+FWBKgQ+3o2ls803lFx911oe2mRlWpp1WoUtjHh78gXTR+KFILyFb3eE4 LjFOZ11aVDwlCXsGkPJ9FFCh3yv5bscQkzhdSUYBltucEYnKk+Aqp1nRIz94h5IO2K8T 39IL/KJ8LbAJ7dL6M6oWC+Y5vrMB8sW8YQlP6nA4Hsy9zAKeHDfN1j5StKDRICKXNgGR yPd46KhpnXX6aCftd3TKF9nfdEIo5MyHJ/5/equ1xVl4/mZkJZYlMuaNbSqLSYpxfU5T Gsu2uQWfIR9Co5Rtmk1Mib7+Bq3PMP2aM/6CcUt1pBaekFhm/xr1cly7gwfkxo56zQZe GrFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PCt2ho3KG+JP7MaFlADsSScz0pKYM6DAu3MGoigHqEQ=; b=wAYRPTylf+sqvNjRIR7kPwoegnseXXRN34+zV9HGCMz7FUYwOyCFRcm6SXmF65GmoJ /IrSwX78ynlLGTRgm9gM/1F77VV6tgUqMNcVs1+Tb26yXEpktbtCvUqoC34TlM3xiwsY Z1xrtNX1wBU8VaYrtCE1fBNRzWKCBwYRU3UY1JPYNRVlSWXVbeJYHrTLqv8GK3cIhH9x 1DswdeVDCG4VvkXRSyOaW2W4omv/VaK3thSAywuSJhTOhhE+IF8DtDv0xKKS4whTY/vh c1DhPR67P5Ifpmy5rw7vt9Ty0dAbh7YYx5+3A/7I+tqfbLTjCesgRNZOfg2D4TXhZNHT 7uSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BA4NH2T7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si825357edw.135.2020.05.13.21.05.16; Wed, 13 May 2020 21:05:39 -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=pass header.i=@gmail.com header.s=20161025 header.b=BA4NH2T7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725935AbgENECa (ORCPT + 99 others); Thu, 14 May 2020 00:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbgENECa (ORCPT ); Thu, 14 May 2020 00:02:30 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D92BCC061A0C for ; Wed, 13 May 2020 21:02:29 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id e18so887676iog.9 for ; Wed, 13 May 2020 21:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=PCt2ho3KG+JP7MaFlADsSScz0pKYM6DAu3MGoigHqEQ=; b=BA4NH2T7ziVaFF/ao2osSDokan0aEsgLaVUTUQ3181cwIDrmIPwgtSg8I/Lh3C/CgQ mUXwndJKJabAn7LOz4KSOoyGheQIWaZC5g0+sLRoR90+0JfrXwANqC+LOags3fKxcMDH v/MNnleMwif22IOl0rjuaD7/fNchpuPaZ/00AX8m0c8N0Mp5JjZERt8wk34iSbQHRDnS sJc5URVButvP7WMVYcn/14tjH2SyUzmKAP7MwjwrYSRZiJWlqHU5bXk2XBXBIK/DGxBl ZjZcX+HPyzIE1TN6EltGLQYxhXo0L1wlEgK/IIinvQpDUQQaYbMl2+/9r11s5DGbh+qp azLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=PCt2ho3KG+JP7MaFlADsSScz0pKYM6DAu3MGoigHqEQ=; b=iNWzVCOM4NptCAVxWHMD+pe8bh3XUUhE0YA9HhFeiTX0oy4sXAtLD8ZsRC7xnZjURp 8f23W7nMYm/aWhKBwGYRKrngQphTv5Qx/LHkBxb0oKP8vfm2+lb6X3Y3hDWMbwKEV344 lDXtc5prgai6UD0LMTQ848BxsriliXevKIAantnVyK6J7IDojJetcAdXZ4OcWq4gwlzA abgeEx9wlc2BP5YXTM4jiS9lB9JCPwrlODF5TEafWWQtJz4IHTHxglDTpDPrgoA/b21y vESq8pZ5MfDB+WRmm6YVwAjZ5KnDBLJh1KzdE9HIm+jijKB6sDq3f+akoEvp4QjBvJ3i N/Dg== X-Gm-Message-State: AGi0PuYyMYyZRIr7+UzJHeYzxSfOvrJqpQGoVWkE64fhzZYkc2K209Tk NnG9ilTrgtFW61F22Vv1XrvJczXR+xYt+dJEBhVTpw== X-Received: by 2002:a02:cb59:: with SMTP id k25mr2577588jap.41.1589428949027; Wed, 13 May 2020 21:02:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dongyang Zhan Date: Thu, 14 May 2020 12:02:21 +0800 Message-ID: Subject: Fwd: Potential memory leak bug in mwifiex_init_rxq_ring() To: linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org ---------- Forwarded message --------- =E5=8F=91=E4=BB=B6=E4=BA=BA=EF=BC=9A Dongyang Zhan Date: 2020=E5=B9=B45=E6=9C=883=E6=97=A5=E5=91=A8=E6=97=A5 =E4=B8=8B=E5=8D= =882:16 Subject: Potential memory leak bug in mwifiex_init_rxq_ring() To: Cc: Hi, I am a security researcher. I found a potential bug in /drivers/net/wireless/marvell/mwifiex/pcie.c. I hope you can help me to confirm it. Potential memory leak in mwifiex_init_rxq_ring() (/drivers/net/wireless/marvell/mwifiex/pcie.c) when triggering mwifiex_map_pci_memory() fails. Source Code: skb =3D mwifiex_alloc_dma_align_buf(MWIFIEX_RX_DATA_BUF_SIZE, GFP_KERNEL); if (!skb) { mwifiex_dbg(adapter, ERROR, "Unable to allocate skb for RX ring.\n"); kfree(card->rxbd_ring_vbase); return -ENOMEM; } if (mwifiex_map_pci_memory(adapter, skb, MWIFIEX_RX_DATA_BUF_SIZE, PCI_DMA_FROMDEVICE)) return -1;//skb is not released ... } Thank you.