Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2452586imd; Fri, 2 Nov 2018 11:38:49 -0700 (PDT) X-Google-Smtp-Source: AJdET5dwdFV/lAZ0Yi2b2CqbIuTr2OLhh4q8OpjUL/sQXPICrub8BMod5wyP6U9ASgCbdlnaKmGG X-Received: by 2002:a17:902:5ac9:: with SMTP id g9-v6mr12902001plm.311.1541183929709; Fri, 02 Nov 2018 11:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541183929; cv=none; d=google.com; s=arc-20160816; b=Qrx4DJP6smEfz0sG4UNnGNuBNkstB53zeAA69Q7zSUzLLnEEU9iHdwqSEroXQwtctp HqdLBALSoUNrdFSN8Tz3p8Q7SwFuw8A+F7dw1UNe6eZXJ5jhUtL4WaCctYBbcEzy0LOb i6/kx0h2nxEbBRANEcvXBoNYNAFcJF4lDHJV1cP27XOUZxMPvYU+ElHTSSsjYl7Wnuna Rdui+VJ9fBCDU4gzzR6Bjz5bsdRYu4Yatp2KPVcM1GI6LSu3mpOem41628kLTXZKSNz2 r4EiGHXtBVZGNtOy1cVeJUiM0JsPW/cvolRTE0ZvWsNKulWTtYp5HF/UbwQF2Ht1l9xt b1+Q== 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=uL+pQyd7CVZWJ742e1OdUr+Ecq1zrlz8cKd/LG4GszM=; b=Wb765KY3OExgQ6Pd1Rl57BbB2l91zDwJA15VFSeqnmbwb6uW6ojoIqbJmH1OJxdtu7 usWqIlwQqpsBPxwqDVWse/5KDZKCNzaYs4Jc5VpHW1N3QXK3qXYsoSeeCV1l2fEvjGRg 3NcSQARUKrGDMiHx5UXo8Iu6S3P/GQECJfqqNFzKfCxQeMsQnoVF7JDOeBJGfylq3y+C Kk/YxseAV88UongqMKtMq6dGt6pPUpfYVwuQlFmHoKmxaC//u723tOot/1jlnxk33mSR EmTZzgXJEP6SJkkJDNPHyGzAnhMW3oYkkudmG9e8DDrEX98jiMmdanV5e8f4apfOEeg+ K1Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gfO1P7TB; 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 b124-v6si27669955pfa.135.2018.11.02.11.38.35; Fri, 02 Nov 2018 11:38:49 -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=gfO1P7TB; 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 S1728612AbeKCDpr (ORCPT + 99 others); Fri, 2 Nov 2018 23:45:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:39410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727556AbeKCDpq (ORCPT ); Fri, 2 Nov 2018 23:45:46 -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 BFA4D2081B; Fri, 2 Nov 2018 18:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541183856; bh=WOW1Jjv0hwMja7AzFdLpZLujL1CGUW5XLWoVWA6CZuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gfO1P7TBymhedKM5WBnJaHEmZyaikorFm7dP4ATkA5ny7Zh2MWJ+8KCZxHyVo1SjP EPzhHAg6jceg/Z7JlUf1lks/NZBcWjMlfnb5zbI50FcRKlETl4DL7PEgP6aBqJIgC0 MrcgFFO7nau5otRobMB041DssSCjAvf8m10LxuEo= 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.19 10/24] bonding: fix length of actor system Date: Fri, 2 Nov 2018 19:34:43 +0100 Message-Id: <20181102182841.279151567@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182839.725385066@linuxfoundation.org> References: <20181102182839.725385066@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.19-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)) {