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]
Date:   Mon, 16 Mar 2020 09:04:05 +0800
From:   xiaofeis <xiaofeis@...eaurora.org>
To:     davem@...emloft.net
Cc:     vkoul@...nel.org, netdev@...r.kernel.org, andrew@...n.ch,
        linux-arm-msm@...r.kernel.org, bjorn.andersson@...aro.org,
        vivien.didelot@...il.com, f.fainelli@...il.com,
        niklas.cassel@...aro.org, xiazha@...eaurora.org,
        xiaofeis <xiaofeis@...eaurora.org>
Subject: [PATCH] net: dsa: input correct header length for skb_cow_head()

We need to ensure there is enough headroom to push QCA header,
so input the QCA header length instead of 0.

Signed-off-by: xiaofeis <xiaofeis@...eaurora.org>
---
 net/dsa/tag_qca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index c958852..72c1629 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -36,7 +36,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
 	dev->stats.tx_packets++;
 	dev->stats.tx_bytes += skb->len;
 
-	if (skb_cow_head(skb, 0) < 0)
+	if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
 		return NULL;
 
 	skb_push(skb, QCA_HDR_LEN);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ