Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3345943ybb; Mon, 6 Apr 2020 07:12:50 -0700 (PDT) X-Google-Smtp-Source: APiQypKL3JMAkyQA0+AK39RG+joc9A6/5yP1gPp4jKolRdLFXvMeY508/8wZbR+loYPm5u0/N02C X-Received: by 2002:aca:da57:: with SMTP id r84mr12462489oig.79.1586182370222; Mon, 06 Apr 2020 07:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586182370; cv=none; d=google.com; s=arc-20160816; b=fFBQtKRYXj7o2m+Hm+YGYzdQC6rHML497Ca8EgVYuJhTSSFqHpUpVIg/eqTjf1Lhc8 z+4QdbYLL9eNX060SBEv51P5xiuGThi7+3UKvwrDzRdufnLcbTedeohq8w3AwZUwUMy1 YYTvlvaZHF5vieXwhO9Gb9i8nka/PY6C2weyn0Zq2FBtcX3MHYPR1CpGzKDM3BLoblTt oPwExmUEZ5bpSze8yqY/jH0dw+5khKjGHyks9USVCfv11FQG9fg+5KKw31VvK8Pp3nAP F2Q4M0J/3RqyQj1dXjJyxSbiqUAmrb2rWsFyJNZREbVlInQrK8vz4EZGJfXgETCyFCb1 7e9g== 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; bh=T762Ltvl3MIN58a0l0ALvp6dao1KdO6KlC6hvEUSLiQ=; b=RuByVs01Be0z+1uEoTBae8EZzYZccYG7tipSHGYxsRT6YBQ8913qrw4gyFqfu4J73B Dubz21T7IPk9oq/VTKnoOC2V+vBR0XiuvUoBosmQfjRcOGhTyxJuTamaAopAlVZcQG55 JHeRsd8Zau5/VxYFm+DnJJ8GNmf5CbBiHyKNSaKGyrgGT3mtcUUl4MDezUBDyM50xf4t p0N51zBLrnhFe6x7JcugFAEi6gQ1yxJxD6pexEzZyOyM01xxMErREElHBF0H9hgYqVXB HQHI1PagB6LGhFle6yyGrL0g8o/l2k1DmVj+N8wNf5Nw27KDg+WjhZ9+ZFGXf057L8wX ey9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=eGwnTEQT; 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 o85si8004865ooo.19.2020.04.06.07.12.37; Mon, 06 Apr 2020 07:12:50 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=eGwnTEQT; 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 S1728598AbgDFOLG (ORCPT + 99 others); Mon, 6 Apr 2020 10:11:06 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:10125 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728580AbgDFOLG (ORCPT ); Mon, 6 Apr 2020 10:11:06 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1586182265; h=Date: Message-Id: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=T762Ltvl3MIN58a0l0ALvp6dao1KdO6KlC6hvEUSLiQ=; b=eGwnTEQTiN8zX6cC5wIAu+sSUrpFj2gNrl7dWE4aLRTyoCKRgWKFgL0uH/yUO7NY79TUHAAw JKgk1+V9FBmGHhiJiR4IbH7mhS4IMhTzmpkVV6w6EwglpOyX89OxEb9tNZVZruIY+cf30AGb 8lNR6DA/SqcIGt2KS7uT6/lHhg0= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e8b3872.7f29c75bb260-smtp-out-n03; Mon, 06 Apr 2020 14:10:58 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 29895C43637; Mon, 6 Apr 2020 14:10:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=2.0 tests=ALL_TRUSTED,MISSING_DATE, MISSING_MID,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-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8EF11C433D2; Mon, 6 Apr 2020 14:10:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8EF11C433D2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.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: [PATCH] iwlwifi: actually check allocated conf_tlv pointer From: Kalle Valo In-Reply-To: <20200402050219.4842-1-chris@rorvick.com> References: <20200402050219.4842-1-chris@rorvick.com> To: Chris Rorvick Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Rorvick , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , "David S. Miller" User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20200406141058.29895C43637@smtp.codeaurora.org> Date: Mon, 6 Apr 2020 14:10:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chris Rorvick wrote: > Commit 71bc0334a637 ("iwlwifi: check allocated pointer when allocating > conf_tlvs") attempted to fix a typoe introduced by commit 17b809c9b22e > ("iwlwifi: dbg: move debug data to a struct") but does not implement the > check correctly. > > This can happen in OOM situations and, when it does, we will potentially try to > dereference a NULL pointer. > > Tweeted-by: @grsecurity > Signed-off-by: Chris Rorvick Fails to build, please rebase on top of wireless-drivers. drivers/net/wireless/intel/iwlwifi/iwl-drv.c: In function 'iwl_req_fw_callback': drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1470:16: error: 'struct iwl_fw' has no member named 'dbg_conf_tlv' if (!drv->fw.dbg_conf_tlv[i]) ^ make[5]: *** [drivers/net/wireless/intel/iwlwifi/iwl-drv.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [drivers/net/wireless/intel/iwlwifi] Error 2 make[3]: *** [drivers/net/wireless/intel] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [drivers] Error 2 Patch set to Changes Requested. -- https://patchwork.kernel.org/patch/11470125/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches