Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp971858pxb; Sun, 11 Apr 2021 03:27:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwd6UtTDWYIJMevhxiIIWR0fUvNVtlNkwKQWDi8b2BuehJOXGymQB+oCAFCwD6aNMqZTLI X-Received: by 2002:a17:902:7403:b029:e9:d170:5b11 with SMTP id g3-20020a1709027403b02900e9d1705b11mr11442533pll.50.1618136875060; Sun, 11 Apr 2021 03:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618136875; cv=none; d=google.com; s=arc-20160816; b=t/j67x6xI9aO28gGIc52tZBfRT67wblabNn9EBRLdksU8bIKfdHwIr4CLlR8ycNsc6 F5F0jAcPjzc2VlSOnBrDtNO6Gfdx/ZyMVo+Aml5Vz+qj7beq+J+jL0nCl2zRgma63xLL NgQ0vXPwDPaBnujaTcnjMmw7aRfklwEFEM7a018/L+LZcKdwEhfDW6OMGJMQhkQV05mW 39RmZLOb2MpGWnjJfg+FNAhKv9PhUtJmh7lx4OdeDPNFcBmJrPEO18HheWdbp31VZF0f TjakZMTfV7hRnyYlsHKm8BMWsZxodPINhhke5RpFIKAjn+NvyP2z1OOD76o+XfOxW7TO eGJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=86SrSJu2os65YuE3x+cEFb3Q4jyL9NFA7EnI5LWHG+I=; b=WwgGa0A2kHc+BEefircVx5rSma63awjfjlINmRwk/zYY/q1qpfTN5EUySZc8fCpqc1 B7gMPMaT4wUE1pY1WTsWhjXgozIUaxYkLvliTAZzPnRRZsS1SlELhxnj+drQZSCSsAf3 Zb5DrLC44BBkZGX6mhsNZVp2GEWECwkTkExFCY9OMzWh0QGXIqzou+Yrq8NdsvB9ybj+ psnlZbcb5kW0wWX46n/yqBD3r84xjdW/X2zSj32lGZO+l89H4LZ1shYxyM36qmBb1v7x YNpLpr+a6rtyvcELtx8wZf34vucKjvMBJKAUXw9KlBgM07tbbGnWEaIwL0VqU+AsD8JQ aSfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=O2VsAUQa; 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 125si9239879pgi.270.2021.04.11.03.27.42; Sun, 11 Apr 2021 03:27:55 -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=@nbd.name header.s=20160729 header.b=O2VsAUQa; 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 S235345AbhDKKZ3 (ORCPT + 99 others); Sun, 11 Apr 2021 06:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbhDKKZ2 (ORCPT ); Sun, 11 Apr 2021 06:25:28 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4E14C061574 for ; Sun, 11 Apr 2021 03:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=86SrSJu2os65YuE3x+cEFb3Q4jyL9NFA7EnI5LWHG+I=; b=O2VsAUQauzRYqYsrKlhtlImwMn 3P97s/jQ9VFHSx2Nxi/IY9hLLEN87VkqR9lsbmP2k3DNyL6tUh+6VCwdpyDvywTF/r8awWx0gefvz 4EHVLb0+O9m21l5q12ibxcydePJ4VpcI9oi+paCNzaFZyqfzcEGs2Nyj/pStKxx6xJIE=; Received: from p4ff13c8d.dip0.t-ipconnect.de ([79.241.60.141] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lVXHC-0000q2-7V; Sun, 11 Apr 2021 12:25:10 +0200 Subject: Re: [PATCH 5.12] mt76: fix potential DMA mapping leak To: Kalle Valo Cc: linux-wireless@vger.kernel.org, greearb@candelatech.com References: <20210323214737.53254-1-nbd@nbd.name> <20210411084750.380F5C43461@smtp.codeaurora.org> From: Felix Fietkau Message-ID: <3766ead5-944d-6feb-e897-f7b59b9c5f11@nbd.name> Date: Sun, 11 Apr 2021 12:25:09 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210411084750.380F5C43461@smtp.codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-04-11 10:47, Kalle Valo wrote: > Felix Fietkau wrote: > >> With buf uninitialized in mt76_dma_tx_queue_skb_raw, its field skip_unmap >> could potentially inherit a non-zero value from stack garbage. >> If this happens, it will cause DMA mappings for MCU command frames to not be >> unmapped after completion >> >> Fixes: 27d5c528a7ca ("mt76: fix double DMA unmap of the first buffer on 7615/7915") >> Cc: stable@vger.kernel.org >> Signed-off-by: Felix Fietkau > > Sorry, I missed this and I suspect it's now too late for v5.12. Felix, can you > instead take this to your tree so that we can get this to v5.13? I assigned > this to you on patchwork. Will do. I plan on sending an updated pull request today. - Felix