diff options
author | Cy Schubert <cy@FreeBSD.org> | 2008-03-19 19:26:53 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2008-03-19 19:26:53 +0000 |
commit | 14ff4ec24cf8ca0a73ab4cc8b4c533a8a56f4e03 (patch) | |
tree | 7ce28225a2c4e61b94488e687669ed737a00901b /security/krb5-16/files/patch-lib-rpc-svc_tcp.c | |
parent | - Use USE_GL instead of depending directly on glut (diff) |
Fixes for multiple vulnerabilities.
Security: US-CERT Technical Cyber Security Alert TA08-079B --
MIT Kerberos Updates for Multiple Vulnerabilities
US-CERT Vulnerability Note VU#895609,
US-CERT Vulnerability Note VU#374121
MIT krb5 Security Advisory 2008-001
MIT krb5 Security Advisory 2008-002
Diffstat (limited to 'security/krb5-16/files/patch-lib-rpc-svc_tcp.c')
-rw-r--r-- | security/krb5-16/files/patch-lib-rpc-svc_tcp.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/security/krb5-16/files/patch-lib-rpc-svc_tcp.c b/security/krb5-16/files/patch-lib-rpc-svc_tcp.c new file mode 100644 index 000000000000..9c51fafc62bf --- /dev/null +++ b/security/krb5-16/files/patch-lib-rpc-svc_tcp.c @@ -0,0 +1,51 @@ +=== lib/rpc/svc_tcp.c +================================================================== +--- lib/rpc/svc_tcp.c (revision 1666) ++++ lib/rpc/svc_tcp.c (local) +@@ -54,6 +54,14 @@ + extern errno; + */ + ++#ifndef FD_SETSIZE ++#ifdef NBBY ++#define NOFILE (sizeof(int) * NBBY) ++#else ++#define NOFILE (sizeof(int) * 8) ++#endif ++#endif ++ + /* + * Ops vector for TCP/IP based rpc service handle + */ +@@ -215,6 +223,19 @@ + register SVCXPRT *xprt; + register struct tcp_conn *cd; + ++#ifdef FD_SETSIZE ++ if (fd >= FD_SETSIZE) { ++ (void) fprintf(stderr, "svc_tcp: makefd_xprt: fd too high\n"); ++ xprt = NULL; ++ goto done; ++ } ++#else ++ if (fd >= NOFILE) { ++ (void) fprintf(stderr, "svc_tcp: makefd_xprt: fd too high\n"); ++ xprt = NULL; ++ goto done; ++ } ++#endif + xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); + if (xprt == (SVCXPRT *)NULL) { + (void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); +@@ -271,6 +292,10 @@ + * make a new transporter (re-uses xprt) + */ + xprt = makefd_xprt(sock, r->sendsize, r->recvsize); ++ if (xprt == NULL) { ++ close(sock); ++ return (FALSE); ++ } + xprt->xp_raddr = addr; + xprt->xp_addrlen = len; + xprt->xp_laddr = laddr; + |