public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Vitezslav Crhonek <vcrhonek@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/openslp] rawhide: Fix buffer overflow in ProcessDASrvRqst
Date: Mon, 09 Nov 2026 07:40:51 GMT	[thread overview]
Message-ID: <179421005154.1.6698836200296274253.rpms-openslp-ee05ae3f93b0@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/openslp
Branch : rawhide
Commit : ee05ae3f93b043e8f1c876fdc2cd1657a857ea45
Author : Vitezslav Crhonek <vcrhonek@redhat.com>
Date   : 2026-11-09T08:32:10+01:00
Stats  : +39/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/openslp/c/ee05ae3f93b043e8f1c876fdc2cd1657a857ea45?branch=rawhide

Log:
Fix buffer overflow in ProcessDASrvRqst

---
diff --git a/openslp-2.0.0-processDASrvRqst-buffer-overflow.patch b/openslp-2.0.0-processDASrvRqst-buffer-overflow.patch
new file mode 100644
index 0000000..08da3a3
--- /dev/null
+++ b/openslp-2.0.0-processDASrvRqst-buffer-overflow.patch
@@ -0,0 +1,31 @@
+diff -up openslp-2.0.0/slpd/slpd_process.c.processDASrvRqst-buffer-overflow openslp-2.0.0/slpd/slpd_process.c
+--- openslp-2.0.0/slpd/slpd_process.c.processDASrvRqst-buffer-overflow
++++ openslp-2.0.0/slpd/slpd_process.c
+@@ -286,10 +286,23 @@ static int ProcessDASrvRqst(SLPMessage *
+
+             if (0 == SLPDKnownDAGenerateMyDAAdvert(&loaddr, 0, 0, 0, message->header.xid, &tmp))
+             {
+-               memcpy((*sendbuf)->curpos, tmp->start, tmp->end - tmp->start);
+-               (*sendbuf)->curpos = ((*sendbuf)->curpos) + (tmp->end - tmp->start);
+-               SLPBufferFree(tmp);
+-               tmp = 0;
++               /* Resize the buffer if needed before copying - the
++                * generated DAAdvert may exceed the initial buffer size
++                * when configuration fields (especially useScopes) are large.
++                */
++               if (CheckAndResizeBuffer(sendbuf, tmp, grow_size) == 0)
++               {
++                  memcpy((*sendbuf)->curpos, tmp->start, tmp->end - tmp->start);
++                  (*sendbuf)->curpos = ((*sendbuf)->curpos) + (tmp->end - tmp->start);
++                  SLPBufferFree(tmp);
++                  tmp = 0;
++               }
++               else
++               {
++                  SLPBufferFree(tmp);
++                  tmp = 0;
++                  return SLP_ERROR_INTERNAL_ERROR;
++               }
+             }
+             else
+             {

diff --git a/openslp.spec b/openslp.spec
index 7849195..93a11ac 100644
--- a/openslp.spec
+++ b/openslp.spec
@@ -41,6 +41,9 @@ Patch8:  openslp-2.0.0-dhcp-integer-overflow.patch
 #   4-byte struct in_addr to KnownDABadDA() where a struct sockaddr is
 #   expected, so failed DAs were never evicted from the known DA cache
 Patch9:  openslp-2.0.0-cwe-843-knownda-type-confusion.patch
+# Patch10: fixes heap buffer overflow in ProcessDASrvRqst when copying
+#   initial DAAdvert into fixed 4096-byte buffer
+Patch10:  openslp-2.0.0-processDASrvRqst-buffer-overflow.patch
 
 BuildRequires: make
 BuildRequires: automake libtool
@@ -84,6 +87,7 @@ OpenSLP server daemon to dynamically register services.
 %patch -P7 -p1 -b .cve-2019-5544
 %patch -P8 -p1 -b .dhcp-integer-overflow
 %patch -P9 -p1 -b .cwe-843-knownda-type-confusion
+%patch -P10 -p1 -b .processDASrvRqst-buffer-overflow
 
 # tarball goof (?), it wants to re-automake anyway, so let's do it right.
 #libtoolize --force
@@ -181,6 +185,10 @@ rm -f  $RPM_BUILD_ROOT%{_libdir}/lib*.la
 
 
 %changelog
+* Mon Nov 09 2026 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-45
+- Fix heap buffer overflow in ProcessDASrvRqst when copying initial
+  DAAdvert into fixed 4096-byte buffer
+
 * Wed Sep 30 2026 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.0-45
 - Fix type confusion in KnownDABadDA call, so that failed directory agents
   are correctly removed from the known DA cache

                 reply	other threads:[~2026-11-09  7:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179421005154.1.6698836200296274253.rpms-openslp-ee05ae3f93b0@fedoraproject.org \
    --to=vcrhonek@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox