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:	Tue, 17 Jan 2012 21:00:40 +0100 (CET)
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	netdev@...r.kernel.org
Cc:	David Miller <davem@...emloft.net>, Joe Perches <joe@...ches.com>
Subject: [PATCH] net: fix NULL-deref in WARN() in skb_gso_segment()

Bug was introduced in commit c8f44affb7244f2ac3e703cab13d55ede27621bb.

Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
---
 net/core/dev.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

[against net tree]

diff --git a/net/core/dev.c b/net/core/dev.c
index f494675..634a70a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1961,6 +1961,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb,
 	__skb_pull(skb, skb->mac_len);
 
 	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
+		static const netdev_features_t null_features = 0;
 		struct net_device *dev = skb->dev;
 		struct ethtool_drvinfo info = {};
 
@@ -1968,8 +1969,8 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb,
 			dev->ethtool_ops->get_drvinfo(dev, &info);
 
 		WARN(1, "%s: caps=(%pNF, %pNF) len=%d data_len=%d ip_summed=%d\n",
-		     info.driver, dev ? &dev->features : NULL,
-		     skb->sk ? &skb->sk->sk_route_caps : NULL,
+		     info.driver, dev ? &dev->features : &null_features,
+		     skb->sk ? &skb->sk->sk_route_caps : &null_features,
 		     skb->len, skb->data_len, skb->ip_summed);
 
 		if (skb_header_cloned(skb) &&
-- 
1.7.8.3

--
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