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
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.
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 [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 [Tue, 8 Jan 2008 07:48:42 +0000 (07:48 +0000)]
Fixed fingerprint generation. RedHat bug 372021.
Pekka Riikonen [Sun, 30 Dec 2007 12:04:27 +0000 (12:04 +0000)]
Fixed unix signal delivery.
Pekka Riikonen [Sat, 22 Dec 2007 07:15:09 +0000 (07:15 +0000)]
updates.
Pekka Riikonen [Sun, 18 Nov 2007 15:52:45 +0000 (15:52 +0000)]
updates.
Jochen Eisinger [Sun, 18 Nov 2007 15:44:17 +0000 (15:44 +0000)]
Sun Nov 18 16:43:04 CET 2007 Jochen Eisinger <coffee@silcnet.org>
* Add -avoid-version and -rpath flags when compiling the plugin.
Affected file is apps/irssi/src/fe-common/silc/Makefile.in
Pekka Riikonen [Sun, 18 Nov 2007 12:37:06 +0000 (12:37 +0000)]
updates.
Pekka Riikonen [Sun, 18 Nov 2007 09:50:18 +0000 (09:50 +0000)]
new keys.
Pekka Riikonen [Sun, 18 Nov 2007 09:48:43 +0000 (09:48 +0000)]
Added spec file.
Pekka Riikonen [Thu, 15 Nov 2007 16:32:32 +0000 (16:32 +0000)]
Remove channel keys and hamcs after LEAVE command.
Pekka Riikonen [Thu, 15 Nov 2007 16:09:26 +0000 (16:09 +0000)]
Reprocess JOIN command synchronously after resolving channel
user list. In JOIN command reply check if the channel key is already
saved. If it is we have received new key from server while
resolving user and must not save the old key.
Pekka Riikonen [Tue, 13 Nov 2007 16:36:05 +0000 (16:36 +0000)]
Added missing channel entry unreferencing calls.
Pekka Riikonen [Sun, 11 Nov 2007 21:09:35 +0000 (21:09 +0000)]
Free stream data always in eod of stream. Added some debugs too.
Pekka Riikonen [Sun, 11 Nov 2007 14:06:14 +0000 (14:06 +0000)]
updates.
Pekka Riikonen [Sun, 11 Nov 2007 12:19:46 +0000 (12:19 +0000)]
updates.
Pekka Riikonen [Sun, 11 Nov 2007 12:12:23 +0000 (12:12 +0000)]
Accept RESUME_CLIENT with and without source id in packet.
Pekka Riikonen [Sun, 11 Nov 2007 11:30:04 +0000 (11:30 +0000)]
Check for NULL public key from SKE.
Pekka Riikonen [Sun, 11 Nov 2007 11:26:01 +0000 (11:26 +0000)]
updates.
Pekka Riikonen [Sun, 11 Nov 2007 11:25:44 +0000 (11:25 +0000)]
Fixed client resuming.
Fixed prefer_passphrase_auth flag.
Fixed disconnection of unauthenticated connection.
Fixed OPER an SILCOPER public key authenticationn.
Pekka Riikonen [Sun, 11 Nov 2007 11:22:58 +0000 (11:22 +0000)]
Fixed client entry updating in IDENTIFY and WHOWAS replies.
Pekka Riikonen [Sun, 11 Nov 2007 11:20:21 +0000 (11:20 +0000)]
Fixed public key authentication. Mark public keys configured.
Pekka Riikonen [Sun, 11 Nov 2007 11:19:40 +0000 (11:19 +0000)]
Use correct public key in public key auth as responder.
Pekka Riikonen [Sun, 11 Nov 2007 11:19:02 +0000 (11:19 +0000)]
Added debugs.
Pekka Riikonen [Tue, 6 Nov 2007 14:46:22 +0000 (14:46 +0000)]
variable name clash fix.
Pekka Riikonen [Tue, 6 Nov 2007 14:42:47 +0000 (14:42 +0000)]
updates.
Pekka Riikonen [Mon, 5 Nov 2007 21:12:55 +0000 (21:12 +0000)]
Zero tail of CTR mode IV in IV Included mode.
Pekka Riikonen [Mon, 5 Nov 2007 20:34:55 +0000 (20:34 +0000)]
Fixed CTR rekey. Rewrote IV Included CTR mode encryption/decryption
in packet engine.
Pekka Riikonen [Mon, 5 Nov 2007 20:34:21 +0000 (20:34 +0000)]
updates.
Pekka Riikonen [Sun, 4 Nov 2007 21:04:49 +0000 (21:04 +0000)]
updates.
Pekka Riikonen [Sun, 4 Nov 2007 14:18:04 +0000 (14:18 +0000)]
non-IPv6 compilation error fixes.
Pekka Riikonen [Sun, 4 Nov 2007 14:17:24 +0000 (14:17 +0000)]
Removed module_path and module options.
Pekka Riikonen [Sun, 4 Nov 2007 09:20:37 +0000 (09:20 +0000)]
updates.
Pekka Riikonen [Sun, 4 Nov 2007 09:20:20 +0000 (09:20 +0000)]
SILC_DIST_VCARD changes.
Pekka Riikonen [Sat, 3 Nov 2007 22:14:53 +0000 (22:14 +0000)]
Set correct ID for message payload encrypting.
Pekka Riikonen [Sat, 3 Nov 2007 21:27:30 +0000 (21:27 +0000)]
New silcd configuration changes
Pekka Riikonen [Sat, 3 Nov 2007 21:27:02 +0000 (21:27 +0000)]
updates.
Pekka Riikonen [Sat, 3 Nov 2007 21:25:45 +0000 (21:25 +0000)]
Added debugs.
Pekka Riikonen [Sat, 3 Nov 2007 21:25:26 +0000 (21:25 +0000)]
Fixed channel private key freeing.
Pekka Riikonen [Sat, 3 Nov 2007 21:24:13 +0000 (21:24 +0000)]
Do not free packet engine before uninitializing scheduler.
Do not disconnct already disconnected streams.
Pekka Riikonen [Sun, 28 Oct 2007 15:21:00 +0000 (15:21 +0000)]
64-bit Windows fixes. Patch from Skywing.
Pekka Riikonen [Sat, 27 Oct 2007 09:12:10 +0000 (09:12 +0000)]
SILC_LIBS -> SILC_LINK_LIBS.
Pekka Riikonen [Sat, 6 Oct 2007 17:03:38 +0000 (17:03 +0000)]
Fixed yasm configuration.
Pekka Riikonen [Thu, 20 Sep 2007 05:13:42 +0000 (05:13 +0000)]
bool -> SilcBool.
Pekka Riikonen [Sat, 15 Sep 2007 07:07:46 +0000 (07:07 +0000)]
Fixed yasm/nasm compilation on x86_64.
Pekka Riikonen [Sun, 9 Sep 2007 15:32:28 +0000 (15:32 +0000)]
updates.
Pekka Riikonen [Sun, 9 Sep 2007 15:04:15 +0000 (15:04 +0000)]
Fixed possible buffer overflows. Patch by Jérémy Bobbio.
Pekka Riikonen [Sun, 9 Sep 2007 15:00:06 +0000 (15:00 +0000)]
updates.
Pekka Riikonen [Sat, 1 Sep 2007 10:46:56 +0000 (10:46 +0000)]
mingw compilation fixes, patch by Daniel Atallah.
Pekka Riikonen [Sat, 1 Sep 2007 08:52:01 +0000 (08:52 +0000)]
Fixed JOIN notify timeout handling, fixes a crash.
Pekka Riikonen [Sat, 1 Sep 2007 08:51:43 +0000 (08:51 +0000)]
Both UN and HN must be present in SILC public key.
Pekka Riikonen [Tue, 7 Aug 2007 18:15:35 +0000 (18:15 +0000)]
Fixed format string.