aboutsummaryrefslogtreecommitdiff
path: root/website/static/security/patches/SA-05:04/ifconf4.patch
blob: 80a9b1b1c4cb0ab42ea60cb45c7e60d576ddc10d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: sys/net/if.c
===================================================================
RCS file: /home/ncvs/src/sys/net/if.c,v
retrieving revision 1.85.2.28
diff -u -p -r1.85.2.28 if.c
--- sys/net/if.c	12 Dec 2004 20:12:50 -0000	1.85.2.28
+++ sys/net/if.c	14 Apr 2005 22:10:46 -0000
@@ -1326,6 +1326,12 @@ ifconf(cmd, data)
 		char workbuf[64];
 		int ifnlen, addrs;
 
+		/*
+		 * Zero the ifr_name buffer to make sure we don't
+		 * disclose the contents of the stack.
+		 */
+		memset(ifr.ifr_name, 0, sizeof(ifr.ifr_name));
+
 		if (space <= sizeof (ifr))
 			break;
 		ifnlen = snprintf(workbuf, sizeof(workbuf),