Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2461263imd; Fri, 2 Nov 2018 11:48:44 -0700 (PDT) X-Google-Smtp-Source: AJdET5ftihucn0DF9+S8AQAYUVTBUJ2bRtZBbvvbm1HEphvIe62cYOxlMlDvXMs9OLGEVW4Az1mV X-Received: by 2002:a62:6dc3:: with SMTP id i186-v6mr12983616pfc.218.1541184524609; Fri, 02 Nov 2018 11:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184524; cv=none; d=google.com; s=arc-20160816; b=0ojANU3Nu93VJyxARTMHq59vrmxDRX30tRilAsrLbeo5W9pCwaQ1hPWsfhoKipSwtK q7q+uNBuj82bqNm6Z7piYZOHIJw4kj9rQpEqKW9O1+rDLM2csg3lc41LDy3xMcTSEZbY 9iAlSTx4lr/c7x6hLDhgyOIsmqMf6ebCeKY6UsXjcqlxfuB2VFPItDXUrVGzH742UD7T 2cGTcgK8Anmd01vACXYx6R/HBHX8MRxAjJ4ahn1RIAjADIO0ke3VBB43tGKp2u3T1hv1 QNKWY/FbjGUctYAOBhEFjdnPK0Gwqsn5TWNUi5FtnvphY39bhZSbcVRN2ZdKMj1VtBtj 0qQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6aF61OpYiSUHf+WjNYFFvjIOYRjSs+a9aj1gNKVzF+8=; b=b+7C1IQkM48/WsAbs7TZpBaYu11HmrDvOUIcB4M0xDwavN5zTy8kHtD35OilyGijGa 7woUq+1Ft3kSTeUNCHFd3rLwld+8wFiMfLVkjqMIjIeWGxCxWJ4HOEDw0pZrq0QmYEdd 16AsJMXzzRKTFmPehqtaMCTVRXSUmoKTXYkYhI/f3Lol8qO+0uJYTqgJixb34HTa/dtY PWOoHY5Za/qGK0SGXrZMBoeIPmtKqBJCeCxMcxkI1MMqOWpdz9NVp9bCFZwKrPsamwiK ERPAgcQz3WRhqzPTt7NEbAnR+Qit6Wrh+OCaPix5G+QozVQnNWUvh1vQqPV5bzVbY//9 qOzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XykpD358; 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 h71-v6si23882214pgc.122.2018.11.02.11.48.29; Fri, 02 Nov 2018 11:48:44 -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=XykpD358; 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 S1730411AbeKCDyp (ORCPT + 99 others); Fri, 2 Nov 2018 23:54:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:50758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729136AbeKCDyp (ORCPT ); Fri, 2 Nov 2018 23:54:45 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 BA90720837; Fri, 2 Nov 2018 18:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184392; bh=vNmT2UDOKK1YHVGFiz805K1fXcx3cygQalMXrombgbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XykpD358P5VlRLCDa9x+NXwyB76WxzUkUL0bqK8qgT+hGsyzq7TY/eKKkuDrcvva3 9jRZV1pW+kbSDlkpGE/P6Xax7Cn16db/pYW/2UO03stHNvtBzt5L4QG83uSHJEfwxp VMu/Y5JhSfo5zdtnw5qeKqausW/tLQvumhpoV1Ro= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Jungel , "David S. Miller" Subject: [PATCH 4.18 123/150] bonding: fix length of actor system Date: Fri, 2 Nov 2018 19:34:45 +0100 Message-Id: <20181102182911.505943980@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jungel [ Upstream commit 414dd6fb9a1a1b59983aea7bf0f79f0085ecc5b8 ] The attribute IFLA_BOND_AD_ACTOR_SYSTEM is sent to user space having the length of sizeof(bond->params.ad_actor_system) which is 8 byte. This patch aligns the length to ETH_ALEN to have the same MAC address exposed as using sysfs. Fixes: f87fda00b6ed2 ("bonding: prevent out of bound accesses") Signed-off-by: Tobias Jungel Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/bonding/bond_netlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/bonding/bond_netlink.c +++ b/drivers/net/bonding/bond_netlink.c @@ -638,8 +638,7 @@ static int bond_fill_info(struct sk_buff goto nla_put_failure; if (nla_put(skb, IFLA_BOND_AD_ACTOR_SYSTEM, - sizeof(bond->params.ad_actor_system), - &bond->params.ad_actor_system)) + ETH_ALEN, &bond->params.ad_actor_system)) goto nla_put_failure; } if (!bond_3ad_get_active_agg_info(bond, &info)) {