Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nanomsg for openSUSE:Factory checked in at 2026-09-09 16:22:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nanomsg (Old) and /work/SRC/openSUSE:Factory/.nanomsg.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nanomsg" Wed Sep 9 16:22:07 2026 rev:12 rq:1376594 version:1.2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/nanomsg/nanomsg.changes 2026-08-04 21:33:46.374797494 +0200 +++ /work/SRC/openSUSE:Factory/.nanomsg.new.1265/nanomsg.changes 2026-09-09 16:23:48.467678062 +0200 @@ -1,0 +2,6 @@ +Tue Sep 8 14:40:31 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 1.2.5 + * fix: gracefully reject invalid IPC message headers. #1132 + +------------------------------------------------------------------- Old: ---- nanomsg-1.2.3.tar.gz New: ---- nanomsg-1.2.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nanomsg.spec ++++++ --- /var/tmp/diff_new_pack.p1OYk0/_old 2026-09-09 16:23:49.235710161 +0200 +++ /var/tmp/diff_new_pack.p1OYk0/_new 2026-09-09 16:23:49.237710245 +0200 @@ -19,7 +19,7 @@ %define sover 6 Name: nanomsg -Version: 1.2.3 +Version: 1.2.5 Release: 0 Summary: Socket library providing several common communication patterns License: MIT ++++++ nanomsg-1.2.3.tar.gz -> nanomsg-1.2.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nanomsg-1.2.3/.version new/nanomsg-1.2.5/.version --- old/nanomsg-1.2.3/.version 2026-08-02 19:41:21.000000000 +0200 +++ new/nanomsg-1.2.5/.version 2026-09-06 22:36:53.000000000 +0200 @@ -1 +1 @@ -1.2.1 +1.2.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nanomsg-1.2.3/src/transports/ipc/sipc.c new/nanomsg-1.2.5/src/transports/ipc/sipc.c --- old/nanomsg-1.2.3/src/transports/ipc/sipc.c 2026-08-02 19:41:21.000000000 +0200 +++ new/nanomsg-1.2.5/src/transports/ipc/sipc.c 2026-09-06 22:36:53.000000000 +0200 @@ -330,10 +330,14 @@ switch (sipc->instate) { case NN_SIPC_INSTATE_HDR: - /* Message header was received. Check that message size - is acceptable by comparing with NN_RCVMAXSIZE; - if it's too large, drop the connection. */ - nn_assert (sipc->inhdr [0] == NN_SIPC_MSG_NORMAL); + /* Message header was received. Reject unsupported + message types and sizes larger than NN_RCVMAXSIZE by + dropping the connection. */ + if (sipc->inhdr [0] != NN_SIPC_MSG_NORMAL) { + sipc->state = NN_SIPC_STATE_DONE; + nn_fsm_raise (&sipc->fsm, &sipc->done, NN_SIPC_ERROR); + return; + } size = nn_getll (sipc->inhdr + 1); nn_pipebase_getopt (&sipc->pipebase, NN_SOL_SOCKET, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nanomsg-1.2.3/src/utils/efd_eventfd.inc new/nanomsg-1.2.5/src/utils/efd_eventfd.inc --- old/nanomsg-1.2.3/src/utils/efd_eventfd.inc 2026-08-02 19:41:21.000000000 +0200 +++ new/nanomsg-1.2.5/src/utils/efd_eventfd.inc 2026-09-06 22:36:53.000000000 +0200 @@ -1,6 +1,6 @@ /* Copyright (c) 2012-2013 Martin Sustrik All rights reserved. - Copyright 2015 Garrett D'Amore <[email protected]> + Copyright 2026 Garrett D'Amore <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -80,14 +80,16 @@ void nn_efd_unsignal (struct nn_efd *self) { - uint64_t count; + uint64_t count = 0; int fd = self->efd; if (nn_slow (fd < 0)) return; - /* Extract all the signals from the eventfd. */ - ssize_t sz = read (fd, &count, sizeof (count)); - errno_assert (sz >= 0); - nn_assert (sz == sizeof (count)); + /* Extract all the signals from the eventfd. + * Errors that occur reading this are generally benign, since this is + * just used to consume / clear the level signal. (EAGAIN can occur if + * the file descriptor was not in a signaled state.) + */ + (void) read (fd, &count, sizeof (count)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nanomsg-1.2.3/tests/ipc.c new/nanomsg-1.2.5/tests/ipc.c --- old/nanomsg-1.2.3/tests/ipc.c 2026-08-02 19:41:21.000000000 +0200 +++ new/nanomsg-1.2.5/tests/ipc.c 2026-09-06 22:36:53.000000000 +0200 @@ -25,9 +25,16 @@ #include "../src/pair.h" #include "../src/pubsub.h" #include "../src/ipc.h" +#include "../src/utils/wire.h" #include "testutil.h" +#if defined NN_HAVE_UNIX_SOCKETS +#include <sys/socket.h> +#include <sys/un.h> +#include <unistd.h> +#endif + /* Tests IPC transport. */ #define SOCKET_ADDRESS "ipc://test.ipc" @@ -47,6 +54,14 @@ int size; char * buf; +#if defined NN_HAVE_UNIX_SOCKETS + int raw; + int raw_rc; + struct sockaddr_un raw_addr; + uint8_t protohdr [8]; + uint8_t msghdr [9]; +#endif + /* Try closing a IPC socket while it not connected. */ sc = test_socket (AF_SP, NN_PAIR); test_connect (sc, SOCKET_ADDRESS); @@ -96,6 +111,37 @@ test_close (sc); test_close (sb); +#if defined NN_HAVE_UNIX_SOCKETS + /* An invalid message type from a raw peer must only drop that + connection; it must not abort the process. */ + sb = test_socket (AF_SP, NN_PAIR); + test_bind (sb, SOCKET_ADDRESS); + raw = socket (AF_UNIX, SOCK_STREAM, 0); + errno_assert (raw >= 0); + memset (&raw_addr, 0, sizeof (raw_addr)); + raw_addr.sun_family = AF_UNIX; + strcpy (raw_addr.sun_path, "test.ipc"); + raw_rc = connect (raw, (struct sockaddr *) &raw_addr, sizeof (raw_addr)); + errno_assert (raw_rc == 0); + memcpy (protohdr, "\0SP\0\0\0\0\0", sizeof (protohdr)); + nn_puts (protohdr + 4, NN_PAIR); + raw_rc = (int) send (raw, protohdr, sizeof (protohdr), 0); + errno_assert (raw_rc == sizeof (protohdr)); + memset (msghdr, 0, sizeof (msghdr)); + raw_rc = (int) send (raw, msghdr, sizeof (msghdr), 0); + errno_assert (raw_rc == sizeof (msghdr)); + nn_sleep (100); + raw_rc = close (raw); + errno_assert (raw_rc == 0); + + sc = test_socket (AF_SP, NN_PAIR); + test_connect (sc, SOCKET_ADDRESS); + test_send (sc, "ABC"); + test_recv (sb, "ABC"); + test_close (sc); + test_close (sb); +#endif + /* Test whether connection rejection is handled decently. */ sb = test_socket (AF_SP, NN_PAIR); test_bind (sb, SOCKET_ADDRESS);
