Fix ping hangs under ASan on aarch64
Resolves: RHEL-96871
This commit is contained in:
parent
c0ae22ecf0
commit
ec893a4c20
38
014-ping-Make-ping_rts-struct-static.patch
Normal file
38
014-ping-Make-ping_rts-struct-static.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 68bdc8e127f1f02aa742b324d1cf3c89d251e13b Mon Sep 17 00:00:00 2001
|
||||
From: Petr Vorel <pvorel@suse.cz>
|
||||
Date: Tue, 20 Sep 2022 22:23:44 +0200
|
||||
Subject: [PATCH] ping: Make ping_rts struct static
|
||||
|
||||
This allows accessing global_rts->exiting in sigexit() signal handler
|
||||
after main() has exited. Problem occurred on aarch64, which occasionally
|
||||
delivered signal after main() has exited, which causes segfault.
|
||||
|
||||
Fixes: b3a41a6 ("ping: move global variables to runtime config structure")
|
||||
Fixes: https://github.com/iputils/iputils/issues/423
|
||||
Closes: https://github.com/iputils/iputils/pull/425
|
||||
|
||||
Reported-by: linzhanglong
|
||||
Suggested-by: Cyril Hrubis <chrubis@suse.cz>
|
||||
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
||||
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
||||
(cherry picked from commit 7861af993bf47fccaf37c5659d66c09832844ae3)
|
||||
---
|
||||
ping/ping.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ping/ping.c b/ping/ping.c
|
||||
index ff7e742..19913e6 100644
|
||||
--- a/ping/ping.c
|
||||
+++ b/ping/ping.c
|
||||
@@ -263,7 +263,7 @@ main(int argc, char **argv)
|
||||
socket_st sock6 = { .fd = -1 };
|
||||
char *target;
|
||||
char *outpack_fill = NULL;
|
||||
- struct ping_rts rts = {
|
||||
+ static struct ping_rts rts = {
|
||||
.interval = 1000,
|
||||
.preload = 1,
|
||||
.lingertime = MAXWAIT * 1000,
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
Summary: Network monitoring tools including ping
|
||||
Name: iputils
|
||||
Version: 20210202
|
||||
Release: 12%{?dist}
|
||||
Release: 13%{?dist}
|
||||
# some parts are under the original BSD (ping.c)
|
||||
# some are under GPLv2+ (tracepath.c)
|
||||
License: BSD and GPLv2+
|
||||
@ -32,6 +32,7 @@ Patch010: 010-ping-Fix-socket-error-reporting.patch
|
||||
Patch011: 011-ping-Fix-ping6-binding-to-VRF-and-address.patch
|
||||
Patch012: 012-ping6-Avoid-binding-to-non-VRF.patch
|
||||
Patch013: 013-ping-Fix-signed-64-bit-integer-overflow-in-RTT-calcu.patch
|
||||
Patch014: 014-ping-Make-ping_rts-struct-static.patch
|
||||
|
||||
# Downstream-only patches
|
||||
Patch100: 100-iputils-ifenslave.patch
|
||||
@ -142,6 +143,9 @@ install -cp ifenslave.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
||||
%attr(644,root,root) %{_mandir}/man8/ninfod.8.gz
|
||||
|
||||
%changelog
|
||||
* Thu Jun 19 2025 Jan Macku <jamacku@redhat.com> - 20210202-13
|
||||
- Fix ping hangs under ASan on aarch64 (RHEL-96871)
|
||||
|
||||
* Tue Jun 03 2025 Jan Macku <jamacku@redhat.com> - 20210202-12
|
||||
- Fix CVE-2025-47268 iputils: Signed Integer Overflow in Timestamp Multiplication in iputils ping (RHEL-94334)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user