{"id":1839976,"url":"http://patchwork.ozlabs.org/api/patches/1839976/?format=json","web_url":"http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20230927004025.119111-4-cascardo@canonical.com/","project":{"id":15,"url":"http://patchwork.ozlabs.org/api/projects/15/?format=json","name":"Ubuntu Kernel","link_name":"ubuntu-kernel","list_id":"kernel-team.lists.ubuntu.com","list_email":"kernel-team@lists.ubuntu.com","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20230927004025.119111-4-cascardo@canonical.com>","list_archive_url":null,"date":"2023-09-27T00:40:23","name":"[SRU,OEM-6.1,Lunar,3/5] net: remove osize variable in __alloc_skb()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"c1b8366a6aea61965269147eca916838f321b97d","submitter":{"id":70574,"url":"http://patchwork.ozlabs.org/api/people/70574/?format=json","name":"Thadeu Lima de Souza Cascardo","email":"cascardo@canonical.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20230927004025.119111-4-cascardo@canonical.com/mbox/","series":[{"id":375017,"url":"http://patchwork.ozlabs.org/api/series/375017/?format=json","web_url":"http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=375017","date":"2023-09-27T00:40:20","name":"CVE-2023-42752","version":1,"mbox":"http://patchwork.ozlabs.org/series/375017/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/1839976/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/1839976/checks/","tags":{},"related":[],"headers":{"Return-Path":"<kernel-team-bounces@lists.ubuntu.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":"legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com\n (client-ip=185.125.189.65; helo=lists.ubuntu.com;\n envelope-from=kernel-team-bounces@lists.ubuntu.com;\n receiver=patchwork.ozlabs.org)","Received":["from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4RwHpf3cJsz1yp8\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 27 Sep 2023 10:40:58 +1000 (AEST)","from localhost ([127.0.0.1] helo=lists.ubuntu.com)\n\tby lists.ubuntu.com with esmtp (Exim 4.86_2)\n\t(envelope-from <kernel-team-bounces@lists.ubuntu.com>)\n\tid 1qlIbg-0004gb-8E; Wed, 27 Sep 2023 00:40:48 +0000","from smtp-relay-canonical-0.internal ([10.131.114.83]\n helo=smtp-relay-canonical-0.canonical.com)\n by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.86_2) (envelope-from <cascardo@canonical.com>)\n id 1qlIbZ-0004cl-UG\n for kernel-team@lists.ubuntu.com; Wed, 27 Sep 2023 00:40:42 +0000","from quatroqueijos.lan (1.general.cascardo.us.vpn [10.172.70.58])\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 smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 903FC42A12\n for <kernel-team@lists.ubuntu.com>; Wed, 27 Sep 2023 00:40:38 +0000 (UTC)"],"From":"Thadeu Lima de Souza Cascardo <cascardo@canonical.com>","To":"kernel-team@lists.ubuntu.com","Subject":"[SRU OEM-6.1,Lunar 3/5] net: remove osize variable in __alloc_skb()","Date":"Tue, 26 Sep 2023 21:40:23 -0300","Message-Id":"<20230927004025.119111-4-cascardo@canonical.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20230927004025.119111-1-cascardo@canonical.com>","References":"<20230927004025.119111-1-cascardo@canonical.com>","MIME-Version":"1.0","X-BeenThere":"kernel-team@lists.ubuntu.com","X-Mailman-Version":"2.1.20","Precedence":"list","List-Id":"Kernel team discussions <kernel-team.lists.ubuntu.com>","List-Unsubscribe":"<https://lists.ubuntu.com/mailman/options/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe>","List-Archive":"<https://lists.ubuntu.com/archives/kernel-team>","List-Post":"<mailto:kernel-team@lists.ubuntu.com>","List-Help":"<mailto:kernel-team-request@lists.ubuntu.com?subject=help>","List-Subscribe":"<https://lists.ubuntu.com/mailman/listinfo/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"kernel-team-bounces@lists.ubuntu.com","Sender":"\"kernel-team\" <kernel-team-bounces@lists.ubuntu.com>"},"content":"From: Eric Dumazet <edumazet@google.com>\n\nThis is a cleanup patch, to prepare following change.\n\nSigned-off-by: Eric Dumazet <edumazet@google.com>\nAcked-by: Soheil Hassas Yeganeh <soheil@google.com>\nAcked-by: Paolo Abeni <pabeni@redhat.com>\nReviewed-by: Alexander Duyck <alexanderduyck@fb.com>\nSigned-off-by: Jakub Kicinski <kuba@kernel.org>\n(cherry picked from commit 65998d2bf857b9ae5acc1f3b70892bd1b429ccab)\nCVE-2023-42752\nSigned-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>\n---\n net/core/skbuff.c | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)","diff":"diff --git a/net/core/skbuff.c b/net/core/skbuff.c\nindex beb53b103728..94444244dc16 100644\n--- a/net/core/skbuff.c\n+++ b/net/core/skbuff.c\n@@ -534,7 +534,6 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,\n {\n \tstruct kmem_cache *cache;\n \tstruct sk_buff *skb;\n-\tunsigned int osize;\n \tbool pfmemalloc;\n \tu8 *data;\n \n@@ -560,16 +559,15 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,\n \t * Both skb->head and skb_shared_info are cache line aligned.\n \t */\n \tsize = SKB_HEAD_ALIGN(size);\n-\tosize = kmalloc_size_roundup(size);\n-\tdata = kmalloc_reserve(osize, gfp_mask, node, &pfmemalloc);\n+\tsize = kmalloc_size_roundup(size);\n+\tdata = kmalloc_reserve(size, gfp_mask, node, &pfmemalloc);\n \tif (unlikely(!data))\n \t\tgoto nodata;\n \t/* kmalloc_size_roundup() might give us more room than requested.\n \t * Put skb_shared_info exactly at the end of allocated zone,\n \t * to allow max possible filling before reallocation.\n \t */\n-\tsize = SKB_WITH_OVERHEAD(osize);\n-\tprefetchw(data + size);\n+\tprefetchw(data + SKB_WITH_OVERHEAD(size));\n \n \t/*\n \t * Only clear those fields we need to clear, not those that we will\n@@ -577,7 +575,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,\n \t * the tail pointer in struct sk_buff!\n \t */\n \tmemset(skb, 0, offsetof(struct sk_buff, tail));\n-\t__build_skb_around(skb, data, osize);\n+\t__build_skb_around(skb, data, size);\n \tskb->pfmemalloc = pfmemalloc;\n \n \tif (flags & SKB_ALLOC_FCLONE) {\n","prefixes":["SRU","OEM-6.1","Lunar","3/5"]}