public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/openslp] rawhide: Fix buffer overflow in ProcessDASrvRqst
@ 2026-11-09 7:40 Vitezslav Crhonek
0 siblings, 0 replies; only message in thread
From: Vitezslav Crhonek @ 2026-11-09 7:40 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-09 7:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 7:40 [rpms/openslp] rawhide: Fix buffer overflow in ProcessDASrvRqst Vitezslav Crhonek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox