Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2466262imm; Mon, 28 May 2018 08:36:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpIkXvHS7ozNXwbHpgzw09L11v9Bqy8gkhEp6likvf1sKHM2RyXauNZqgo2v6k5ADiJzAwq X-Received: by 2002:a63:798d:: with SMTP id u135-v6mr10672310pgc.401.1527521778107; Mon, 28 May 2018 08:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527521778; cv=none; d=google.com; s=arc-20160816; b=hnfHwFJju/gN1k0xk5jxTeh+L9WgDfdYYKOKP3zOq2ec5g36DOqL3XPX234hC04FRk Nim1Wu8IXQm1DqU6CESpoYAmYNJtBbJw58dKsM344Jf2QnEN88iooMGxa9u5KePET1Zh uU30LqtlvRUNcin5rt9JJbsLzen1UfG7aXyAP8e71IbEiOOfg3yUohxDknxOvehZfzNa pQNxenlxFeWtsWO7yY/LGyMtcd3/EjAToWTHSADwmO3xvG1/j8Hs5pG/ivWTVo+V6vyy +qOd+/VOZ1efy5RnFgmcc1eP4/RbmjjRM4TJ8CsKnlwNH0GUMIMaToPvPmnE8yWKPe4J FjXw== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=8PtHPE/neD38/2AoJA4Ucise6nSEAHuoAjOxAuYT0yE=; b=qRkxF4ccB6NTLnJTQJC1bYqnr2e3YCzGzJmWy/MCKx9YrP3jdModscXqC+01m/GG4U /ud1bDxVP12MoFvpe84a4Uy+C0B2UHqh0AK3WoStfpCVfZF9bf3om/arrU4wMdgceO+P LM0djcCIMvLljXD3J2hOF1JiJ/WnmNs5FUMDQ/fOt/9OP8lbx3+D1djq7fRviW+otGRU O7v1kWtHQXhQiAke+zEIphjkR/5fz/wKMKpERniRw+Rwn2o5dK7VWsC84/jdrP2CZZNS njqJeHenPwR1QLheeGUPOL5Ygay1uMRCjvpcTzlmn2VBxbl45MA2tSSCEeWI0g5uTkA8 94Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fq0UV66O; 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 w5-v6si23806878pgq.550.2018.05.28.08.36.03; Mon, 28 May 2018 08:36:18 -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=@kernel.org header.s=default header.b=fq0UV66O; 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 S968826AbeE1KSh (ORCPT + 99 others); Mon, 28 May 2018 06:18:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:38602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968610AbeE1KSe (ORCPT ); Mon, 28 May 2018 06:18:34 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6BB7B20876; Mon, 28 May 2018 10:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502713; bh=wV86LnuRPY4m5+2wzwtTgSu4Q/aXmQwyxM0A5AJBPdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fq0UV66OokZuhxGnsYfJ6AgfIVYbmTI4n9mjdf1ksLNRc1tHKCzfe7++Z1BI1Axms TEQrpmb9S6Lsi6XIntKTmvGxQoQhlsQrkVTdx6XIimhXg7vcjvXr9FKLysj0moEEGx l05X19C1Oh2quRbkILk/5KKi1UIZcI6wojxOW+TQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kees Cook , Johannes Berg , Sasha Levin Subject: [PATCH 4.4 102/268] regulatory: add NUL to request alpha2 Date: Mon, 28 May 2018 12:01:16 +0200 Message-Id: <20180528100213.741021037@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100202.045206534@linuxfoundation.org> References: <20180528100202.045206534@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg [ Upstream commit 657308f73e674e86b60509a430a46e569bf02846 ] Similar to the ancient commit a5fe8e7695dc ("regulatory: add NUL to alpha2"), add another byte to alpha2 in the request struct so that when we use nla_put_string(), we don't overrun anything. Fixes: 73d54c9e74c4 ("cfg80211: add regulatory netlink multicast group") Reported-by: Kees Cook Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/net/regulatory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/net/regulatory.h +++ b/include/net/regulatory.h @@ -78,7 +78,7 @@ struct regulatory_request { int wiphy_idx; enum nl80211_reg_initiator initiator; enum nl80211_user_reg_hint_type user_reg_hint_type; - char alpha2[2]; + char alpha2[3]; enum nl80211_dfs_regions dfs_region; bool intersect; bool processed;