|
| 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 | + |
0 commit comments