From Brad, ok martynas@:

- Bump autoconf to the proper version, 2.63.
- Bring in fixes from silc-client from upstream..

* Client: Fix signature verification double free
* Packet engine: prevent divide by 0
* SKE: Make sure failure received from remote results in error status
* Fix format string bugs
This commit is contained in:
sthen 2010-07-31 12:43:25 +00:00
parent ca178c3546
commit 37757ea393
5 changed files with 89 additions and 9 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.23 2010/07/12 22:07:38 sthen Exp $
# $OpenBSD: Makefile,v 1.24 2010/07/31 12:43:25 sthen Exp $
SHARED_ONLY= Yes
COMMENT= SILC plugin for irssi
DISTNAME= irssi-silc-1.1.8
REVISION= 1
REVISION= 2
CATEGORIES= net
@ -34,7 +34,7 @@ MAKE_FLAGS= libfe_common_silc_la_LDFLAGS=-avoid-version \
USE_LIBTOOL= Yes
LIBTOOL_FLAGS+= --tag=disable-static
CONFIGURE_STYLE= autoconf
AUTOCONF_VERSION= 2.61
AUTOCONF_VERSION= 2.63
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
CONFIGURE_ENV+= ac_cv_path_NASM=no YASM=${LOCALBASE}/bin/yasm
.endif

View File

@ -1,7 +1,21 @@
$OpenBSD: patch-apps_irssi_src_silc_core_client_ops_c,v 1.2 2010/05/19 15:05:10 sthen Exp $
--- apps/irssi/src/silc/core/client_ops.c.orig Sat May 23 02:11:25 2009
+++ apps/irssi/src/silc/core/client_ops.c Wed Apr 28 10:26:29 2010
@@ -1069,6 +1069,8 @@ void silc_notify(SilcClient client, SilcClientConnecti
$OpenBSD: patch-apps_irssi_src_silc_core_client_ops_c,v 1.3 2010/07/31 12:43:25 sthen Exp $
--- apps/irssi/src/silc/core/client_ops.c.orig Fri May 22 20:11:25 2009
+++ apps/irssi/src/silc/core/client_ops.c Thu Jul 29 22:42:52 2010
@@ -262,10 +262,11 @@ int verify_message_signature(SilcClientEntry sender,
sizeof(sender->fingerprint));
if (strcmp(fingerprint, fingerprint2)) {
/* since the public key differs from the senders public key, the
- verification _failed_ */
+ verification won't be done */
silc_pkcs_public_key_free(pk);
silc_free(fingerprint);
- ret = SILC_MSG_SIGNED_UNKNOWN;
+ silc_free(fingerprint2);
+ return SILC_MSG_SIGNED_UNKNOWN;
}
silc_free(fingerprint2);
}
@@ -1069,6 +1070,8 @@ void silc_notify(SilcClient client, SilcClientConnecti
nick = silc_nicklist_find(chanrec, client_entry2);
if (nick != NULL) {
@ -10,7 +24,7 @@ $OpenBSD: patch-apps_irssi_src_silc_core_client_ops_c,v 1.2 2010/05/19 15:05:10
nick->op = (mode & SILC_CHANNEL_UMODE_CHANOP) != 0;
nick->founder = (mode & SILC_CHANNEL_UMODE_CHANFO) != 0;
signal_emit("nick mode changed", 2, chanrec, nick);
@@ -2790,6 +2792,15 @@ static void silc_get_auth_ask_passphrase(const unsigne
@@ -2790,6 +2793,15 @@ static void silc_get_auth_ask_passphrase(const unsigne
silc_free(a);
}
@ -26,7 +40,7 @@ $OpenBSD: patch-apps_irssi_src_silc_core_client_ops_c,v 1.2 2010/05/19 15:05:10
/* Find authentication data by hostname and port. The hostname may be IP
address as well.*/
@@ -2811,7 +2822,7 @@ void silc_get_auth_method(SilcClient client, SilcClien
@@ -2811,7 +2823,7 @@ void silc_get_auth_method(SilcClient client, SilcClien
/* Check whether we find the password for this server in our
configuration. If it's set, always send it server. */

View File

@ -0,0 +1,39 @@
$OpenBSD: patch-lib_silcclient_command_c,v 1.1 2010/07/31 12:43:25 sthen Exp $
--- lib/silcclient/command.c.orig Tue Aug 11 15:03:47 2009
+++ lib/silcclient/command.c Tue Aug 11 15:05:30 2009
@@ -956,7 +956,7 @@ SILC_FSM_STATE(silc_client_command_topic)
}
if (client->internal->params->full_channel_names)
- silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+ silc_snprintf(tmp, sizeof(tmp), "%s", conn->current_channel->channel_name);
else
silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
conn->current_channel->channel_name,
@@ -2144,7 +2144,7 @@ SILC_FSM_STATE(silc_client_command_kick)
}
if (client->internal->params->full_channel_names)
- silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+ silc_snprintf(tmp, sizeof(tmp), "%s", conn->current_channel->channel_name);
else
silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
conn->current_channel->channel_name,
@@ -2554,7 +2554,7 @@ SILC_FSM_STATE(silc_client_command_leave)
}
if (client->internal->params->full_channel_names)
- silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+ silc_snprintf(tmp, sizeof(tmp), "%s", conn->current_channel->channel_name);
else
silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
conn->current_channel->channel_name,
@@ -2621,7 +2621,7 @@ SILC_FSM_STATE(silc_client_command_users)
}
if (conn->client->internal->params->full_channel_names)
- silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+ silc_snprintf(tmp, sizeof(tmp), "%s", conn->current_channel->channel_name);
else
silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
conn->current_channel->channel_name,

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-lib_silccore_silcpacket_c,v 1.1 2010/07/31 12:43:25 sthen Exp $
--- lib/silccore/silcpacket.c.orig Sat May 29 18:59:19 2010
+++ lib/silccore/silcpacket.c Sat May 29 19:00:31 2010
@@ -2231,8 +2231,9 @@ static void silc_packet_read_process(SilcPacketStream
/* Padding sanity checks */
if (cipher && silc_cipher_get_mode(cipher) != SILC_CIPHER_MODE_CTR &&
- ((normal && paddedlen % block_len != 0) ||
- (!normal && silc_packet_special_len(header) % block_len != 0))) {
+ ((normal && block_len && paddedlen % block_len != 0) ||
+ (!normal && block_len &&
+ silc_packet_special_len(header) % block_len != 0))) {
SILC_LOG_DEBUG(("Packet length %d not multiple by cipher block length",
paddedlen));
silc_mutex_unlock(stream->lock);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-lib_silcske_silcske_c,v 1.1 2010/07/31 12:43:25 sthen Exp $
--- lib/silcske/silcske.c.orig Sat May 29 19:00:50 2010
+++ lib/silcske/silcske.c Sat May 29 19:01:32 2010
@@ -2387,6 +2387,8 @@ SILC_FSM_STATE(silc_ske_st_responder_failure)
ske->packet = NULL;
}
ske->status = error;
+ if (ske->status == SILC_SKE_STATUS_OK)
+ ske->status = SILC_SKE_STATUS_ERROR;
silc_packet_stream_unlink(ske->stream, &silc_ske_stream_cbs, ske);
silc_schedule_task_del_by_context(ske->schedule, ske);