Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168119266
D57555.id179663.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
757 B
Referenced Files
None
Subscribers
None
D57555.id179663.diff
View Options
diff --git a/sys/rpc/rpcsec_tls/rpctls_impl.c b/sys/rpc/rpcsec_tls/rpctls_impl.c
--- a/sys/rpc/rpcsec_tls/rpctls_impl.c
+++ b/sys/rpc/rpcsec_tls/rpctls_impl.c
@@ -388,6 +388,7 @@
uint32_t *gidv;
int i;
+ soref(xprt->xp_socket);
mtx_lock(&rpctls_lock);
RB_INSERT(upsock_t, &upcall_sockets, &ups);
mtx_unlock(&rpctls_lock);
@@ -407,9 +408,18 @@
for (i = 0; i < *ngrps; i++)
*gidp++ = *gidv++;
}
- } else
+ } else {
rpctls_rpc_failed(&ups, xprt->xp_socket);
+ /*
+ * The socket was closed, make sure the krpc code doesn't close
+ * it a second time.
+ */
+ sx_xlock(&ups.xp->xp_lock);
+ ups.xp->xp_tls = RPCTLS_FLAGS_HANDSHFAIL;
+ sx_xunlock(&ups.xp->xp_lock);
+ }
+
mem_free(res.gid.gid_val, 0);
#ifdef INVARIANTS
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 27, 11:35 AM (12 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33933626
Default Alt Text
D57555.id179663.diff (757 B)
Attached To
Mode
D57555: rpcsec_tls: Avoid a socket reference underflow in rpctls_server()
Attached
Detach File
Event Timeline
Log In to Comment