Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3668499imm; Mon, 18 Jun 2018 01:56:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIzJ3NZc3Nf1bZKxKR9lHEvGutAisKpExlr8vEVAdJaAn1gcZtlSsmU9N3T4Gr3OvRXKr+S X-Received: by 2002:a17:902:4301:: with SMTP id i1-v6mr13085779pld.280.1529312188862; Mon, 18 Jun 2018 01:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529312188; cv=none; d=google.com; s=arc-20160816; b=HQbmJxc1iuJvnsUukSSTS1XLZEXFiPqzCZWuaFQ8mVWil5AsZuc108QdCUnlgwseSQ i8vTsWOyiwYuMbDpxpGUU0coSLPt6OXbh4800k/3YTCgImcMZ9lpXq8uYaI1lz2rsjHq +KC54ylrFQO3jllhCzHCDFbahl5VLVUDqAdE/oL7PRVWI5qAzq7mG9tIYRo9u+NDYoUv ffzrYIRSy45my0c/feTm4W0AGcC+1mX/RdJrBRl13eYP6gR9gLJzBhzmxmPYN7Hln0Mr +NFObtZ6F5Gy4kBfWJ/m51xglAKP4uFa90Vfqn6LfU51xWDgP8gfl7WPxw09QBp/nfUp eufQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:user-agent:cc:to :references:in-reply-to:from:subject:content-transfer-encoding :mime-version:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=p7H5ZEwbkxsa+jgsI9UwUfsJRL6WZ4srh5drUqL+EkE=; b=aaNAehuJLygszeO2nqJZkyd+F9ipssVht4LE3Ji1IYppjKOOu1zX2jRaXxUaYHF0jR 7/bZ+rFMAA9fNL3/vVE1hmNfQoeuxEoY+meYy+pd/4982k9ks8QU9mV4G0ePuxc8BYQY d1XmvxA4sXkwOZucCzq15EmzxlrhwMa67W+a3lt4Wx0dnBLnN4PKOHzIfvOhzf2RFrun s6ghpEXmsCKIwUu90/M1imA2MNlf884J/H0QZa+cBx8o86/C+RHKwoPmAxJKJbQzpSU9 lpTCuhSjQiWS/zPKXrWckCsAXLELDKBJhvFma6ZqL46vXCqJjlKIh/lXtNCUrcNeAqWY bcvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oT7sUNmy; dkim=pass header.i=@codeaurora.org header.s=default header.b=C7zn+ohZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 e88-v6si14857866pfk.198.2018.06.18.01.56.15; Mon, 18 Jun 2018 01:56:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=oT7sUNmy; dkim=pass header.i=@codeaurora.org header.s=default header.b=C7zn+ohZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967878AbeFRIzk (ORCPT + 99 others); Mon, 18 Jun 2018 04:55:40 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54660 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967755AbeFRIzg (ORCPT ); Mon, 18 Jun 2018 04:55:36 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6A8F160B13; Mon, 18 Jun 2018 08:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529312135; bh=UM91ZcWhOytsdAMYSOLN4FTPbMxmPt7Xtm72oH1GhGk=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=oT7sUNmyodyGYwJUPtHXtaTqS7C1fKuBQDsRtRSKC3obw8dB15TCbEcCkhlk20P68 LSL5gGMrvlbHvQxji8EO0z7ks1aC9ly4vKcwxjHgARJTj/lYftnbzFXOdA6hAmcZUO 2HhpIdK5GdTu8pV06wMzek/4O1rE9+ETH78PWfS8= 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=-0.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,MISSING_DATE,MISSING_MID,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-52.elisa-laajakaista.fi [88.114.240.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EFED360227; Mon, 18 Jun 2018 08:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529312135; bh=UM91ZcWhOytsdAMYSOLN4FTPbMxmPt7Xtm72oH1GhGk=; h=Subject:From:In-Reply-To:References:To:Cc:From; b=C7zn+ohZbBfXK9klne7XUMAp9E89ZCOGMMOtvB9rUU8zCED4ngrktZlyrAqJHk+SU 4cm2Xx7rCkkF3diDgwuI2TeQnlDGjdzqGUufWKG/b4Bf5ZuriBdxG4eYwUZei6TQi7 oXcZyFCV0VENqoDHIZFBmgEHXN+hzMl8JQ/RXRFs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EFED360227 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 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: qtnfmac: fix NULL pointer dereference From: Kalle Valo In-Reply-To: <20180601132408.GA2572@embeddedor.com> References: <20180601132408.GA2572@embeddedor.com> To: "Gustavo A. R. Silva" Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , kernel-janitors@vger.kernel.org User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20180618085535.6A8F160B13@smtp.codeaurora.org> Date: Mon, 18 Jun 2018 08:55:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Gustavo A. R. Silva" wrote: > In case *vif* is NULL at 655: if (!vif), the execution path jumps to > label out, where *vif* is dereferenced at 679: > > if (vif->sta_state == QTNF_STA_CONNECTING) > > Fix this by immediately returning when *vif* is NULL instead of > jumping to label out. > > Addresses-Coverity-ID: 1469567 ("Dereference after null check") > Fixes: 480daa9cb62c ("qtnfmac: fix invalid STA state on EAPOL failure") > Signed-off-by: Gustavo A. R. Silva > Reviewed-by: Sergey Matyukevich Patch applied to wireless-drivers.git, thanks. c1e3f64f8738 qtnfmac: fix NULL pointer dereference -- https://patchwork.kernel.org/patch/10443507/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches