Module: ngircd.git
Branch: branch-20.x
Commit: d24df64397015732bc6cc1c36a4710fc4db271f1
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d24df643…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Aug 21 01:28:49 2013 +0200
Correctly handle return code of Handle_Write()
There have been code paths that ignored the return code of Handle_Write()
when sending "notice auth" messages to new clients connecting to the
server. But because Handle_Write() would have closed the client connection
again if an error occurred, this would have resulted in new errors and
assert()'s later on that could have crashed the server (denial of service).
Only setups having the configuration option "NoticeAuth" enabled are
affected, which is not the default.
CVE-2013-5580.
(cherry picked from commit 309122017ebc6fff039a7cab1b82f632853d82d5)
---
src/ngircd/conn.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 80b085a..e3921f9 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1547,7 +1547,11 @@ Conn_StartLogin(CONN_ID Idx)
#endif
(void)Conn_WriteStr(Idx,
"NOTICE AUTH :*** Looking up your hostname");
- (void)Handle_Write(Idx);
+ /* Send buffered data to the client, but break on errors
+ * because Handle_Write() would have closed the connection
+ * again in this case! */
+ if (!Handle_Write(Idx))
+ return;
}
Resolve_Addr(&My_Connections[Idx].proc_stat, &My_Connections[Idx].addr,
@@ -2339,8 +2343,13 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
}
#endif
- if (Conf_NoticeAuth)
- (void)Handle_Write(i);
+ if (Conf_NoticeAuth) {
+ /* Send buffered data to the client, but break on
+ * errors because Handle_Write() would have closed
+ * the connection again in this case! */
+ if (!Handle_Write(i))
+ return;
+ }
Class_HandleServerBans(c);
}
Module: ngircd.git
Branch: branch-20.x
Commit: bb6e2779636aa6d74bbff474880829f0183a3c94
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=bb6e2779…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Aug 23 21:54:40 2013 +0200
ngIRCd Release 20.3
---
ChangeLog | 10 +++++++++-
NEWS | 11 ++++++++++-
contrib/Debian/changelog | 6 ++++++
contrib/ngircd.spec | 2 +-
4 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 08d337f..5920316 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,10 +9,18 @@
-- ChangeLog --
+ngIRCd 20.3 (2013-08-23)
+
+ - Security: Fix a denial of service bug (server crash) which could happen
+ when the configuration option "NoticeAuth" is enabled (which is NOT the
+ default) and ngIRCd failed to send the "notice auth" messages to new
+ clients connecting to the server (CVE-2013-5580).
+
ngIRCd 20.2 (2013-02-15)
- Security: Fix a denial of service bug in the function handling KICK
- commands that could be used by arbitrary users to to crash the daemon.
+ commands that could be used by arbitrary users to to crash the daemon
+ (CVE-2013-1747).
- WHO command: Use the currently "displayed hostname" (which can be cloaked!)
for hostname matching, not the real one. In other words: don't display all
the cloaked users on a specific real hostname!
diff --git a/NEWS b/NEWS
index 38f6029..d092510 100644
--- a/NEWS
+++ b/NEWS
@@ -9,11 +9,20 @@
-- NEWS --
+ngIRCd 20.3 (2013-08-23)
+
+ - This release is a bugfix release only, without new features.
+ - Security: Fix a denial of service bug (server crash) which could happen
+ when the configuration option "NoticeAuth" is enabled (which is NOT the
+ default) and ngIRCd failed to send the "notice auth" messages to new
+ clients connecting to the server (CVE-2013-5580).
+
ngIRCd 20.2 (2013-02-15)
- This release is a bugfix release only, without new features.
- Security: Fix a denial of service bug in the function handling KICK
- commands that could be used by arbitrary users to to crash the daemon.
+ commands that could be used by arbitrary users to to crash the daemon
+ (CVE-2013-1747).
ngIRCd 20.1 (2013-01-02)
diff --git a/contrib/Debian/changelog b/contrib/Debian/changelog
index 2e39af0..396d1d0 100644
--- a/contrib/Debian/changelog
+++ b/contrib/Debian/changelog
@@ -1,3 +1,9 @@
+ngircd (20.3-0ab1) unstable; urgency=high
+
+ * New "upstream" release, fixing a security related bug: ngIRCd 20.3.
+
+ -- Alexander Barton <alex(a)barton.de> Fri, 23 Aug 2013 21:53:21 +0200
+
ngircd (20.2-0ab1) unstable; urgency=high
* New "upstream" release, fixing a security related bug: ngIRCd 20.2.
diff --git a/contrib/ngircd.spec b/contrib/ngircd.spec
index e2448a4..0469313 100644
--- a/contrib/ngircd.spec
+++ b/contrib/ngircd.spec
@@ -1,5 +1,5 @@
%define name ngircd
-%define version 20.2
+%define version 20.3
%define release 1
%define prefix %{_prefix}
Module: ngircd.git
Branch: master
Commit: 309122017ebc6fff039a7cab1b82f632853d82d5
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=30912201…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Aug 21 01:28:49 2013 +0200
Correctly handle return code of Handle_Write()
There have been code paths that ignored the return code of Handle_Write()
when sending "notice auth" messages to new clients connecting to the
server. But because Handle_Write() would have closed the client connection
again if an error occurred, this would have resulted in new errors and
assert()'s later on that could have crashed the server (denial of service).
Only setups having the configuration option "NoticeAuth" enabled are
affected, which is not the default.
CVE-2013-5580.
---
src/ngircd/conn.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 30dfd09..8d72c1c 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1668,7 +1668,11 @@ Conn_StartLogin(CONN_ID Idx)
#endif
(void)Conn_WriteStr(Idx,
"NOTICE AUTH :*** Looking up your hostname");
- (void)Handle_Write(Idx);
+ /* Send buffered data to the client, but break on errors
+ * because Handle_Write() would have closed the connection
+ * again in this case! */
+ if (!Handle_Write(Idx))
+ return;
}
Resolve_Addr(&My_Connections[Idx].proc_stat, &My_Connections[Idx].addr,
@@ -2458,8 +2462,13 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
}
#endif
- if (Conf_NoticeAuth)
- (void)Handle_Write(i);
+ if (Conf_NoticeAuth) {
+ /* Send buffered data to the client, but break on
+ * errors because Handle_Write() would have closed
+ * the connection again in this case! */
+ if (!Handle_Write(i))
+ return;
+ }
Class_HandleServerBans(c);
}
Module: ngircd.git
Branch: master
Commit: 212d99146d4a3681976450b5ff0dfa57e1d2e44f
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=212d9914…
Author: Alexander Barton <alex(a)barton.de>
Date: Tue Aug 20 13:08:43 2013 +0200
Update ChangeLog file
---
ChangeLog | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index af4bc08..9fe53c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@
ngIRCd 21
+ - Enforce "penalty times" on error conditions more consistently and in
+ more places. Now most error codes sent back from the IRC server to the
+ client should result in a 2 second "penalty".
- Implement a new configuration option "AllowedChannelTypes" that lists
all allowed channel types (channel prefixes) for newly created channels
on the local server. By default, all supported channel types are allowed.
@@ -85,8 +88,8 @@ ngIRCd 21
of an IRC service id displayed in the output.
- Exit message: use singular & plural :-)
- autogen.sh: Check for autoconf/automake wrapper scripts
- - Add missing punctuation marks in log messages and adjust some
- severity levels.
+ - Add missing punctuation marks in log messages, adjust some severity
+ levels, and make SSL-related messages more readable.
- AUTHORS file: Update list of contributors.
- Update systemd(8) example configuration files in ./contrib/ directory:
the "ngircd.service" file now uses the "forking" service type which
Module: ngircd.git
Branch: master
Commit: e2f09213bcef479e7b3a35d67b1cc6b76f2205fb
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e2f09213…
Author: Alexander Barton <alex(a)barton.de>
Date: Mon Aug 19 23:31:10 2013 +0200
Debian init script: test for binary after reading defaults
This allows the system administrator to overwrite the DAEMON variable in
/etc/defaults/<name> and to use this init script even when the default
"/usr/sbin/ngircd" doesn't exist on the system.
---
contrib/Debian/ngircd.default | 2 --
contrib/Debian/ngircd.init | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/contrib/Debian/ngircd.default b/contrib/Debian/ngircd.default
index 5b6c93f..add278f 100644
--- a/contrib/Debian/ngircd.default
+++ b/contrib/Debian/ngircd.default
@@ -1,8 +1,6 @@
#
# Defaults for ngIRCd start and stop script
#
-# $Id: ngircd.default,v 1.1 2003/12/31 17:20:11 alex Exp $
-#
# Parameters to pass to the ngircd daemon on startup, see ngircd(8) for
# possible options (default: empty).
diff --git a/contrib/Debian/ngircd.init b/contrib/Debian/ngircd.init
index 6a418d7..8639e22 100755
--- a/contrib/Debian/ngircd.init
+++ b/contrib/Debian/ngircd.init
@@ -1,7 +1,7 @@
#!/bin/sh
#
# ngIRCd start and stop script for Debian-based systems
-# Copyright 2008-2010 Alexander Barton <alex(a)barton.de>
+# Copyright 2008-2013 Alexander Barton <alex(a)barton.de>
#
### BEGIN INIT INFO
@@ -24,13 +24,13 @@ PARAMS=""
STARTTIME=1
DIETIME=10
-test -x $DAEMON || exit 5
-
test -h "$0" && me=`readlink $0` || me="$0"
BASENAME=`basename $me`
test -r /etc/default/$BASENAME && . /etc/default/$BASENAME
+test -x $DAEMON || exit 5
+
# LSB compatibility functions that become used if there is no local
# include file available.
log_daemon_msg() {