dont-leak-random-kernel-data-20040415
authorNickolai Zeldovich <kolya@mit.edu>
Fri, 16 Apr 2004 05:57:01 +0000 (05:57 +0000)
committerNickolai Zeldovich <kolya@mit.edu>
Fri, 16 Apr 2004 05:57:01 +0000 (05:57 +0000)
Zero out data structure being returned to user, so that we don't
send random kernel memory garbage to them.

src/afs/afs_callback.c

index 913ae32..dfe0127 100644 (file)
@@ -975,6 +975,8 @@ SRXAFSCB_WhoAreYou(struct rx_call *a_call, struct interfaceAddr *addr)
 
     AFS_STATCNT(SRXAFSCB_WhoAreYou);
 
+    memset(addr, 0, sizeof(*addr));
+
     ObtainReadLock(&afs_xinterface);
 
     /* return all network interface addresses */