Skip to content

Commit

Permalink
Merge pull request #89 from kobishmueli/sslbug
Browse files Browse the repository at this point in the history
Fix a security bug on readwrite_client() that could lead to server crashes by SSL users
  • Loading branch information
eaescob authored Nov 28, 2018
2 parents 8e6e30b + cd68976 commit f6db2e1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
19 changes: 19 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Changes for 2.1.4:
------------------
- typo fix (cptr --> sptr) that could lead to server crashes in some cases
- Duplicate USER_VERBOSE and OPER_VERBOSE xflags into USER_VERBOSEV2 and OPER_VERBOSEV2
(this will make it easier for us to enable them on upgraded servers without affecting non-upgraded servers).
- Don't accept too long hostnames from WEBIRC
- Don't allow WEBIRC to use 0.0.0.*, 127.0.0.* or Staff_Address
- Don't allow WEBIRC to use DEFAULT_STAFF_ADDRESS either
- Make sure the host on WEBIRC will have at least one dot
- Allow WEBIRC hosts to have a semicolon too (for IPv6 IP addresses)

Changes for 2.1.3 (private release):
------------------------------------
- Optimize sendto_channel_butone() and sendto_channel_butlocal() functions
- More sanity checks (just to be on the safe side...)
- Fix SVSXCF calls with no channel name on send_topic_burst()
- Cosmetic change (clarify what umode +y does)
- Fix a security bug on readwrite_client() that could lead to server crashes by SSL users

Changes for 2.1.2:
------------------
- Increase the umode buffer on register_user() to prevent a possible
Expand Down
2 changes: 1 addition & 1 deletion include/patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define BASENAME "bahamut"
#define MAJOR 2
#define MINOR 1
#define PATCH 2
#define PATCH 4

#define PATCHES ""

Expand Down
4 changes: 4 additions & 0 deletions src/s_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,11 @@ int readwrite_client(aClient *cptr, int isread, int iswrite)
if(cptr->ssl && IsSSL(cptr) && !SSL_is_init_finished(cptr->ssl))
{
if(IsDead(cptr) || !safe_ssl_accept(cptr, cptr->fd))
{
if(IsClient(cptr))
return exit_client(cptr, cptr, &me, iswrite?"Write Error: SSL Bug #7845":"Read Error: SSL Bug #7845");
close_connection(cptr);
}
return 1;
}
#endif
Expand Down

0 comments on commit f6db2e1

Please sign in to comment.