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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Dec 2006 17:41:38 +0100 (CET)
From:	Jiri Benc <jbenc@...e.cz>
To:	"John W. Linville" <linville@...driver.com>
Cc:	netdev@...r.kernel.org
Subject: [PATCH 3/14] d80211: fix potential interface name overflow

From: David Kimdon <david.kimdon@...icescape.com>

dev->name and ndev->name are both IFNAMSIZ in length, the ".%d" is
not guarenteed to fit in ndev->name.

Signed-off-by: David Kimdon <david.kimdon@...icescape.com>
Signed-off-by: Jiri Benc <jbenc@...e.cz>

---

 net/d80211/ieee80211_iface.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

e268081fcce1027a23420bfe74c59bf130742bce
diff --git a/net/d80211/ieee80211_iface.c b/net/d80211/ieee80211_iface.c
index ae1fb9e..bb15442 100644
--- a/net/d80211/ieee80211_iface.c
+++ b/net/d80211/ieee80211_iface.c
@@ -56,7 +56,8 @@ int ieee80211_if_add(struct net_device *
 	if (strlen(name) == 0) {
 		i = 0;
 		do {
-			sprintf(ndev->name, "%s.%d", dev->name, i++);
+			snprintf(ndev->name, sizeof(ndev->name), "%s.%d",
+				 dev->name, i++);
 			tmp_dev = dev_get_by_name(ndev->name);
 			if (!tmp_dev)
 				break;
-- 
1.3.0

-
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