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: <20090617082327.196eda07@nehalam>
Date:	Wed, 17 Jun 2009 08:23:27 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: [RFC] skbuff: skb_mac_header_was_set is always true on >32 bit

Looking at the crash in log_martians(), one suspect is that the check for
mac header being set is not correct.  The value of mac_header defaults to
0 on allocation, therefore skb_mac_header_was_set will always be true on
platforms using NET_SKBUFF_USES_OFFSET.

Arnaldo, is this correct?

Signed-off-by: Stephen Hemminger <shemminger@...tta.com>

--- a/net/core/skbuff.c	2009-06-17 08:16:46.235188728 -0700
+++ b/net/core/skbuff.c	2009-06-17 08:17:25.810314332 -0700
@@ -201,6 +201,10 @@ struct sk_buff *__alloc_skb(unsigned int
 	skb->data = data;
 	skb_reset_tail_pointer(skb);
 	skb->end = skb->tail + size;
+#ifdef NET_SKBUFF_DATA_USES_OFFSET
+	skb->mac_header = ~0U;
+#endif
+
 	/* make sure we initialize shinfo sequentially */
 	shinfo = skb_shinfo(skb);
 	atomic_set(&shinfo->dataref, 1);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ