aboutsummaryrefslogtreecommitdiff
path: root/src/lib/rpc
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2007-01-09 19:45:10 +0000
committerTom Yu <tlyu@mit.edu>2007-01-09 19:45:10 +0000
commit80f701fb42806dc549cf86a83b3aadbdd07d4c6b (patch)
tree1812b58e820c5a20d019d64e656d04c4bbff1984 /src/lib/rpc
parent100fc74f7223a3f43cddc4578eff2c7f3060f540 (diff)
downloadkrb5-80f701fb42806dc549cf86a83b3aadbdd07d4c6b.zip
krb5-80f701fb42806dc549cf86a83b3aadbdd07d4c6b.tar.gz
krb5-80f701fb42806dc549cf86a83b3aadbdd07d4c6b.tar.bz2
MITKRB5-SA-2006-002: svctcp_destroy() can call uninitialized function pointer
Explicitly null out xprt->xp_auth when AUTH_GSSAPI is being used, so that svctcp_destroy() will not call through an uninitialized function pointer after code in svc_auth_gssapi.c has destroyed expired state structures. We can't unconditionally null it because the RPCSEC_GSS implementation needs it to retrieve state. ticket: new target_version: 1.6 tags: pullup component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19042 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
-rw-r--r--src/lib/rpc/svc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/rpc/svc.c b/src/lib/rpc/svc.c
index 9fa7b33..93b4fd1 100644
--- a/src/lib/rpc/svc.c
+++ b/src/lib/rpc/svc.c
@@ -437,6 +437,8 @@ svc_getreqset(FDSET_TYPE *readfds)
#endif
}
+extern struct svc_auth_ops svc_auth_gss_ops;
+
static void
svc_do_xprt(SVCXPRT *xprt)
{
@@ -518,6 +520,9 @@ svc_do_xprt(SVCXPRT *xprt)
if ((stat = SVC_STAT(xprt)) == XPRT_DIED){
SVC_DESTROY(xprt);
break;
+ } else if ((xprt->xp_auth != NULL) &&
+ (xprt->xp_auth->svc_ah_ops != &svc_auth_gss_ops)) {
+ xprt->xp_auth = NULL;
}
} while (stat == XPRT_MOREREQS);