Compare commits
No commits in common. "228224746f2f6d017069cd0656d15e80f46762ea" and "11cf20e2a8a60d5480bc03f7633801abb001573f" have entirely different histories.
228224746f
...
11cf20e2a8
@ -1,31 +0,0 @@
|
|||||||
From f9939490ebdba403462b6839d29fdc6837d8a0ec Mon Sep 17 00:00:00 2001
|
|
||||||
From: Azat Khuzhin <azat@libevent.org>
|
|
||||||
Date: Sun, 18 Feb 2024 21:19:41 +0100
|
|
||||||
Subject: [PATCH] Fix leak in evconnlistener_new_async()
|
|
||||||
|
|
||||||
Fixes: https://github.com/libevent/libevent/issues/414
|
|
||||||
|
|
||||||
---
|
|
||||||
listener.c | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/listener.c b/listener.c
|
|
||||||
index f5c00c9..01dc41d 100644
|
|
||||||
--- a/listener.c
|
|
||||||
+++ b/listener.c
|
|
||||||
@@ -885,8 +885,11 @@ evconnlistener_new_async(struct event_base *base,
|
|
||||||
return &lev->base;
|
|
||||||
|
|
||||||
err_free_accepting:
|
|
||||||
+ for (i = 0; i < lev->n_accepting; ++i) {
|
|
||||||
+ if (lev->accepting[i])
|
|
||||||
+ free_and_unlock_accepting_socket(lev->accepting[i]);
|
|
||||||
+ }
|
|
||||||
mm_free(lev->accepting);
|
|
||||||
- /* XXXX free the other elements. */
|
|
||||||
err_delete_lock:
|
|
||||||
EVTHREAD_FREE_LOCK(lev->base.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
|
|
||||||
err_free_lev:
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
From 5c6eaadd24ed432347e55f6827e8d8ac670cd534 Mon Sep 17 00:00:00 2001
|
|
||||||
From: icy17 <1061499390@qq.com>
|
|
||||||
Date: Wed, 10 Apr 2024 16:18:27 +0800
|
|
||||||
Subject: [PATCH] Fix potential Null pointer dereference in regress_finalize.c
|
|
||||||
Referenxe:https://github.com/libevent/libevent/pull/1598/
|
|
||||||
|
|
||||||
---
|
|
||||||
test/regress_finalize.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/test/regress_finalize.c b/test/regress_finalize.c
|
|
||||||
index 9e57188..543cd94 100644
|
|
||||||
--- a/test/regress_finalize.c
|
|
||||||
+++ b/test/regress_finalize.c
|
|
||||||
@@ -130,6 +130,7 @@ test_fin_cb_invoked(void *arg)
|
|
||||||
/* Okay, now add but don't have it become active, and make sure *that*
|
|
||||||
* works. */
|
|
||||||
ev = evtimer_new(base, timer_callback, &ev_called);
|
|
||||||
+ tt_assert(ev);
|
|
||||||
event_add(ev, &ten_sec);
|
|
||||||
event_free_finalize(0, ev, event_finalize_callback_1);
|
|
||||||
|
|
||||||
@@ -141,6 +142,7 @@ test_fin_cb_invoked(void *arg)
|
|
||||||
|
|
||||||
/* Now try adding and deleting after finalizing. */
|
|
||||||
ev = evtimer_new(base, timer_callback, &ev_called);
|
|
||||||
+ tt_assert(ev);
|
|
||||||
evtimer_assign(&ev2, base, timer_callback, &ev_called);
|
|
||||||
event_add(ev, &ten_sec);
|
|
||||||
event_free_finalize(0, ev, event_finalize_callback_1);
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
From 39073df8318364fc868ab6d90a345ea4fc66e864 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Liu Dongmiao <liudongmiao@gmail.com>
|
|
||||||
Date: Sat, 30 Mar 2024 21:44:50 +0800
|
|
||||||
Subject: [PATCH] evutil: don't call memset before memcpy
|
|
||||||
|
|
||||||
In `evutil_parse_sockaddr_port`, it would `memset` the `out` to zero,
|
|
||||||
however, the `memset` is unnecessary before `memcpy`, and may cause
|
|
||||||
undefined behavior if the `outlen` is invalid.
|
|
||||||
|
|
||||||
This should close #1573.
|
|
||||||
|
|
||||||
Reference:https://github.com/libevent/libevent/commit/39073df8
|
|
||||||
---
|
|
||||||
evutil.c | 2 --
|
|
||||||
1 file changed, 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/evutil.c b/evutil.c
|
|
||||||
index 9817f08..cc0133f 100644
|
|
||||||
--- a/evutil.c
|
|
||||||
+++ b/evutil.c
|
|
||||||
@@ -2216,7 +2216,6 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *
|
|
||||||
if ((int)sizeof(sin6) > *outlen)
|
|
||||||
return -1;
|
|
||||||
sin6.sin6_scope_id = if_index;
|
|
||||||
- memset(out, 0, *outlen);
|
|
||||||
memcpy(out, &sin6, sizeof(sin6));
|
|
||||||
*outlen = sizeof(sin6);
|
|
||||||
return 0;
|
|
||||||
@@ -2235,7 +2234,6 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *
|
|
||||||
return -1;
|
|
||||||
if ((int)sizeof(sin) > *outlen)
|
|
||||||
return -1;
|
|
||||||
- memset(out, 0, *outlen);
|
|
||||||
memcpy(out, &sin, sizeof(sin));
|
|
||||||
*outlen = sizeof(sin);
|
|
||||||
return 0;
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
@ -1,19 +1,18 @@
|
|||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: libevent
|
Name: libevent
|
||||||
Version: 2.1.12
|
Version: 2.1.12
|
||||||
Release: 6
|
Release: 1
|
||||||
Summary: An event notification library
|
Summary: An event notification library
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://libevent.org/
|
URL: http://libevent.org/
|
||||||
Source0: https://github.com/libevent/libevent/releases/download/release-%{version}-stable/libevent-%{version}-stable.tar.gz
|
Source0: https://github.com/libevent/libevent/releases/download/release-%{version}-stable/libevent-%{version}-stable.tar.gz
|
||||||
|
|
||||||
BuildRequires: gcc doxygen openssl-devel
|
BuildRequires: gcc doxygen openssl-devel libevent
|
||||||
|
|
||||||
Patch0: libevent-nonettests.patch
|
Patch0: libevent-nonettests.patch
|
||||||
Patch1: http-add-callback-to-allow-server-to-decline-and-the.patch
|
Patch1: http-add-callback-to-allow-server-to-decline-and-the.patch
|
||||||
Patch6000: backport-evutil-don-t-call-memset-before-memcpy.patch
|
|
||||||
Patch6001: backport-Fix-potential-Null-pointer-dereference-in-regress_fi.patch
|
|
||||||
Patch6002: backport-Fix-leak-in-evconnlistener_new_async.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Libevent additionally provides a sophisticated framework for buffered network IO, with support for sockets,
|
Libevent additionally provides a sophisticated framework for buffered network IO, with support for sockets,
|
||||||
@ -37,10 +36,11 @@ with %{name}.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
cp -a %{_libdir}/libevent* %{buildroot}%{_libdir}
|
||||||
rm -f %{buildroot}%{_libdir}/*.la
|
rm -f %{buildroot}%{_libdir}/*.la
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%make_build check
|
make check
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
@ -71,34 +71,6 @@ rm -f %{buildroot}%{_libdir}/*.la
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Oct 27 2024 zhangyaqi <zhangyaqi@kylinos.cn> - 2.1.12-6
|
|
||||||
- Fix leak in evconnlistener_new_async()
|
|
||||||
|
|
||||||
* Wed Jul 03 2024 zhangxianting <zhangxianting@uniontech.com> - 2.1.12-5
|
|
||||||
- Type:bugfix
|
|
||||||
- CVE:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:fix potential Null pointer dereference in regress_finalize.c
|
|
||||||
|
|
||||||
* Mon Apr 01 2024 shixuantong <shixuantong1@huawei.com> - 2.1.12-4
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:evutil: don't call memset before memcpy
|
|
||||||
|
|
||||||
* Wed Apr 21 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 2.1.12-3
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:use make macros to run check
|
|
||||||
|
|
||||||
* Mon Mar 29 2021 panxiaohe <panxiaohe@huawei.com> - 2.1.12-2
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:add debuginfo package and make ELF files stripped
|
|
||||||
remove redundant ABI compatibility library
|
|
||||||
|
|
||||||
* Wed Aug 12 2020 Yeqing Peng <pengyeqing@huawei.com> - 2.1.12-1
|
* Wed Aug 12 2020 Yeqing Peng <pengyeqing@huawei.com> - 2.1.12-1
|
||||||
- update to 2.1.12
|
- update to 2.1.12
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user