Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1821600imm; Mon, 3 Sep 2018 10:18:17 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda6jvZz2zqJrJqRoNxr7D0r+Grh8yhW7m2TdeBO1N1F7tzozSUVy9GtrjfD7vCIHq+xYWGr X-Received: by 2002:a62:959a:: with SMTP id c26-v6mr30664700pfk.234.1535995097587; Mon, 03 Sep 2018 10:18:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995097; cv=none; d=google.com; s=arc-20160816; b=MdDk0s0KFS+l3ozEK9YxGAx77HbwS9J5mTnWftfMGDr67+c4cOaB15JAvk0zz6RseF v6qXXVoThStv/bDIooGccqCe5WOLjIcYUPoMTRJDKny44KhSZcZ2bmxtRk3FQrRe6wb+ sYNI93bUuxKFWxGjOFOqnQZyGiweQ9ZJiM8TeT09oYUl1+nLkVk2fTE4unOYEuEDDWrn Oj0iZ7m5232XKRUI2QefNSEnVCnI3PiSK6yCgHswPTGF1JZi0ipv9CavAtXGCe9r9uW5 wKe91vCDiukcMP6eJAKlNP6Rw2pGYThrvKzpK4z9uAAJsP4Jd1iwmlZygMMVP9b3aiPi M8jg== 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 :arc-authentication-results; bh=cToCHd9xlsVjn8OooQrHzJRH0LMH0Qyo2R9n4lDPT80=; b=gC9S/ocBbt1b6xVPZcR/IAWJfwkmsbgOzCd2bo6UOfwIjYGYKMW4jplYA0nOWftuHa JiQQ60aOgI5Q+Z0Ws41gL6z+4iZjNCUXlHaxi1Yoa4ZodUA6Opw9PHNp+48fTWvyGmgp e5erFAcGtw7ckWCACpqmdfOsAspjbIMutOPUpN1UHGL4ZR0w+uKxnR+r0A3PTE3K8WB/ g3Cia6rv8KaKNx4GtWcnOvxSL9P/fOFcJ9AE9ietCV+YWXO7xmAA6QO05hHPoRBlQohf 9w2tnbQE4wOg6wLu8GH4qNG+xU8kQD4a6JX7ZN8dP8Vyd5KWQqlHVc2BNz3puuDrfsL0 3pFw== ARC-Authentication-Results: i=1; mx.google.com; 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 8-v6si18314743pgu.519.2018.09.03.10.18.02; Mon, 03 Sep 2018 10:18:17 -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; 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 S1730077AbeICViE (ORCPT + 99 others); Mon, 3 Sep 2018 17:38:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42678 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728207AbeICViC (ORCPT ); Mon, 3 Sep 2018 17:38:02 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F4191D02; Mon, 3 Sep 2018 17:16:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Westphal , Eric Dumazet , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 037/165] atl1c: reserve min skb headroom Date: Mon, 3 Sep 2018 18:55:23 +0200 Message-Id: <20180903165656.956018171@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Westphal [ Upstream commit 6e56830776828d8ca9897fc4429eeab47c3bb432 ] Got crash report with following backtrace: BUG: unable to handle kernel paging request at ffff8801869daffe RIP: 0010:[] [] ip6_finish_output2+0x394/0x4c0 RSP: 0018:ffff880186c83a98 EFLAGS: 00010283 RAX: ffff8801869db00e ... [] ip6_finish_output+0x8c/0xf0 [] ip6_output+0x57/0x100 [] ip6_forward+0x4b9/0x840 [] ip6_rcv_finish+0x66/0xc0 [] ipv6_rcv+0x319/0x530 [] netif_receive_skb+0x1c/0x70 [] atl1c_clean+0x1ec/0x310 [atl1c] ... The bad access is in neigh_hh_output(), at skb->data - 16 (HH_DATA_MOD). atl1c driver provided skb with no headroom, so 14 bytes (ethernet header) got pulled, but then 16 are copied. Reserve NET_SKB_PAD bytes headroom, like netdev_alloc_skb(). Compile tested only; I lack hardware. Fixes: 7b7017642199 ("atl1c: Fix misuse of netdev_alloc_skb in refilling rx ring") Signed-off-by: Florian Westphal Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c @@ -1685,6 +1685,7 @@ static struct sk_buff *atl1c_alloc_skb(s skb = build_skb(page_address(page) + adapter->rx_page_offset, adapter->rx_frag_size); if (likely(skb)) { + skb_reserve(skb, NET_SKB_PAD); adapter->rx_page_offset += adapter->rx_frag_size; if (adapter->rx_page_offset >= PAGE_SIZE) adapter->rx_page = NULL;