Message ID | 20211213092929.297209132@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF4A7C4332F for <stable@archiver.kernel.org>; Mon, 13 Dec 2021 09:40:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235063AbhLMJkC (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 13 Dec 2021 04:40:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233194AbhLMJiZ (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 13 Dec 2021 04:38:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67964C08E852; Mon, 13 Dec 2021 01:37:05 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 30EDAB80E26; Mon, 13 Dec 2021 09:37:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63F32C341DD; Mon, 13 Dec 2021 09:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1639388222; bh=4al9+ERPIFuH1cCILaqVv4b0LHHPabjQ/aKP9AVPO4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GSFJfB9xAdp2BO404nHZ0J8vfmrA+MLtyn9dD7QT/NEVwFOD6Gu6nFDglEJrgBHza bIaXHEn/uRC5t4/9uQvspuPBAViCTan/5IwScl+q1xsrBWVod8kZ0COVFQJPm3+tdk lz5wkW59wbKVNAlzykl9hBEe93V0kUlbWZBWg5/M= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Manish Chopra <manishc@marvell.com>, Alok Prasad <palok@marvell.com>, Prabhakar Kushwaha <pkushwaha@marvell.com>, Ariel Elior <aelior@marvell.com>, Jakub Kicinski <kuba@kernel.org> Subject: [PATCH 4.14 28/53] qede: validate non LSO skb length Date: Mon, 13 Dec 2021 10:30:07 +0100 Message-Id: <20211213092929.297209132@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213092928.349556070@linuxfoundation.org> References: <20211213092928.349556070@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c +++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c @@ -1580,6 +1580,13 @@ netdev_tx_t qede_start_xmit(struct sk_bu data_split = true; } } else { + if (unlikely(skb->len > ETH_TX_MAX_NON_LSO_PKT_LEN)) { + DP_ERR(edev, "Unexpected non LSO skb length = 0x%x\n", skb->len); + qede_free_failed_tx_pkt(txq, first_bd, 0, false); + qede_update_tx_producer(txq); + return NETDEV_TX_OK; + } + val |= ((skb->len & ETH_TX_DATA_1ST_BD_PKT_LEN_MASK) << ETH_TX_DATA_1ST_BD_PKT_LEN_SHIFT); }