Module: ngircd.git
Branch: master
Commit: 627b0b713c52406e50c84bb9459e7794262920a2
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=627b0b71…
Author: Florian Westphal <fw(a)strlen.de>
Date: Mon May 4 23:51:24 2009 +0200
security: fix remotely triggerable crash in SSL/TLS code
When a server is running with SSL/TLS support compiled in,
it is trivial to crash the server by sending an MOTD request
via another server in the network.
- ONLY servers without ssl/tls support compiled in are not affected.
Disabling SSL in the configuration (no ssl listening ports, etc)
does NOT help.
- servers that are running standalone (i.e., not connected to any
other servers) are not affected, either.
This affects all ngircd releases since ngircd 13 (earlier versions
have no SSL/TLS support).
---
src/ngircd/conn.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 9752a61..c6095a3 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1951,6 +1951,9 @@ Conn_GetClient( CONN_ID Idx )
GLOBAL bool
Conn_GetCipherInfo(CONN_ID Idx, char *buf, size_t len)
{
+ if (Idx < 0)
+ return false;
+ assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
return ConnSSL_GetCipherInfo(&My_Connections[Idx], buf, len);
}
@@ -1958,6 +1961,9 @@ Conn_GetCipherInfo(CONN_ID Idx, char *buf, size_t len)
GLOBAL bool
Conn_UsesSSL(CONN_ID Idx)
{
+ if (Idx < 0)
+ return false;
+ assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
return Conn_OPTION_ISSET(&My_Connections[Idx], CONN_SSL);
}
#endif
Module: ngircd.git
Branch: master
Commit: 95428a72ffb5214826b61d5e77f860e7ef6a6c9e
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=95428a72…
Author: Alexander Barton <alex(a)barton.de>
Date: Mon May 4 11:23:19 2009 +0200
Fixed "Conflicts:" line in debian/control: missing comma
---
contrib/Debian/changelog | 6 ++++++
contrib/Debian/control | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/contrib/Debian/changelog b/contrib/Debian/changelog
index 8bce849..f41f1d8 100644
--- a/contrib/Debian/changelog
+++ b/contrib/Debian/changelog
@@ -1,3 +1,9 @@
+ngircd (14-0ab3) unstable; urgency=low
+
+ * Fixed "Conflicts:" line in debian/control: missing comma.
+
+ -- Alexander Barton <alex(a)barton.de> Mon, 4 May 2009 11:21:55 +0200
+
ngircd (14-0ab2) unstable; urgency=low
* Add new "ngircd-full-dbg" package including degug code and both
diff --git a/contrib/Debian/control b/contrib/Debian/control
index fa393ec..13163ce 100644
--- a/contrib/Debian/control
+++ b/contrib/Debian/control
@@ -32,7 +32,7 @@ Package: ngircd-full
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
-Conflicts: ngircd ngircd-dbg
+Conflicts: ngircd, ngircd-dbg
Description: A lightweight daemon for the Internet Relay Chat (IRC)
ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
network. It is written from scratch and is not based upon the original
@@ -55,7 +55,7 @@ Package: ngircd-full-dbg
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
-Conflicts: ngircd ngircd-full
+Conflicts: ngircd, ngircd-full
Description: A lightweight daemon for the Internet Relay Chat (IRC)
ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
network. It is written from scratch and is not based upon the original
Module: ngircd.git
Branch: master
Commit: 6b83d1740eb892c90f92fac55d9bbc362346feb5
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=6b83d174…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Apr 29 02:13:27 2009 +0200
Debian: build ngircd-full-dbg package
In addition to the "ngircd" and "ngircd-full" packages a new package named
"ngircd-full-dbg" is build: this package contains all the features of the
"full" package but includes debug code and both the --debug and --sniffer
options and the resulting binaries are _not_ stripped.
---
contrib/Debian/.gitignore | 4 +++
contrib/Debian/Makefile.am | 7 +++-
contrib/Debian/changelog | 7 +++++
contrib/Debian/control | 28 +++++++++++++++++++-
contrib/Debian/rules | 63 ++++++++++++++++++++++++++++++++++++++++---
5 files changed, 101 insertions(+), 8 deletions(-)
diff --git a/contrib/Debian/.gitignore b/contrib/Debian/.gitignore
index f2a4c05..111d4ac 100644
--- a/contrib/Debian/.gitignore
+++ b/contrib/Debian/.gitignore
@@ -7,3 +7,7 @@ ngircd-full/
ngircd-full.default
ngircd-full.init
ngircd-full.postinst
+ngircd-full-dbg/
+ngircd-full-dbg.default
+ngircd-full-dbg.init
+ngircd-full-dbg.postinst
diff --git a/contrib/Debian/Makefile.am b/contrib/Debian/Makefile.am
index f3d02a5..b20da99 100644
--- a/contrib/Debian/Makefile.am
+++ b/contrib/Debian/Makefile.am
@@ -1,6 +1,6 @@
#
# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton (alex(a)barton.de)
+# Copyright (c)2001-2009 Alexander Barton (alex(a)barton.de)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,10 @@ clean-local:
ngircd.prerm.debhelper ngircd.substvars
rm -f ngircd-full.postinst.debhelper ngircd-full.postrm.debhelper \
ngircd-full.prerm.debhelper ngircd-full.substvars
- rm -rf ngircd ngircd-full
+ rm -f ngircd-full-dbg.postinst.debhelper \
+ ngircd-full-dbg.postrm.debhelper ngircd-full-dbg.prerm.debhelper \
+ ngircd-full-dbg.substvars
+ rm -rf ngircd ngircd-full ngircd-full-dbg
rm -f files
# -eof-
diff --git a/contrib/Debian/changelog b/contrib/Debian/changelog
index 9999779..8bce849 100644
--- a/contrib/Debian/changelog
+++ b/contrib/Debian/changelog
@@ -1,3 +1,10 @@
+ngircd (14-0ab2) unstable; urgency=low
+
+ * Add new "ngircd-full-dbg" package including degug code and both
+ the --debug and --sniffer options, and containing debug symbols.
+
+ -- Alexander Barton <alex(a)barton.de> Wed, 29 Apr 2009 01:13:03 +0200
+
ngircd (14-0ab1) unstable; urgency=low
* New "upstream" release: ngIRCd 14.
diff --git a/contrib/Debian/control b/contrib/Debian/control
index 543c5ad..fa393ec 100644
--- a/contrib/Debian/control
+++ b/contrib/Debian/control
@@ -32,7 +32,7 @@ Package: ngircd-full
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
-Conflicts: ngircd
+Conflicts: ngircd ngircd-dbg
Description: A lightweight daemon for the Internet Relay Chat (IRC)
ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
network. It is written from scratch and is not based upon the original
@@ -50,3 +50,29 @@ Description: A lightweight daemon for the Internet Relay Chat (IRC)
.
ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
mixed networks.
+
+Package: ngircd-full-dbg
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Provides: ircd
+Conflicts: ngircd ngircd-full
+Description: A lightweight daemon for the Internet Relay Chat (IRC)
+ ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
+ network. It is written from scratch and is not based upon the original
+ IRCd like many others.
+ .
+ In addition to the features of the "standard package", this package
+ includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
+ SSL encrypted client and server links.
+ .
+ And in addition to the "full" variant, the binaries contained in this
+ package are build with debug code and contain debug symbols.
+ .
+ Advantages of ngIRCd:
+ - no problems with servers using changing/non-static IP addresses.
+ - small and lean configuration file.
+ - free, modern and open source C code.
+ - still under active development.
+ .
+ ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
+ mixed networks.
diff --git a/contrib/Debian/rules b/contrib/Debian/rules
index bfe7ff7..5f6f826 100755
--- a/contrib/Debian/rules
+++ b/contrib/Debian/rules
@@ -56,6 +56,19 @@ configure-ngircd-full: configure
--with-gnutls --with-ident --with-tcp-wrappers \
--enable-ipv6
+configure-ngircd-full-dbg: configure
+ dh_testdir
+
+ # configure "full debug" variant:
+ ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+ --prefix=/usr \
+ --sysconfdir=/etc/ngircd \
+ --mandir=\$${prefix}/share/man \
+ --enable-debug --enable-sniffer \
+ --with-syslog --with-zlib \
+ --with-gnutls --with-ident --with-tcp-wrappers \
+ --enable-ipv6
+
build:
dh_clean -k
@@ -76,7 +89,17 @@ build-stamp-ngircd-full: configure-ngircd-full
# Add here commands to compile the "full" package:
$(MAKE)
-
+
+ touch build-stamp-ngircd-full
+
+build-ngircd-full-dbg: build-stamp-ngircd-full-dbg
+build-stamp-ngircd-full-dbg: configure-ngircd-full-dbg
+ dh_testdir
+ rm -f build-stamp-*
+
+ # Add here commands to compile the "full debug" package:
+ $(MAKE)
+
touch build-stamp-ngircd-full
clean:
@@ -86,7 +109,10 @@ clean:
rm -f $(CURDIR)/debian/ngircd-full.default
rm -f $(CURDIR)/debian/ngircd-full.init
rm -f $(CURDIR)/debian/ngircd-full.postinst
-
+ rm -f $(CURDIR)/debian/ngircd-full-dbg.default
+ rm -f $(CURDIR)/debian/ngircd-full-dbg.postinst
+ rm -f $(CURDIR)/debian/ngircd-full-dbg.init
+
# Add here commands to clean up after the build process:
[ ! -f Makefile ] || $(MAKE) distclean
@@ -98,7 +124,7 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" ""
endif
dh_clean
-install: install-ngircd install-ngircd-full
+install: install-ngircd install-ngircd-full install-ngircd-full-dbg
install-ngircd: build-ngircd
dh_testdir
@@ -138,6 +164,26 @@ install-ngircd-full: build-ngircd-full
>$(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.conf
touch $(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.motd
+install-ngircd-full-dbg: build-ngircd-full-dbg
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+
+ # Add here commands to install the "full" package into debian/ngircd-full:
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full-dbg
+ rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd/INSTALL*
+ rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd/COPYING*
+ mv $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd \
+ $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg
+ mkdir -p $(CURDIR)/debian/ngircd-full-dbg/var/run/ircd
+ cat $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/sample-ngircd.conf | \
+ sed -e "s/;ServerUID = 65534/ServerUID = irc/g" | \
+ sed -e "s/;ServerGID = 65534/ServerGID = irc/g" | \
+ sed -e "s/;MotdFile = \/usr\/local\/etc\/ngircd.motd/MotdFile = \/etc\/ngircd\/ngircd.motd/g" | \
+ sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \
+ >$(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.conf
+ touch $(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.motd
+
# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.
@@ -150,13 +196,20 @@ binary-arch: build install
$(CURDIR)/debian/ngircd-full.init
ln -s $(CURDIR)/debian/ngircd.postinst \
$(CURDIR)/debian/ngircd-full.postinst
-
+
+ ln -s $(CURDIR)/debian/ngircd.default \
+ $(CURDIR)/debian/ngircd-full-dbg.default
+ ln -s $(CURDIR)/debian/ngircd.init \
+ $(CURDIR)/debian/ngircd-full-dbg.init
+ ln -s $(CURDIR)/debian/ngircd.postinst \
+ $(CURDIR)/debian/ngircd-full-dbg.postinst
+
dh_testdir
dh_testroot
dh_installchangelogs -a -A ChangeLog
dh_installdocs -a
dh_installinit -a
- dh_strip -a
+ dh_strip -a --no-package=ngircd-full-dbg
dh_compress -a
dh_fixperms -a
dh_installdeb -a
Module: ngircd.git
Branch: master
Commit: 37359799eba5233958b8b6fe665928c4e3c64889
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=37359799…
Author: Tassilo Schweyer <dev(a)welterde.de>
Date: Sun Apr 26 00:23:40 2009 +0200
Fix server list announcement
When ngircd announces the list of currently known servers
to a new (connecting) server, it sent the introducer of
the servers instead of the top server.
Assuming this network:
irc1.example.com
|--irc2.example.com
| `--irc3.example.com
| `--irc4.example.com
`--irc5.example.com
When irc4 connects to irc3, irc3 tells irc4 that irc5 was
connected to irc2. (irc2 had introduced irc5 to irc3; but thats
not what ngircd should have sent to the new server).
This also placed users on the wrong servers.
---
src/ngircd/numeric.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/numeric.c b/src/ngircd/numeric.c
index 74c5c12..c3d94c3 100644
--- a/src/ngircd/numeric.c
+++ b/src/ngircd/numeric.c
@@ -131,7 +131,7 @@ Announce_Server(CLIENT * Client, CLIENT * Server)
if (Client_Hops(Server) == 1)
c = Client_ThisServer();
else
- c = Client_Introducer(Server);
+ c = Client_TopServer(Server);
/* Inform new server about the one already registered in the network */
return IRC_WriteStrClientPrefix(Client, c, "SERVER %s %d %d :%s",
Module: ngircd.git
Branch: master
Commit: 84eaed6c9afa92dcfd45181d5796cd7efd7e8b98
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=84eaed6c…
Author: Florian Westphal <fw(a)strlen.de>
Date: Tue Apr 21 19:49:15 2009 +0200
conn-zip: fix error handling
callers of (Un)Zip_Buffer() assume that
the function closes the connection on error.
However, this was not always the case.
---
src/ngircd/conn-zip.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/ngircd/conn-zip.c b/src/ngircd/conn-zip.c
index 0b9161f..24577ed 100644
--- a/src/ngircd/conn-zip.c
+++ b/src/ngircd/conn-zip.c
@@ -80,10 +80,12 @@ Zip_InitConn( CONN_ID Idx )
* compression ratios.
* If the (pre-)compression buffer is full, we try to flush it ("actually
* compress some data") and to add the new (uncompressed) data afterwards.
+ * This function closes the connection on error.
* @param Idx Connection handle.
* @param Data Pointer to the data.
* @param Len Length of the data to add.
- * @return true on success, false otherwise. */
+ * @return true on success, false otherwise.
+ */
GLOBAL bool
Zip_Buffer( CONN_ID Idx, const char *Data, size_t Len )
{
@@ -102,9 +104,11 @@ Zip_Buffer( CONN_ID Idx, const char *Data, size_t Len )
/* check again; if zip buf is still too large do not append data:
* otherwise the zip wbuf would grow too large */
buflen = array_bytes(&My_Connections[Idx].zip.wbuf);
- if (buflen + Len >= WRITEBUFFER_SLINK_LEN)
+ if (buflen + Len >= WRITEBUFFER_SLINK_LEN) {
+ Log(LOG_ALERT, "Zip Write Buffer overflow: %lu bytes\n", buflen + Len);
+ Conn_Close(Idx, "Zip Write buffer overflow", NULL, false);
return false;
-
+ }
return array_catb(&My_Connections[Idx].zip.wbuf, Data, Len);
} /* Zip_Buffer */
@@ -112,6 +116,7 @@ Zip_Buffer( CONN_ID Idx, const char *Data, size_t Len )
/**
* Compress data in ZIP buffer and move result to the write buffer of
* the connection.
+ * This function closes the connection on error.
* @param Idx Connection handle.
* @return true on success, false otherwise.
*/
@@ -180,6 +185,7 @@ Zip_Flush( CONN_ID Idx )
* uncompress data and copy it to read buffer.
* Returns true if data has been unpacked or no
* compressed data is currently pending in the zread buffer.
+ * This function closes the connection on error.
* @param Idx Connection handle.
* @return true on success, false otherwise.
*/
@@ -230,9 +236,11 @@ Unzip_Buffer( CONN_ID Idx )
#endif
assert(unzipbuf_used <= READBUFFER_LEN);
if (!array_catb(&My_Connections[Idx].rbuf, (char*) unzipbuf,
- (size_t)unzipbuf_used))
+ (size_t)unzipbuf_used)) {
+ Log (LOG_ALERT, "Decompression error: can't copy data!?");
+ Conn_Close(Idx, "Decompression error!", NULL, false);
return false;
-
+ }
if( in->avail_in > 0 ) {
array_moveleft(&My_Connections[Idx].zip.rbuf, 1, in_len );
} else {