Skip to content

Commit 15ffcf5

Browse files
Patch iputils for CVE-2025-48964
1 parent 3cbfcfc commit 15ffcf5

File tree

2 files changed

+73
-1
lines changed

2 files changed

+73
-1
lines changed

SPECS/iputils/CVE-2025-48964.patch

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
From 86b094a7eef8930935d7888d0f4f70c80552c367 Mon Sep 17 00:00:00 2001
2+
From: Azure Linux Security Servicing Account
3+
4+
Date: Tue, 29 Jul 2025 07:05:27 +0000
5+
Subject: [PATCH] Fix CVE CVE-2025-48964 in iputils
6+
7+
Upstream Patch Reference: https://github.com/iputils/iputils/commit/afa36390394a6e0cceba03b52b59b6d41710608c.patch
8+
---
9+
ping/ping.h | 2 +-
10+
ping/ping_common.c | 8 ++++----
11+
2 files changed, 5 insertions(+), 5 deletions(-)
12+
13+
diff --git a/ping/ping.h b/ping/ping.h
14+
index a40c8f8..f5a5bb8 100644
15+
--- a/ping/ping.h
16+
+++ b/ping/ping.h
17+
@@ -191,7 +191,7 @@ struct ping_rts {
18+
long tmax; /* maximum round trip time */
19+
double tsum; /* sum of all times, for doing average */
20+
double tsum2;
21+
- int rtt;
22+
+ uint64_t rtt; /* Exponential weight moving average calculated in fixed point */
23+
int rtt_addend;
24+
uint16_t acked;
25+
int pipesize;
26+
diff --git a/ping/ping_common.c b/ping/ping_common.c
27+
index 73da26c..8fe2a1a 100644
28+
--- a/ping/ping_common.c
29+
+++ b/ping/ping_common.c
30+
@@ -282,7 +282,7 @@ int __schedule_exit(int next)
31+
32+
static inline void update_interval(struct ping_rts *rts)
33+
{
34+
- int est = rts->rtt ? rts->rtt / 8 : rts->interval * 1000;
35+
+ int est = rts->rtt ? (int)(rts->rtt / 8) : rts->interval * 1000;
36+
37+
rts->interval = (est + rts->rtt_addend + 500) / 1000;
38+
if (rts->uid && rts->interval < MIN_USER_INTERVAL_MS)
39+
@@ -762,7 +762,7 @@ restamp:
40+
if (triptime > rts->tmax)
41+
rts->tmax = triptime;
42+
if (!rts->rtt)
43+
- rts->rtt = triptime * 8;
44+
+ rts->rtt = ((uint64_t)triptime) * 8;
45+
else
46+
rts->rtt += triptime - rts->rtt / 8;
47+
if (rts->opt_adaptive)
48+
@@ -932,7 +932,7 @@ int finish(struct ping_rts *rts)
49+
int ipg = (1000000 * (long long)tv.tv_sec + tv.tv_nsec / 1000) / (rts->ntransmitted - 1);
50+
51+
printf(_("%sipg/ewma %d.%03d/%d.%03d ms"),
52+
- comma, ipg / 1000, ipg % 1000, rts->rtt / 8000, (rts->rtt / 8) % 1000);
53+
+ comma, ipg / 1000, ipg % 1000, (int)(rts->rtt / 8000), (int)((rts->rtt / 8) % 1000));
54+
}
55+
putchar('\n');
56+
return (!rts->nreceived || (rts->deadline && rts->nreceived < rts->npackets));
57+
@@ -957,7 +957,7 @@ void status(struct ping_rts *rts)
58+
fprintf(stderr, _(", min/avg/ewma/max = %ld.%03ld/%lu.%03ld/%d.%03d/%ld.%03ld ms"),
59+
(long)rts->tmin / 1000, (long)rts->tmin % 1000,
60+
tavg / 1000, tavg % 1000,
61+
- rts->rtt / 8000, (rts->rtt / 8) % 1000, (long)rts->tmax / 1000, (long)rts->tmax % 1000);
62+
+ (int)(rts->rtt / 8000), (int)((rts->rtt / 8) % 1000), (long)rts->tmax / 1000, (long)rts->tmax % 1000);
63+
}
64+
fprintf(stderr, "\n");
65+
}
66+
--
67+
2.45.4
68+

SPECS/iputils/iputils.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
Summary: Programs for basic networking
22
Name: iputils
33
Version: 20240117
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: BSD-3 AND GPLv2+ AND Rdisc
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
88
Group: Applications/Communications
99
URL: https://github.com/iputils/iputils
1010
Source0: https://github.com/iputils/iputils/archive/20240117.tar.gz#/%{name}-%{version}.tar.gz
1111
Patch0: ping_test_ipv6_localhost.patch
12+
Patch1: CVE-2025-48964.patch
1213
BuildRequires: iproute
1314
BuildRequires: libcap-devel
1415
BuildRequires: libgcrypt-devel
@@ -64,6 +65,9 @@ mv -f RELNOTES.tmp RELNOTES.old
6465
%exclude %{_datadir}/locale/
6566

6667
%changelog
68+
* Tue Jul 29 2025 Azure Linux Security Servicing Account <[email protected]> - 20240117-2
69+
- Patch for CVE-2025-48964
70+
6771
* Thu Feb 01 2024 Suresh Thelkar <[email protected]> - 20240117-1
6872
- Upgrade to 20240117
6973

0 commit comments

Comments
 (0)