Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2205906/?format=api
{ "id": 2205906, "url": "http://patchwork.ozlabs.org/api/patches/2205906/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260305224506.424785-1-mschmidt@redhat.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260305224506.424785-1-mschmidt@redhat.com>", "list_archive_url": null, "date": "2026-03-05T22:45:06", "name": "[net] ice: fix double-free of tx_buf skb", "commit_ref": null, "pull_url": null, "state": "under-review", "archived": false, "hash": "6e171033c68c5d75a436dd4275aef61f0b1b195b", "submitter": { "id": 1162, "url": "http://patchwork.ozlabs.org/api/people/1162/?format=api", "name": "Michal Schmidt", "email": "mschmidt@redhat.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api", "username": "anguy11", "first_name": "Anthony", "last_name": "Nguyen", "email": "anthony.l.nguyen@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260305224506.424785-1-mschmidt@redhat.com/mbox/", "series": [ { "id": 494632, "url": "http://patchwork.ozlabs.org/api/series/494632/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=494632", "date": "2026-03-05T22:45:06", "name": "[net] ice: fix double-free of tx_buf skb", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/494632/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2205906/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2205906/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=2dRbiepe;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fRl4H2rcNz1xyl\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 06 Mar 2026 09:45:35 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id B808041ADE;\n\tThu, 5 Mar 2026 22:45:33 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id iGBSHcgJ2JxS; Thu, 5 Mar 2026 22:45:32 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 07EF241AB2;\n\tThu, 5 Mar 2026 22:45:32 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists1.osuosl.org (Postfix) with ESMTP id E59DB2D1\n for <intel-wired-lan@lists.osuosl.org>; Thu, 5 Mar 2026 22:45:30 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id C841F41AB2\n for <intel-wired-lan@lists.osuosl.org>; Thu, 5 Mar 2026 22:45:30 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id wVMZ_h73V7N8 for <intel-wired-lan@lists.osuosl.org>;\n Thu, 5 Mar 2026 22:45:30 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp4.osuosl.org (Postfix) with ESMTPS id C1C8641AB1\n for <intel-wired-lan@lists.osuosl.org>; Thu, 5 Mar 2026 22:45:29 +0000 (UTC)", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-217-TK1-yPegMhyQlFXKJDGNxA-1; Thu,\n 05 Mar 2026 17:45:23 -0500", "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 242101809A0A; Thu, 5 Mar 2026 22:45:20 +0000 (UTC)", "from rhel-developer-toolbox-latest.redhat.com (unknown\n [10.44.32.185])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 0BD40180076C; Thu, 5 Mar 2026 22:45:15 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 07EF241AB2", "OpenDKIM Filter v2.11.0 smtp4.osuosl.org C1C8641AB1" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1772750732;\n\tbh=LEBDX6iYXIrymyD5eM+iy+hhDEDKvQ4eGyExCHAPNJc=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=2dRbiepene9zfvRxyQe8av1b+h+qdC7nJgrwPpGhrdWlqscmJQ/+IJ9a0+NUt0T5Y\n\t 0hsiAayIwQm91CBU/uzYMy/Gn3a1y0VPuMCbgMVH3MTxPgsgMKXPgVX8TC9dq3MP1G\n\t D1ysoV4Zh0U/vxPqeA05c3R8xd9blu6HGO61Mw6SBnkNHfhFJaUko4IyEer8UrOgji\n\t XwHAss5VVGIyBx7KwdM1X8eX5nVTZLGlZfapyKXfXwhswgmfDXVZ5kfEDhaorajv5P\n\t LbgVdZh02/rLKY8oTPhctjPK5ZlRLhOEZ/A05jTCOvsWtCf5WgqVNkfFbx9CwF9YVj\n\t sDwAvTWNse/cA==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=mschmidt@redhat.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org C1C8641AB1", "X-MC-Unique": "TK1-yPegMhyQlFXKJDGNxA-1", "X-Mimecast-MFC-AGG-ID": "TK1-yPegMhyQlFXKJDGNxA_1772750721", "From": "Michal Schmidt <mschmidt@redhat.com>", "To": "Tony Nguyen <anthony.l.nguyen@intel.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>,\n \"David S. Miller\" <davem@davemloft.net>,\n Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>,\n Paolo Abeni <pabeni@redhat.com>,\n Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "Cc": "intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,\n linux-kernel@vger.kernel.org", "Date": "Thu, 5 Mar 2026 23:45:06 +0100", "Message-ID": "<20260305224506.424785-1-mschmidt@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111", "X-Mimecast-MFC-PROC-ID": "ufPsvS1v-IQm1talV6q9Ga-l-OALjutrR9As-_sfNNs_1772750721", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com;\n s=mimecast20190719; t=1772750727;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=LEBDX6iYXIrymyD5eM+iy+hhDEDKvQ4eGyExCHAPNJc=;\n b=M4c/qjtI6G8RKwx308d/19ColoHwroTijSi0l2sw+MIhNcZk61dlNWkufaY+1qCpbSdBZO\n dB7NOB69YllCqNblNZXSi9G3DcYWy3g9zvChkCKKY9Ub4TfEr9RjUSARa4ZoCpl4IyehUs\n MeREV08chQovYd1gkkT11XxPGgoVxCc=", "X-Mailman-Original-Authentication-Results": [ "smtp4.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "smtp4.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=M4c/qjtI" ], "Subject": "[Intel-wired-lan] [PATCH net] ice: fix double-free of tx_buf skb", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "If ice_tso() or ice_tx_csum() fail, the error path in\nice_xmit_frame_ring() frees the skb, but the 'first' tx_buf still points\nto it and is marked as valid (ICE_TX_BUF_SKB).\n'next_to_use' remains unchanged, so the potential problem will\nlikely fix itself when the next packet is transmitted and the tx_buf\ngets overwritten. But if there is no next packet and the interface is\nbrought down instead, ice_clean_tx_ring() -> ice_unmap_and_free_tx_buf()\nwill find the tx_buf and free the skb for the second time.\n\nThe fix is to reset the tx_buf type to ICE_TX_BUF_EMPTY in the error\npath, so that ice_unmap_and_free_tx_buf().\nMove the initialization of 'first' up, to ensure it's already valid in\ncase we hit the linearization error path.\n\nThe bug was spotted by AI while I had it looking for something else.\nIt also proposed an initial version of the patch.\n\nI reproduced the bug and tested the fix by adding code to inject\nfailures, on a build with KASAN.\n\nI looked for similar bugs in related Intel drivers and did not find any.\n\nFixes: d76a60ba7afb (\"ice: Add support for VLANs and offloads\")\nAssisted-by: Claude:claude-4.6-opus-high Cursor\nSigned-off-by: Michal Schmidt <mschmidt@redhat.com>\n---\n drivers/net/ethernet/intel/ice/ice_txrx.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c\nindex a5bbce68f76c..4dc535a3f34b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.c\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c\n@@ -2156,6 +2156,9 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_tx_ring *tx_ring)\n \n \tice_trace(xmit_frame_ring, tx_ring, skb);\n \n+\t/* record the location of the first descriptor for this packet */\n+\tfirst = &tx_ring->tx_buf[tx_ring->next_to_use];\n+\n \tcount = ice_xmit_desc_count(skb);\n \tif (ice_chk_linearize(skb, count)) {\n \t\tif (__skb_linearize(skb))\n@@ -2181,8 +2184,6 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_tx_ring *tx_ring)\n \n \toffload.tx_ring = tx_ring;\n \n-\t/* record the location of the first descriptor for this packet */\n-\tfirst = &tx_ring->tx_buf[tx_ring->next_to_use];\n \tfirst->skb = skb;\n \tfirst->type = ICE_TX_BUF_SKB;\n \tfirst->bytecount = max_t(unsigned int, skb->len, ETH_ZLEN);\n@@ -2247,6 +2248,7 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_tx_ring *tx_ring)\n out_drop:\n \tice_trace(xmit_frame_ring_drop, tx_ring, skb);\n \tdev_kfree_skb_any(skb);\n+\tfirst->type = ICE_TX_BUF_EMPTY;\n \treturn NETDEV_TX_OK;\n }\n \n", "prefixes": [ "net" ] }