Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/534313/?format=api
{ "id": 534313, "url": "http://patchwork.ozlabs.org/api/patches/534313/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20151022091013.GC9202@mwanda/", "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": "<20151022091013.GC9202@mwanda>", "list_archive_url": null, "date": "2015-10-22T09:10:14", "name": "igbvf: integer overflow in igbvf_change_mtu()", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "c77838504874b31781d84073afd506936a865a52", "submitter": { "id": 9327, "url": "http://patchwork.ozlabs.org/api/people/9327/?format=api", "name": "Dan Carpenter", "email": "dan.carpenter@oracle.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20151022091013.GC9202@mwanda/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/534313/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/534313/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 0871A140D7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 22 Oct 2015 20:10:31 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id F37958AF82;\n\tThu, 22 Oct 2015 09:10:29 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id pMs9uNC9BwDY; Thu, 22 Oct 2015 09:10:29 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8F1688AB05;\n\tThu, 22 Oct 2015 09:10:29 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 710C71C44B8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Oct 2015 09:10:29 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6905F8DE53\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Oct 2015 09:10:29 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id MPa62DD4ITbn for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Oct 2015 09:10:26 +0000 (UTC)", "from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 7FC198F4DC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Oct 2015 09:10:26 +0000 (UTC)", "from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])\n\tby aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2)\n\twith ESMTP id t9M9ANIq002417\n\t(version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);\n\tThu, 22 Oct 2015 09:10:23 GMT", "from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])\n\tby aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id\n\tt9M9ANO3010328\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); \n\tThu, 22 Oct 2015 09:10:23 GMT", "from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12])\n\tby aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id\n\tt9M9ANnd011321; Thu, 22 Oct 2015 09:10:23 GMT", "from mwanda (/154.0.139.178) by default (Oracle Beehive Gateway\n\tv4.0) with ESMTP ; Thu, 22 Oct 2015 02:10:22 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "Date": "Thu, 22 Oct 2015 12:10:14 +0300", "From": "Dan Carpenter <dan.carpenter@oracle.com>", "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "Message-ID": "<20151022091013.GC9202@mwanda>", "MIME-Version": "1.0", "Content-Disposition": "inline", "User-Agent": "Mutt/1.5.23 (2014-03-12)", "X-Source-IP": "aserv0022.oracle.com [141.146.126.234]", "Cc": "kernel-janitors@vger.kernel.org, intel-wired-lan@lists.osuosl.org", "Subject": "[Intel-wired-lan] [patch] igbvf: integer overflow in\n\tigbvf_change_mtu()", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "The \"new_mtu\" is between 0 and INT_MAX but when we add ETH_HLEN and\nETH_FCS_LEN to it then it could overflow so \"max_frame\" is negative. We\ncap the upper bound of \"max_frame\" but we don't check for negative\nvalues. This leads to a static checker warning.\n\nSigned-off-by: Dan Carpenter <dan.carpenter@oracle.com>", "diff": "diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c\nindex 297af80..fa338e0 100644\n--- a/drivers/net/ethernet/intel/igbvf/netdev.c\n+++ b/drivers/net/ethernet/intel/igbvf/netdev.c\n@@ -2350,7 +2350,7 @@ static struct net_device_stats *igbvf_get_stats(struct net_device *netdev)\n static int igbvf_change_mtu(struct net_device *netdev, int new_mtu)\n {\n \tstruct igbvf_adapter *adapter = netdev_priv(netdev);\n-\tint max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;\n+\tunsigned int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;\n \n \tif (new_mtu < 68 || new_mtu > INT_MAX - ETH_HLEN - ETH_FCS_LEN ||\n \t max_frame > MAX_JUMBO_FRAME_SIZE)\n", "prefixes": [] }