Pekka Riikonen [Sun, 5 Oct 2008 14:45:59 +0000 (17:45 +0300)]
Merge commit 'origin/silc.1.1.branch'
Conflicts:
CHANGES
TODO
apps/Makefile.ad
apps/autodist/CHANGES
apps/autodist/autodist.in
apps/autodist/doc/autodist.1.in
apps/autodist/doc/autodist.texi
apps/silcd/command.c
apps/silcd/server.c
apps/silcd/server_backup.c
apps/silcd/server_query.c
configure.ad
distdir/autodist
distdir/pre-dist-client
distdir/pre-dist-toolkit
includes/silc.h.in
includes/silcversion.h.in
lib/Makefile.ad
lib/configure.ad
lib/contrib/Makefile.ad
lib/silcasn1/silcasn1.c
lib/silcasn1/silcasn1_decode.c
lib/silcasn1/silcasn1_encode.c
lib/silcclient/client.h
lib/silcclient/client_entry.c
lib/silcclient/silcclient.h
lib/silccore/silcpacket.c
lib/silccrypt/Makefile.ad
lib/silccrypt/aes.c
lib/silccrypt/aes_x86.asm
lib/silccrypt/aes_x86_64.asm
lib/silccrypt/ciphers.h
lib/silccrypt/configure.ad
lib/silccrypt/rijndael_internal.h
lib/silccrypt/silccipher.c
lib/silccrypt/silcpk.c
lib/silccrypt/silcpkcs.c
lib/silccrypt/silcpkcs1.c
lib/silcmath/configure.ad
lib/silcsim/Makefile.ad
lib/silcske/silcconnauth.c
lib/silcske/silcske.c
lib/silcskr/silcskr.c
lib/silcutil/silcatomic.h
lib/silcutil/silcbuffer.h
lib/silcutil/silcbuffmt.c
lib/silcutil/silcconfig.c
lib/silcutil/silcdlist.h
lib/silcutil/silcfdstream.c
lib/silcutil/silcfsm.c
lib/silcutil/silclist.h
lib/silcutil/silclog.c
lib/silcutil/silcmime.c
lib/silcutil/silcmutex.h
lib/silcutil/silcnet.h
lib/silcutil/silcschedule.c
lib/silcutil/silcschedule.h
lib/silcutil/silcschedule_i.h
lib/silcutil/silcsocketstream.c
lib/silcutil/silcsocketstream_i.h
lib/silcutil/silcstack.c
lib/silcutil/silcstack.h
lib/silcutil/silcstringprep.c
lib/silcutil/silctime.c
lib/silcutil/silctypes.h
lib/silcutil/silcutil.c
lib/silcutil/stacktrace.c
lib/silcutil/tests/test_silcschedule.c
lib/silcutil/tests/test_silctime.c
lib/silcutil/unix/silcunixnet.c
lib/silcutil/unix/silcunixschedule.c
lib/silcutil/unix/silcunixsocketstream.c
lib/silcutil/unix/silcunixthread.c
lib/silcutil/win32/silcwin32schedule.c
win32/libsilc/libsilc.def
Pekka Riikonen [Sun, 5 Oct 2008 13:46:37 +0000 (16:46 +0300)]
Removed HTTP server libary, it's available in SRT now
Pekka Riikonen [Wed, 24 Sep 2008 15:18:30 +0000 (18:18 +0300)]
Merge branch 'topic/mm-fixes' of git://208.110.73.182/silc into silc.1.1.branch
Signed-off-by: Pekka Riikonen <priikone@silcnet.org>
Pekka Riikonen [Wed, 24 Sep 2008 14:56:56 +0000 (17:56 +0300)]
Disconnect problem: Mark incoming connections immediately local
This fixes the problem of SKE remaining running in the background
even though the conncection is closed because it was never aborted
because the connection wasn't marked local. After SKE timeout a
crash may occur.
Pekka Riikonen [Wed, 24 Sep 2008 13:53:38 +0000 (16:53 +0300)]
Fixed more backup router reconnecting problems
Fixed also possible buffer overflows.
Pekka Riikonen [Wed, 24 Sep 2008 05:46:28 +0000 (08:46 +0300)]
Fixed server/backup router reconnecting
Pekka Riikonen [Sat, 13 Sep 2008 17:54:45 +0000 (20:54 +0300)]
Documented public_ip configuration option
Pekka Riikonen [Sat, 13 Sep 2008 12:49:23 +0000 (15:49 +0300)]
Fixed backup router shutdown crash
Pekka Riikonen [Sat, 13 Sep 2008 12:45:53 +0000 (15:45 +0300)]
SKE: Verify initiator's public key always
We used to verify initiator's public key only if we were doing mutual
authentication. We now verify it always because calling application
may need the public key initiator sent.
Pekka Riikonen [Thu, 11 Sep 2008 15:47:55 +0000 (18:47 +0300)]
Merge branch 'topic/code-cleanup' of git://208.110.73.182/silc into silc.1.1.branch
Pekka Riikonen [Thu, 11 Sep 2008 15:41:51 +0000 (18:41 +0300)]
Merge branch 'topic/null-fixes' of git://208.110.73.182/silc into silc.1.1.branch
Pekka Riikonen [Thu, 11 Sep 2008 15:41:38 +0000 (18:41 +0300)]
Merge branch 'topic/type-safety' of git://208.110.73.182/silc into silc.1.1.branch
Skywing [Fri, 27 Jun 2008 23:13:59 +0000 (18:13 -0500)]
Fix reference count bug leading to memory corruption on duplicate deletions.
Skywing [Fri, 20 Jun 2008 22:37:21 +0000 (17:37 -0500)]
Make packet stream reference counts 32 bits.
Kp [Sun, 1 Jun 2008 21:15:46 +0000 (16:15 -0500)]
Packet streams: make packet handling callback pointers read only.
The function pointers for the packet handling callbacks are never
modified, so make them read only.
Kp [Fri, 4 Jul 2008 18:03:11 +0000 (13:03 -0500)]
Reorder #if 0/#endif block to avoid splitting a basic block across the #if 0.
The bracing convention caused a #if 0/#endif to exclude the close of one
block and the open of another. This compiled correctly, but confused
other tools that expect to see a block fully present or fully absent.
Move the ending brace of the preceding block out of the #if 0 and the
ending brace of the excluded block into the #if 0 to fix that.
Skywing [Fri, 20 Jun 2008 21:19:32 +0000 (16:19 -0500)]
Fix double free in silcd.
Kp [Sun, 1 Jun 2008 17:59:42 +0000 (12:59 -0500)]
Packet streams: avoid double free if silc_id_id2str fails.
In silc_packet_set_ids, the old ID is freed before silc_id_id2str is
called. If silc_id_id2str fails, then silc_packet_set_ids returns
without resetting the ID pointer. The pointer is then free, but not
NULL. When the packet stream is destroyed, silc_packet_stream_destroy
will free the pointer again. Reset the ID pointer to NULL immediately
after freeing it to prevent this.
Kp [Sun, 1 Jun 2008 17:25:50 +0000 (12:25 -0500)]
Packet streams: fix memory leak on dlist allocation failure.
If silc_dlist_init fails to allocate a SilcDList for stream->process,
then silc_packet_stream_link_va leaks the newly allocated
SilcPacketProcess. Fix that by calling silc_free(p) on the error path.
Kp [Sat, 31 May 2008 04:31:07 +0000 (23:31 -0500)]
ASN1: Fix NULL pointer dereference on stack allocation failure.
If the second silc_stack_alloc fails, then asn1->stack2 is NULL. Thus,
when silc_asn1_init calls silc_stack_free(asn1->stack2), it is
equivalent to silc_stack_free(NULL). However, silc_stack_free does not
check for a NULL pointer. Fix silc_asn1_init to free asn1->stack1, as
was intended.
Kp [Fri, 25 Apr 2008 03:18:27 +0000 (22:18 -0500)]
Avoid NULL dereference when leaving a channel with a private key.
Split out a patch from Skywing <skywing@valhallalegends.com> to fix a
NULL pointer dereference when the client leaves a +k channel and the
local user had set a key for the channel.
Kp [Sat, 31 May 2008 21:37:45 +0000 (16:37 -0500)]
ASN1: Fix stack variable overwrite when encoding OID.
The call to sscanf specifies a format string of "%lu", a long unsigned
int. The pointer argument was cast to unsigned long *, but this is
wrong for 64 bit systems. On 64 bit systems, unsigned long is 64 bits,
but the oid value is a SilcUInt32 on all systems. As a result, sscanf
will overwrite a neighboring variable on the stack. Fix this by
changing the format string to "%u" and removing the cast.
Kp [Sun, 1 Jun 2008 04:57:51 +0000 (23:57 -0500)]
Types: make SilcUInt32 an unsigned int in most cases.
On typical 32-bit systems, both unsigned int and unsigned long are 32
bits wide. However, they have different format specifiers, so they
cannot be used interchangeably. On typical 64-bit systems, unsigned int
is 32 bits and unsigned long is 64 bits. To allow for a more consistent
format string, reorder the type size checks so that SilcUInt32 is an
unsigned int on both 32 bit and 64 bit systems.
Kp [Sun, 1 Jun 2008 04:41:59 +0000 (23:41 -0500)]
Type sanity: add compile time check that integers are of the expected size.
The comments in silctypes.h guarantee that certain types are of
particular sizes. Add compile time checks that will fail if these
guarantees are not met.
Kp [Sun, 13 Jul 2008 16:47:07 +0000 (11:47 -0500)]
Server: always drop privileges, even in foreground mode.
Foreground mode is often used as a debugging aid for live
configurations, so the server may be started with root privileges to let
it bind to its native port. Since the server already has the ability to
drop root privileges, use that ability to make foreground mode a little
safer.
Pekka Riikonen [Sun, 31 Aug 2008 07:58:11 +0000 (10:58 +0300)]
Handle failed memory allocations in packet sending
Pekka Riikonen [Sun, 31 Aug 2008 06:58:49 +0000 (09:58 +0300)]
silc_stack_free can now be called with NULL stack
Pekka Riikonen [Sat, 30 Aug 2008 12:08:03 +0000 (15:08 +0300)]
Handle EAGAIN and EINTR correctly in silc_get_input in case of error
Pekka Riikonen [Sat, 30 Aug 2008 11:15:49 +0000 (14:15 +0300)]
Mark client entry invalid when killed and when notified non-existing
Pekka Riikonen [Sat, 30 Aug 2008 11:14:45 +0000 (14:14 +0300)]
Fixed command calling crash
If command finishes synchronously the command context is not valid
anymore and cannot be accessed. Reported by Sami Farin.
Pekka Riikonen [Sat, 30 Aug 2008 11:12:33 +0000 (14:12 +0300)]
Changed packet_error structure const correctly
Pekka Riikonen [Sat, 30 Aug 2008 11:12:00 +0000 (14:12 +0300)]
Fixed resuming to work even when there are no joined channels
Pekka Riikonen [Sat, 30 Aug 2008 11:10:45 +0000 (14:10 +0300)]
Fixed channel private key deleting to restore original keys correctly
Pekka Riikonen [Sat, 30 Aug 2008 07:50:24 +0000 (10:50 +0300)]
Resolve channel in INVITE notify if we don't have it yet
Fixes bug that user cannot se INVITE notifications sent by other users.
Pekka Riikonen [Sun, 22 Jun 2008 14:42:40 +0000 (17:42 +0300)]
Remove client from expired client list before deleting it
Pekka Riikonen [Sun, 22 Jun 2008 13:56:36 +0000 (16:56 +0300)]
Fixed the silc_parse_userqfdn argument handling, again.
Pekka Riikonen [Sun, 22 Jun 2008 08:04:37 +0000 (11:04 +0300)]
Fixed silc_parse_userfqdn argument check
Pekka Riikonen [Sun, 22 Jun 2008 08:03:58 +0000 (11:03 +0300)]
Make sure client entry is not expired more than once
Pekka Riikonen [Mon, 9 Jun 2008 05:26:01 +0000 (08:26 +0300)]
Close socket if TCP connecting fails to avoid leaking sockets
Pekka Riikonen [Mon, 9 Jun 2008 05:18:33 +0000 (08:18 +0300)]
Add non-executing stack when compiling AES asm for GNU/ELF.
Patch by Kp <kp@valhallalegends.com>bg
Signed-off-by: Pekka Riikonen <priikone@silcnet.org>
Pekka Riikonen [Mon, 9 Jun 2008 05:11:20 +0000 (08:11 +0300)]
Fixed automatic reconnection to router and malloc failure handlings
If remote router disconnects while still being in Unkonwn state reconnect
to the router after disconnecting. This should prevent the bugs where
server doesn't reconnect to router after being disconnected at the early
connection state.
Fixed various memory allocation failure handlings.
Pekka Riikonen [Fri, 6 Jun 2008 05:26:04 +0000 (08:26 +0300)]
Free sock user data before disconnecting remote peer
Pekka Riikonen [Thu, 5 Jun 2008 18:37:14 +0000 (21:37 +0300)]
More disconnection crash fixes.
Make sure the server conncection is always freed when the connection
is freed.
Pekka Riikonen [Sun, 25 May 2008 09:25:04 +0000 (12:25 +0300)]
Handle memory allocation failures when unformatting data
Pekka Riikonen [Sun, 25 May 2008 09:24:41 +0000 (12:24 +0300)]
Add non-executing stack when compiling AES asm for GNU/ELF.
Patch by Kp <kp@valhallalegends.com>
Signed-off-by: Pekka Riikonen <priikone@silcnet.org>
Pekka Riikonen [Sun, 25 May 2008 09:23:17 +0000 (12:23 +0300)]
Fixed crash when packet stream creation fails.
Pekka Riikonen [Sun, 25 May 2008 09:22:33 +0000 (12:22 +0300)]
Fixes to connection freeing crashes
Pekka Riikonen [Sun, 20 Apr 2008 19:53:47 +0000 (22:53 +0300)]
Cancel rekey timeout when closing connection.
Pekka Riikonen [Sun, 20 Apr 2008 15:54:53 +0000 (18:54 +0300)]
Fixed KILL command related crash in silcd
Pekka Riikonen [Thu, 17 Apr 2008 16:08:42 +0000 (19:08 +0300)]
Free connection data correctly when disconnecting the remote peer.
The silc_server_free_sock_user_data must be called if the
silc_server_disconnect_remote is called.
Pekka Riikonen [Wed, 16 Apr 2008 12:53:18 +0000 (15:53 +0300)]
Fixed many 64-bit alignment issues from silcd.
Pekka Riikonen [Sat, 12 Apr 2008 10:51:42 +0000 (13:51 +0300)]
Check for valid packet stream when counting number of connections in silcd.
Pekka Riikonen [Sat, 12 Apr 2008 10:51:06 +0000 (13:51 +0300)]
SILC_IS_FD_STREAM and SILC_IS_SOCKET_STREAM now checks for NULL stream.
Pekka Riikonen [Sat, 12 Apr 2008 10:50:39 +0000 (13:50 +0300)]
Fixed silc_skr_init to not fail if threads support are not compiled in.
Pekka Riikonen [Sat, 12 Apr 2008 10:50:09 +0000 (13:50 +0300)]
Removed wrong SILC_LOG_ERROR and assert check from silc_idcache_add.
In some cases it is not fatal error to attempt to add entry that already
exists. Removed the assert and changed the error to debug message.
Pekka Riikonen [Thu, 10 Apr 2008 15:04:11 +0000 (18:04 +0300)]
Compute packet sums using sha512sum.
Pekka Riikonen [Thu, 10 Apr 2008 15:03:46 +0000 (18:03 +0300)]
Mark scheduler task unscheduled after silc_schedule_unset_listen_fd.
Affects epoll() version of schduler. If it isn't marked unscheduled
next time fd's events are changed they expect the fd to be in epoll()
which they are not. Setting unscheduled will add them again to epoll().
Pekka Riikonen [Thu, 10 Apr 2008 15:01:35 +0000 (18:01 +0300)]
Fixed QoS data limit handling in socket stream when reading data.
Pekka Riikonen [Thu, 10 Apr 2008 14:59:59 +0000 (17:59 +0300)]
Fixed packet stream destroy crashes when closing connections.
Take a reference of the packet stream and then destroy it. The final
reference is freed in the timeout callback. Any operation in the mean
time will detect the stream is destroyed and won't do anything.
Pekka Riikonen [Tue, 8 Apr 2008 05:01:19 +0000 (08:01 +0300)]
Accept 0600 and 0640 for server private key permissions.
Pekka Riikonen [Tue, 8 Apr 2008 05:00:40 +0000 (08:00 +0300)]
Fixed busy-loop in WATCH command when adding public keys.
If the public key decoding failed the command ended up
decoding and failing the same public key for ever.
Pekka Riikonen [Thu, 20 Mar 2008 06:35:48 +0000 (08:35 +0200)]
Fixed possible buffer overflow in PKCS#1 message decoding.
Vulnerability reported by Core Security Technologies. Thanks.
Pekka Riikonen [Sat, 15 Mar 2008 18:24:27 +0000 (20:24 +0200)]
Added socket stream and socket into SilcClientConnection context.
Pekka Riikonen [Fri, 14 Mar 2008 11:45:28 +0000 (13:45 +0200)]
Deleted lib/configure.ad file, not needed anymore.
Pekka Riikonen [Fri, 14 Mar 2008 11:44:27 +0000 (13:44 +0200)]
Changed SILC code to use new SRT and SCT APIs.
Pekka Riikonen [Fri, 14 Mar 2008 11:41:32 +0000 (13:41 +0200)]
Created SILC GIT repository.
The SILC GIT repository is imported from the old SILC CVS tree and
contains the entire SILC development history, all branches and tags.
Pekka Riikonen [Thu, 13 Mar 2008 11:52:15 +0000 (11:52 +0000)]
Fixed NEW_CLIENT packet processing crash when the packet doesn't
include nickname.
Pekka Riikonen [Fri, 22 Feb 2008 14:29:58 +0000 (14:29 +0000)]
Fixed partial encryption in CTR mode. Does not affect interop
in SILC.
Pekka Riikonen [Fri, 18 Jan 2008 14:46:32 +0000 (14:46 +0000)]
Added SILC Thread Queue API
Pekka Riikonen [Thu, 17 Jan 2008 12:50:49 +0000 (12:50 +0000)]
Comment changes.
Pekka Riikonen [Thu, 17 Jan 2008 12:50:28 +0000 (12:50 +0000)]
Added ernno setting.
Pekka Riikonen [Wed, 16 Jan 2008 18:41:21 +0000 (18:41 +0000)]
Removed the previous backslash removin code.
Pekka Riikonen [Wed, 16 Jan 2008 16:30:06 +0000 (16:30 +0000)]
Fixed *.ad (not configure.ad or Makefile.ad but other files)
to correctly remove trailing slashes and copy the processed file.
Pekka Riikonen [Tue, 15 Jan 2008 17:52:24 +0000 (17:52 +0000)]
Added and implemented Silc DIR API.
Pekka Riikonen [Tue, 15 Jan 2008 06:36:54 +0000 (06:36 +0000)]
Comment and errno changes
Pekka Riikonen [Sun, 13 Jan 2008 15:24:51 +0000 (15:24 +0000)]
updates.
Pekka Riikonen [Sun, 13 Jan 2008 15:24:26 +0000 (15:24 +0000)]
Added silc_subst, regex matching and substitution with the
familiar Sed syntax.
Pekka Riikonen [Sun, 13 Jan 2008 15:23:54 +0000 (15:23 +0000)]
Added SILC_STR_REPLACE. Removed SILC_STR_STRING_APPEND. Fixed
various SILC_STR_REGEX bugs.
Pekka Riikonen [Sun, 13 Jan 2008 15:20:37 +0000 (15:20 +0000)]
Comment changes.
Pekka Riikonen [Sun, 13 Jan 2008 15:19:59 +0000 (15:19 +0000)]
Fixed reallocation when reducing size.
Pekka Riikonen [Sun, 13 Jan 2008 15:19:19 +0000 (15:19 +0000)]
Fixed SilcBuffer reallocatinon when reducing buffer size.
Added silc_buffer_tail and silc_buffer_memcmp.
Pekka Riikonen [Tue, 8 Jan 2008 15:15:10 +0000 (15:15 +0000)]
Moved SILC id utility functions from utility library.
Pekka Riikonen [Tue, 8 Jan 2008 15:14:17 +0000 (15:14 +0000)]
Moved SILC protocol ID utility functions to SILC core library.
Pekka Riikonen [Tue, 8 Jan 2008 14:31:26 +0000 (14:31 +0000)]
Fixed silc_nickname_parse to return valid nickname when it returns
TRUE.
Pekka Riikonen [Tue, 8 Jan 2008 07:49:48 +0000 (07:49 +0000)]
Fixed printable fingerprint buffer overflow. RedHat bug 372021.
Pekka Riikonen [Tue, 8 Jan 2008 07:48:42 +0000 (07:48 +0000)]
Fixed fingerprint generation. RedHat bug 372021.
Pekka Riikonen [Sat, 5 Jan 2008 19:57:25 +0000 (19:57 +0000)]
Handle anychar (.) correctly with bounded repeaat regex expression.
Pekka Riikonen [Sat, 5 Jan 2008 18:36:44 +0000 (18:36 +0000)]
Added SILC_STR_DELETE buffer format macro.
Pekka Riikonen [Sat, 5 Jan 2008 16:09:07 +0000 (16:09 +0000)]
Added SILC_STR_STRING and SILC_STR_STRING_APPEND and support for
appending with SilcBuffer format API.
Added silc_buffer_equal.
Pekka Riikonen [Sat, 5 Jan 2008 16:08:13 +0000 (16:08 +0000)]
All symbols now have silc_ prefix.
Pekka Riikonen [Thu, 3 Jan 2008 16:42:31 +0000 (16:42 +0000)]
Added SilcStack support to silc_regex and silc_regex_buffer.
Pekka Riikonen [Wed, 2 Jan 2008 20:39:42 +0000 (20:39 +0000)]
Imported new improved free regex implementation. Added (again)
support for SILC_REGEX_NOTBOL and SILC_REGEX_NOTEOLF flags.
Added also support for POSIX bounded repeat expression (a{n,m})
to make it more POSIX compliant. Added SilcStack support to
the regex too.
Pekka Riikonen [Wed, 2 Jan 2008 20:38:17 +0000 (20:38 +0000)]
Added global stack to Tls context.
Pekka Riikonen [Wed, 2 Jan 2008 20:37:55 +0000 (20:37 +0000)]
silc_srealloc now allocates new block if reallocation fails.
Pekka Riikonen [Wed, 2 Jan 2008 20:37:24 +0000 (20:37 +0000)]
Added silc_stack_[set|get]_global.
Pekka Riikonen [Tue, 1 Jan 2008 17:45:40 +0000 (17:45 +0000)]
Added SILC_REGEX_NOTBOL and SILC_REGEX_NOTEOL flags.
Pekka Riikonen [Tue, 1 Jan 2008 16:10:46 +0000 (16:10 +0000)]
Added SILC_STR_REGEX macro to SILC Buffer Format API.
It provides powerful regular expression matching within the
SilcBuffer. Combined with SILC Buffer Format API it can turn
the API into a Stream Editor (sed) and Awk like, providing
powerful ways to match and edit the buffer in myriad of ways.
The SILC_STR_REGEX can also mimic the behavior of sed (match
and edit line by line).
Pekka Riikonen [Tue, 1 Jan 2008 16:09:31 +0000 (16:09 +0000)]
Added silc_regex and silc_regex_buffer. Deprecated
silc_string_regex_match..
Pekka Riikonen [Sun, 30 Dec 2007 23:35:50 +0000 (23:35 +0000)]
Added SILC regular expression API. Added new regex error values.
Removed the old lib/contrib/regexp.[ch].
Pekka Riikonen [Sun, 30 Dec 2007 23:33:12 +0000 (23:33 +0000)]
Comment changes.