|
| 1 | +From de4cc71f2bca9ac59bed53ed5697147195d0226c Mon Sep 17 00:00:00 2001 |
| 2 | +From: Azure Linux Security Servicing Account |
| 3 | + |
| 4 | +Date: Mon, 14 Jul 2025 19:49:55 +0000 |
| 5 | +Subject: [PATCH] Fix CVE CVE-2025-49809 in mtr |
| 6 | + |
| 7 | +Upstream Patch Reference: https://github.com/traviscross/mtr/commit/5226f105f087c29d3cfad9f28000e7536af91ac6.patch |
| 8 | +--- |
| 9 | + ui/cmdpipe.c | 13 ++++++++++--- |
| 10 | + 1 file changed, 10 insertions(+), 3 deletions(-) |
| 11 | + |
| 12 | +diff --git a/ui/cmdpipe.c b/ui/cmdpipe.c |
| 13 | +index d22b236..1a66293 100644 |
| 14 | +--- a/ui/cmdpipe.c |
| 15 | ++++ b/ui/cmdpipe.c |
| 16 | +@@ -220,10 +220,17 @@ void execute_packet_child( |
| 17 | + the path to the mtr-packet executable. This is necessary |
| 18 | + for debugging changes for mtr-packet. |
| 19 | + */ |
| 20 | +- char *mtr_packet_path = getenv("MTR_PACKET"); |
| 21 | +- if (mtr_packet_path == NULL) { |
| 22 | ++ char * mtr_packet_path = NULL; |
| 23 | ++ |
| 24 | ++ // In the rare case that mtr-packet is not setuid-root, |
| 25 | ++ // and a select group of users has sudo privileges to run |
| 26 | ++ // mtr and not much else, THEN create /etc/mtr.is.run.under.sudo |
| 27 | ++ // to prevent a privilege escalation when one of those accounts |
| 28 | ++ // is compromised. CVE-2025-49809 |
| 29 | ++ if (access ("/etc/mtr.is.run.under.sudo", F_OK) != 0) |
| 30 | ++ mtr_packet_path = getenv("MTR_PACKET"); |
| 31 | ++ if (mtr_packet_path == NULL) |
| 32 | + mtr_packet_path = "mtr-packet"; |
| 33 | +- } |
| 34 | + |
| 35 | + /* |
| 36 | + First, try to execute mtr-packet from PATH |
| 37 | +-- |
| 38 | +2.45.3 |
| 39 | + |
0 commit comments