From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] mpls, nospec: Sanitize array index in mpls_label_ok() Date: Thu, 08 Feb 2018 15:24:30 -0500 (EST) Message-ID: <20180208.152430.815938637029162565.davem@davemloft.net> References: <151807166425.3807.8813780890075479680.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, ebiederm@xmission.com, stable@vger.kernel.org, linux-kernel@vger.kernel.org To: dan.j.williams@intel.com Return-path: In-Reply-To: <151807166425.3807.8813780890075479680.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: stable-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Dan Williams Date: Wed, 07 Feb 2018 22:34:24 -0800 > mpls_label_ok() validates that the 'platform_label' array index from a > userspace netlink message payload is valid. Under speculation the > mpls_label_ok() result may not resolve in the CPU pipeline until after > the index is used to access an array element. Sanitize the index to zero > to prevent userspace-controlled arbitrary out-of-bounds speculation, a > precursor for a speculative execution side channel vulnerability. > > Cc: > Cc: "David S. Miller" > Cc: Eric W. Biederman > Signed-off-by: Dan Williams Applied, thank you.