lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250625112725.1096550-1-c-vankar@ti.com>
Date: Wed, 25 Jun 2025 16:57:25 +0530
From: Chintan Vankar <c-vankar@...com>
To: <andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <rogerq@...nel.org>,
        <horms@...nel.org>, <mwalle@...nel.org>, <jacob.e.keller@...el.com>,
        <jpanis@...libre.com>
CC: <s-vadapalli@...com>, <danishanwar@...com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, Chintan Vankar <c-vankar@...com>
Subject: [PATCH net] net: ethernet: ti: am65-cpsw-nuss: Fix skb size by accounting for skb_shared_info

While transitioning from netdev_alloc_ip_align to build_skb, memory for
skb_shared_info was not allocated. Fix this by including
sizeof(skb_shared_info) in the packet length during allocation.

Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support")
Signed-off-by: Chintan Vankar <c-vankar@...com>
---

This patch is based on the commit '9caca6ac0e26' of origin/main branch of
Linux-net repository.

 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index f20d1ff192ef..3905eec0b11e 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -857,6 +857,7 @@ static struct sk_buff *am65_cpsw_build_skb(void *page_addr,
 	struct sk_buff *skb;
 
 	len += AM65_CPSW_HEADROOM;
+	len += SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
 
 	skb = build_skb(page_addr, len);
 	if (unlikely(!skb))
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ