Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1713239ybg; Sat, 19 Oct 2019 00:54:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4ydEQuunWw9d3ddWDmXwvOG7yR0ueeiYEbs+DUFgENw5dov4u1y0rzQPyZdlC5lDqWDYR X-Received: by 2002:a17:906:f110:: with SMTP id gv16mr12714422ejb.331.1571471664157; Sat, 19 Oct 2019 00:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571471664; cv=none; d=google.com; s=arc-20160816; b=UUDd+UmZb5kezvVXz+WFR7jhV9Imnw5RiKTUavTY1Sa8O/CRiDYGZEnQyXu08NzEz2 r0Ijgvo80FNjenw1aX+Id+QSqDYHt37IW6WFzLDapz2UODbjRXEcs/WE52T7Q9VI9vBG rSVogFcFh2x/oobBCsI2xBJy1CSgBSBoFYHzTiacN38a780z24aGj4Z+O8IpvDiJ3h6R Mr+wsQjzV7v4L7Ta7B3KbaPNAUeNYPvR1PRQHEsWZ8HyKPyDIONHqJychW2fC+gwC04b YaL/PfM0LPBHPJ6g2t9v7stoPSmYnB8r+gnVOco5lKABYEpcsWjYODmDdiMrsc7ghFn7 OP4w== 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:dkim-signature; bh=fQkiatc+fg3r30rI/cMxPdCrKEdj7TEwLzS2gYMBSGg=; b=QWh/lO2mDpsMHCIlbMP2P3P3EA+jKSTe1On42E6v0ZGvs4hpbeLpnALq6xsgoooE/N Sb1pYoEF+G7nUUzvLGifgapLSwunMWw9j/r+BbKTi28aEGisuD34a43SbNck6uI5kmhE 6ptjMSNwx+MTuAPgUQXfI60tYKyMjmbkDkfGJmbHhE+lcgaOXCwuBNzZ3pDckQFhHXBe pzrWXDZENEbxXg2LVvbLbol1m75P8Tt/dijRTUGkS+jjUXELxEddFSKPH5EVHhvfp0sG JxdOjKj7Ihp/5DZ3ZVhg0jugZ8hMqQLngBmO8dM3IWQBnOgnPae9UlVx1hRhOzMwv5QC WMHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=VqbjfRno; dkim=pass header.i=@codeaurora.org header.s=default header.b=QBX6rLJC; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay2si5190772edb.343.2019.10.19.00.53.59; Sat, 19 Oct 2019 00:54:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=VqbjfRno; dkim=pass header.i=@codeaurora.org header.s=default header.b=QBX6rLJC; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391584AbfJRH6i (ORCPT + 99 others); Fri, 18 Oct 2019 03:58:38 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35006 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728064AbfJRH6h (ORCPT ); Fri, 18 Oct 2019 03:58:37 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 171DB6090E; Fri, 18 Oct 2019 07:58:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571385517; bh=3GTFwjIlWhXTOjjTyMlnew+m09s2RvpZ8RrP6LlGZ+w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=VqbjfRnoFf9T8b6Wn9tLe9Cf3QFkkqwUA5zfqhdPV56zEfNCVxVwo2gDBRWxfnoms CsLxcC+5pgkhqgIFCOG6N0k7RyaZuhvXDQVJj5cAby+KZejhQsILl3/lRErYzH/yEO ktPJOuCgMT2L/1XZ60yTzXYof8WVV1ELnIJUYMgM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (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@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A344B60953; Fri, 18 Oct 2019 07:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571385516; bh=3GTFwjIlWhXTOjjTyMlnew+m09s2RvpZ8RrP6LlGZ+w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QBX6rLJCbBNII7ggBVwu4dfcDbjt8gKfG7Kg46eji3m0uIZemysUMpoRrSht6kCVy LKCe/KLyuJ/bnHGG9gn4sRGEiehMCTW5NlDKO0si+LeufMejv+9JJkoO0UrVJl6tAC q3n6zWuMNzfIslJFoG955hkanpk19ZaQiAXSivk8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A344B60953 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Guenter Roeck Cc: Hui Peng , davem@davemloft.net, Mathias Payer , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] Fix a NULL-ptr-deref bug in ath10k_usb_alloc_urb_from_pipe References: <20190804003101.11541-1-benquike@gmail.com> <20190831213139.GA32507@roeck-us.net> <87ftlgqw42.fsf@kamboji.qca.qualcomm.com> <20191018040530.GA28167@roeck-us.net> Date: Fri, 18 Oct 2019 10:58:32 +0300 In-Reply-To: <20191018040530.GA28167@roeck-us.net> (Guenter Roeck's message of "Thu, 17 Oct 2019 21:05:30 -0700") Message-ID: <875zkmxz6f.fsf@kamboji.qca.qualcomm.com> 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 Guenter Roeck writes: > On Sun, Sep 01, 2019 at 11:06:05AM +0300, Kalle Valo wrote: >> Guenter Roeck writes: >> >> > Hi, >> > >> > On Sat, Aug 03, 2019 at 08:31:01PM -0400, Hui Peng wrote: >> >> The `ar_usb` field of `ath10k_usb_pipe_usb_pipe` objects >> >> are initialized to point to the containing `ath10k_usb` object >> >> according to endpoint descriptors read from the device side, as shown >> >> below in `ath10k_usb_setup_pipe_resources`: >> >> >> >> for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { >> >> endpoint = &iface_desc->endpoint[i].desc; >> >> >> >> // get the address from endpoint descriptor >> >> pipe_num = ath10k_usb_get_logical_pipe_num(ar_usb, >> >> endpoint->bEndpointAddress, >> >> &urbcount); >> >> ...... >> >> // select the pipe object >> >> pipe = &ar_usb->pipes[pipe_num]; >> >> >> >> // initialize the ar_usb field >> >> pipe->ar_usb = ar_usb; >> >> } >> >> >> >> The driver assumes that the addresses reported in endpoint >> >> descriptors from device side to be complete. If a device is >> >> malicious and does not report complete addresses, it may trigger >> >> NULL-ptr-deref `ath10k_usb_alloc_urb_from_pipe` and >> >> `ath10k_usb_free_urb_to_pipe`. >> >> >> >> This patch fixes the bug by preventing potential NULL-ptr-deref. >> >> >> >> Signed-off-by: Hui Peng >> >> Reported-by: Hui Peng >> >> Reported-by: Mathias Payer >> > >> > This patch fixes CVE-2019-15099, which has CVSS scores of 7.5 (CVSS 3.0) >> > and 7.8 (CVSS 2.0). Yet, I don't find it in the upstream kernel or in Linux >> > next. >> > >> > Is the patch going to be applied to the upstream kernel anytime soon ? >> >> Same answer as in patch 1: >> >> https://patchwork.kernel.org/patch/11074655/ >> > > Sorry to bring this up again. The ath6k patch made it into the upstream > kernel, but the ath10k patch didn't. Did it get lost, or was there a > reason not to apply this patch ? This patch had a build warning, you can see it from patchwork: https://patchwork.kernel.org/patch/11074657/ Can someone fix it and resend the patch, please? -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches