Message ID | 201811230801.wAN81jGb032354@finist-ce7.sw.ru |
---|---|
State | New |
Series | "drivers/net/i40e: define proper net_device::neigh_priv_len" |
Headers | show
Delivered-To: criupatchwork@gmail.com Received: from gmail-imap.l.google.com [74.125.21.109] by patchwork.criu.org with IMAP (fetchmail-6.3.26) for <root@localhost> (single-drop); Fri, 23 Nov 2018 09:03:58 +0100 (CET) Received: by 2002:a5e:c003:0:0:0:0:0 with SMTP id u3csp1850796iol; Fri, 23 Nov 2018 00:03:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/WYF2vuqKQDx6Q4Bi9q2b1x/DD/txsojcTG+YKrKaOPFkpE50ME3ss+EdGo5bAoOlO2NCVt X-Received: by 2002:a62:9f01:: with SMTP id g1mr9096552pfe.223.1542960232210; Fri, 23 Nov 2018 00:03:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542960232; cv=none; d=google.com; s=arc-20160816; b=IO0/gzqsQQqsekv4iVvRoi0A5swCWYp8DBDKDp/6lVRP0U8mq+6hF2NqVTAPRQczl2 kjqjWGwrBa9iDqgvwvTAvS8XgMm+krTeP9NF1atjg4wjlK5OFib9bgPDZSM2IyfO8b+x NF6CPuJTs+5SDjhsPxWGCXfPWXzDhiw2i4dXeM/Esw+HFjvFDbOx0PgOTPyeCZOThysA /Ec/Gkj2fcM4GRFxbPBFfqxIjz0Cm2wVtmCgglATWd9A+6dk0DwI5v3DfZIdyhMs2V6k tFASR4+Nssb/Un+7hGzHZK6pZ/p/prIXQGMTu5Rr3HCXD7ijGC1/Q7ubtbAxziK4hxNI zgfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:spamdiagnosticoutput:content-language :accept-language:in-reply-to:message-id:date:thread-index :thread-topic:to:from; bh=veS0x4r6xfWHZ2yxPrCezMTc1XOEhg95Ls0P3kUjIEw=; b=LDxNH+7wsabQvO7+5v9SwtjKrSuHA5V3kKFER5iFMGzlQFEZBUYnR4PDSEovbk8krW 63GA52zqA4I6raWxREBPdEbZd9GboANQ0LhbJQLToyJlaXjdG+ftEy29r7/EvoVvw71k I+o6/9JDdIObqG0/sCF2aVIqy2t9Vffzz9Hg29B5ovrThpy76abfh6yTRlYglbitZxFY tkbGFNfKKykvs30rimon9RqcZW7TWhC+cM0YLTHBu03xEMsB2aK2Zsd0IEEk4d27FFJU EvCqsP8AZDI5Mkxh0iYly4a2Mj7xvtkHL3PMuhjUKtvPVgCDxqG/l6HNlBkN8dLJ9Q4A Xemg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devel-bounces@openvz.org designates 185.231.241.50 as permitted sender) smtp.mailfrom=devel-bounces@openvz.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: <devel-bounces@openvz.org> Received: from mail.openvz.org (mail.openvz.org. [185.231.241.50]) by mx.google.com with ESMTPS id m5si34243834pll.58.2018.11.23.00.03.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 00:03:52 -0800 (PST) Received-SPF: pass (google.com: domain of devel-bounces@openvz.org designates 185.231.241.50 as permitted sender) client-ip=185.231.241.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devel-bounces@openvz.org designates 185.231.241.50 as permitted sender) smtp.mailfrom=devel-bounces@openvz.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from localhost.localdomain (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id wAN81meJ008134; Fri, 23 Nov 2018 11:01:49 +0300 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp0214.outbound.protection.outlook.com [23.103.133.214]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id wAN81k3E008131 for <devel@openvz.org>; Fri, 23 Nov 2018 11:01:46 +0300 Received: from VI1PR08MB3117.eurprd08.prod.outlook.com (52.133.15.22) by VI1PR08MB2880.eurprd08.prod.outlook.com (10.170.239.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Fri, 23 Nov 2018 08:01:49 +0000 Received: from VI1PR08MB3117.eurprd08.prod.outlook.com ([fe80::9477:327a:cef1:4336]) by VI1PR08MB3117.eurprd08.prod.outlook.com ([fe80::9477:327a:cef1:4336%4]) with mapi id 15.20.1339.031; Fri, 23 Nov 2018 08:01:48 +0000 From: Konstantin Khorenko <khorenko@virtuozzo.com> To: Konstantin Khorenko <khorenko@virtuozzo.com> Thread-Topic: [PATCH RHEL7 COMMIT] drivers/net/i40e: define proper net_device::neigh_priv_len Thread-Index: AQHUgwLI0Sew/rMBPkOcEVAgsyFKWA== Date: Fri, 23 Nov 2018 08:01:48 +0000 Message-ID: <201811230801.wAN81jGb032354@finist-ce7.sw.ru> In-Reply-To: <fake.2018.11.23> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR05CA0207.eurprd05.prod.outlook.com (2603:10a6:3:f9::31) To VI1PR08MB3117.eurprd08.prod.outlook.com (2603:10a6:803:46::22) authentication-results: openvz.org; dkim=none (message not signed) header.d=none; openvz.org; dmarc=none action=none header.from=virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [185.231.240.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR08MB2880; 7:8frwVqFtFkajNJtHgCpL2J9TnkW4DY7dzkjl6VrOg96kU3+GPBCo4jimHCXnERQeeHOC3VDrFIrKjyt7zUVyTZBoGU0Z0KytlunaHvHq/G0v7h+68KIXVDLmFYY7XzEOd3OU2hVUfHn1rvEfZH42YA==; 20:1L4wOQwwUGVERfAonL36e3c3sciIM3hysLJMnNhGG4+3HuzT/QC4RrrtDp7pSvYspJ/u45awdzfhvcaDvBLo8jB/dZJNgXYHuII2dpHHcA7mw+C5mfSAuwHhyEueYhQQwnTuSPj033SyGBKYGXJ5C+2kZH7ZUUIAalbEw0tQkhQ= x-ms-office365-filtering-correlation-id: af1280be-92cd-4c9b-35c6-08d65119eb15 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB2880; x-ms-traffictypediagnostic: VI1PR08MB2880: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(20180801055)(9101524173)(2401047)(8121501046)(823300264)(823320095)(93006095)(93001095)(3231442)(944501410)(52105112)(10201501046)(3002001)(148016)(201708071742011)(7699051)(76991095); SRVR:VI1PR08MB2880; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB2880; x-forefront-antispam-report: SFV:SKI; SFS:; DIR:INB; SFP:; SCL:-1; SRVR:VI1PR08MB2880; H:VI1PR08MB3117.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; x-microsoft-antispam-message-info: 0/nNQuZUVu2dcPsMDI6fLBQ3xffaBfJ05j7UKMrUw9gSbD4zpSEjYsGRuyWrUCDZFOXrnxXIozvM/jM2sY+k5HNaa08NAE4CdnymRvgHYPUOBDnQjBzQ/GNN6QosTaYRduxR5b4FpALVUFibS0ylDQn/EuIndD4KUxT4Pl1WPPDs5w/s68GON1c3mbYfjI/oZ0CukHvCd2opqm3ry21UK8Kxe+rYiTFYkSRVDiX2LxcFpVENwbstJdAwiLlHPYrFEBh4NgWxsKdDcfhzFPLVn/XPPGBfYaaPmwrWTOZA/ixwnsjF8kJoW4sJ5Yuz/DKjKLrn/ubX+FtN5ic2L8rXoR5a8tEWi/1UhzMhgSPI49M= spamdiagnosticoutput: 1:0 MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: af1280be-92cd-4c9b-35c6-08d65119eb15 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2018 08:01:48.7853 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2880 X-MS-Exchange-CrossPremises-AuthAs: Internal X-MS-Exchange-CrossPremises-AuthMechanism: 06 X-MS-Exchange-CrossPremises-AuthSource: VI1PR08MB3117.eurprd08.prod.outlook.com X-MS-Exchange-CrossPremises-TransportTrafficType: Email X-MS-Exchange-CrossPremises-TransportTrafficSubType: X-MS-Exchange-CrossPremises-SCL: -1 X-MS-Exchange-CrossPremises-mapi-admin-submission: X-MS-Exchange-CrossPremises-messagesource: StoreDriver X-MS-Exchange-CrossPremises-BCC: X-MS-Exchange-CrossPremises-originalclientipaddress: 185.231.240.5 X-MS-Exchange-CrossPremises-transporttraffictype: Email X-MS-Exchange-CrossPremises-transporttrafficsubtype: X-MS-Exchange-CrossPremises-antispam-scancontext: DIR:Originating; SFV:SKI; SKIP:0; X-MS-Exchange-CrossPremises-processed-by-journaling: Journal Agent X-OrganizationHeadersPreserved: VI1PR08MB2880.eurprd08.prod.outlook.com X-MIME-Autoconverted: from quoted-printable to 8bit by mail.openvz.org id wAN81k3E008131 Cc: OpenVZ devel <devel@openvz.org> Subject: [Devel] [PATCH RHEL7 COMMIT] drivers/net/i40e: define proper net_device::neigh_priv_len X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development <devel.openvz.org> List-Unsubscribe: <https://lists.openvz.org/mailman/options/devel>, <mailto:devel-request@openvz.org?subject=unsubscribe> List-Archive: <http://lists.openvz.org/pipermail/devel/> List-Post: <mailto:devel@openvz.org> List-Help: <mailto:devel-request@openvz.org?subject=help> List-Subscribe: <https://lists.openvz.org/mailman/listinfo/devel>, <mailto:devel-request@openvz.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 6596fb22ab7c..1a3df2eaf7dd 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -9606,6 +9606,9 @@ static int i40e_config_netdev(struct i40e_vsi *vsi) ether_addr_copy(netdev->dev_addr, mac_addr); ether_addr_copy(netdev->perm_addr, mac_addr); + /* i40iw_net_event() reads 16 bytes from neigh->primary_key */ + netdev->neigh_priv_len = sizeof(u32) * 4; + netdev->priv_flags |= IFF_UNICAST_FLT; netdev->priv_flags |= IFF_SUPP_NOFCS; /* Setup netdev TC information */
The commit is pushed to "branch-rh7-3.10.0-862.20.2.vz7.73.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-862.20.2.vz7.73.7 ------> commit 83a6531fe107465a9d2b859314c871b177f53138 Author: Konstantin Khorenko <khorenko@virtuozzo.com> Date: Fri Nov 23 10:24:51 2018 +0300 drivers/net/i40e: define proper net_device::neigh_priv_len Reported by KASan. i40iw_net_event() unconditionally reads 16 bytes from neighbour::priv_key on neigh entry update, but memory evaluated for arp entry on allocation at neigh_event_ns() is evaluated as tbl->entry_size + dev->neigh_priv_len and neigh_priv_len is not inited by the driver. Fix that. net_device allocation stack: alloc_netdev_mqs alloc_etherdev_mqs_rh i40e_vsi_setup i40e_setup_pf_switch i40e_probe neigh entry allocation stack: __kmalloc __neigh_create neigh_event_ns arp_process arp_rcv __netif_receive_skb_core __netif_receive_skb netif_receive_skb_internal napi_gro_receive i40e_clean_rx_irq i40e_napi_poll net_rx_action __do_softirq reading 16 bytes from neighbour::priv_key stack: i40iw_copy_ip_ntohl i40iw_net_event notifier_call_chain atomic_notifier_call_chain call_netevent_notifiers neigh_update neigh_event_ns arp_process arp_rcv __netif_receive_skb_core __netif_receive_skb netif_receive_skb_internal napi_gro_receive i40e_clean_rx_irq i40e_napi_poll net_rx_action __do_softirq https://pmc.acronis.com/browse/VSTOR-17918 Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> --- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++ 1 file changed, 3 insertions(+)