Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2516311imm; Mon, 28 May 2018 09:33:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrD2Y9eKXmIIjurJrg+5H23DsanPZFEPd6OwfYVK7KjZrkPwo9/LdtRlhL0oKORz5rRL0KA X-Received: by 2002:a62:469b:: with SMTP id o27-v6mr14034713pfi.124.1527525209796; Mon, 28 May 2018 09:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527525209; cv=none; d=google.com; s=arc-20160816; b=svhHkmg2WQ0zHNrCVEIzPP+yDJFOOI61hidGLtXCNN7TgevCmSHUCTqEeLOsPttWNn /lxVjpsMc9r1g7XrSsZdKtxpV1d/C6P2gre8aclso1lZAxRoBnVJQoju/mB/91lorJkc 7/UeAjptFSmVCi0H0deaMJyA3fJNLP7kj9s8ZK1kIezaQrmVh03svnigwaVb0O5kx3q/ DdMmb+sBSh6lp886UvCwzn8vTvmPAGa5sV/xZegP5i4ubFp4W92bsUNFRXjY2GumgSKe 75/eeIDqtsiPQTgiNLpNLcxwxLsw7jwuctEot7uZQMGYKw7t5SjJsV0NjOx+opjjQ+P7 6dHA== 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=c7WvKspIp/S5Syw2+WdG8Uy+B+N7i/pT0HqvihP/+ww=; b=S18pPfjqGQ71kpgyKvFs3X7BBFIEco6Lf/Zo0Pg9rstBJCNlgpEXtmDq/auYuxiy3/ RnpxUKp+IUQiq07VZ5S4hwyuRGwySqBdfisO0Cj0yLnF893TOo2KQnZYVIKWVcs8gSzk 9xA+0Uon5+fuB28dDDwsy4L7679MHFV0wdSV9NQ1woTud+yHdabZ2mcJJ2m7qvpD0KsZ xh+21GhqbZ1PE4MS8QfiiaV3/4RMhT7tNpjQuWJK5XaIW94M8a3qKh6zeKquOoYrgWJC 0zMG0LFQn8GnJJWM2RlcIOYJqCzlaP2cSEbCEtNJkVjZpk271/01J/2At8zmQona3Hc8 JQ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ymyd7sZQ; 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 f8-v6si9099695pgr.35.2018.05.28.09.33.15; Mon, 28 May 2018 09:33:29 -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=Ymyd7sZQ; 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 S935130AbeE1KJF (ORCPT + 99 others); Mon, 28 May 2018 06:09:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:57128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935042AbeE1KJA (ORCPT ); Mon, 28 May 2018 06:09:00 -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 5B6992086D; Mon, 28 May 2018 10:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502139; bh=ilQ+a7LLFZvcEtP8cLvoISdDxjnXUqBvSY7Yl+zS/ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ymyd7sZQoGemb3dZpPGILoqIbX1TOu8xyRbkoqH2KeyaVnBeSaNY6lnZK+fTo9RrF 8CTi4QupiONoKtVd/GivxQvRekB+i4td0WK5ufQRpceb1vHZvp1164U1N2DMrC1rSt 8Q7+lXFesZNbjAx9n79J+eMlnuFIGXUdE4ZUXaYw= 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 3.18 069/185] regulatory: add NUL to request alpha2 Date: Mon, 28 May 2018 12:01:50 +0200 Message-Id: <20180528100056.674766400@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@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 3.18-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;