Skip to contentSkip to conversation

package/net-tools: fix regression introduced by CVE fix

PATCH Applied Thomas Perale via buildroot 1 participant 3 messages Jul 1, 2025 – Jul 11, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/net-tools: fix regression introduced by CVE fix

Commit [1] backported an upstream patch to address CVE-2025-46836 that included a regression.
Upstream later fixed this regression in commit [2].

This patch add that fix to correct the issue introduced by the original patch.

[1] 323aaa9f54 package/net-tools: add upstream security fix for CVE-2025-46836
[2] https://sourceforge.net/p/net-tools/code/ci/ddb0e375fb9ca95bb69335540b85bbdaa2714348/

---
 ...46836-interface-statistic-regression.patch | 30 +++++++++++++++++++
 package/net-tools/net-tools.mk                |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 package/net-tools/0002-CVE-2025-46836-interface-statistic-regression.patch
package/net-tools/0002-CVE-2025-46836-interface-statistic-regression.patch new file +30 -0
new file mode 100644
index 0000000000..60cae48aef
@@ -0,0 +1,30 @@
+From ddb0e375fb9ca95bb69335540b85bbdaa2714348 Mon Sep 17 00:00:00 2001
+From: Bernd Eckenfels <[email protected]>
+Date: Sat, 17 May 2025 21:53:23 +0200
+Subject: [PATCH] Interface statistic regression after 7a8f42fb2
+
+CVE: CVE-2025-46836
+Upstream: https://sourceforge.net/p/net-tools/code/ci/ddb0e375fb9ca95bb69335540b85bbdaa2714348/
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ lib/interface.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/lib/interface.c b/lib/interface.c
+index a054f12..ca4adf1 100644
+--- a/lib/interface.c
++++ b/lib/interface.c
+@@ -239,12 +239,11 @@ static const char *get_name(char *name, const char *p)
+                 /* copy the digits */
+                 while (*p && isdigit((unsigned char)*p) && dst < end)
+                     *dst++ = *p++;
+-
+-                if (*p == ':')              /* consume trailing colon     */
+-                    ++p;
+             } else {              /* if so treat as normal */
+                 p = dot;
+             }
++            if (*p == ':')                  /* consume trailing colon */
++                ++p;
+             break;                          /* interface name ends here   */
+         }
package/net-tools/net-tools.mk +1 -0
index a227d6477f..0468a00bf0 100644
@@ -13,6 +13,7 @@ NET_TOOLS_LICENSE_FILES = COPYING
 NET_TOOLS_CPE_ID_VALID = YES
 
 # 0001-CVE-2025-46836-interface.c-Stack-based-Buffer-Overfl.patch
+# 0002-CVE-2025-46836-interface-statistic-regression.patch
 NET_TOOLS_IGNORE_CVES += CVE-2025-46836
 
 define NET_TOOLS_CONFIGURE_CMDS
Signature · 6 lines
2.50.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines · Thomas Perale via buildroot

Commit [1] backported an upstream patch to address CVE-2025-46836 that included a regression.
Upstream later fixed this regression in commit [2].

This patch add that fix to correct the issue introduced by the original patch.

[1] 323aaa9f54 package/net-tools: add upstream security fix for CVE-2025-46836
[2] https://sourceforge.net/p/net-tools/code/ci/ddb0e375fb9ca95bb69335540b85bbdaa2714348/

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Thomas Perale via buildroot

In reply of:

Quoted 11 lines

Commit [1] backported an upstream patch to address CVE-2025-46836 that included a regression.
Upstream later fixed this regression in commit [2].

This patch add that fix to correct the issue introduced by the original patch.

[1] 323aaa9f54 package/net-tools: add upstream security fix for CVE-2025-46836
[2] https://sourceforge.net/p/net-tools/code/ci/ddb0e375fb9ca95bb69335540b85bbdaa2714348/

Applied to 2025.02.x & 2025.05.x. Thanks

Quoted 61 lines
---
 ...46836-interface-statistic-regression.patch | 30 +++++++++++++++++++
 package/net-tools/net-tools.mk                |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 package/net-tools/0002-CVE-2025-46836-interface-statistic-regression.patch
package/net-tools/0002-CVE-2025-46836-interface-statistic-regression.patch new file +30 -0
new file mode 100644
index 0000000000..60cae48aef
@@ -0,0 +1,30 @@
+From ddb0e375fb9ca95bb69335540b85bbdaa2714348 Mon Sep 17 00:00:00 2001
+From: Bernd Eckenfels <[email protected]>
+Date: Sat, 17 May 2025 21:53:23 +0200
+Subject: [PATCH] Interface statistic regression after 7a8f42fb2
+
+CVE: CVE-2025-46836
+Upstream: https://sourceforge.net/p/net-tools/code/ci/ddb0e375fb9ca95bb69335540b85bbdaa2714348/
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ lib/interface.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/lib/interface.c b/lib/interface.c
+index a054f12..ca4adf1 100644
+--- a/lib/interface.c
++++ b/lib/interface.c
+@@ -239,12 +239,11 @@ static const char *get_name(char *name, const char *p)
+                 /* copy the digits */
+                 while (*p && isdigit((unsigned char)*p) && dst < end)
+                     *dst++ = *p++;
+-
+-                if (*p == ':')              /* consume trailing colon     */
+-                    ++p;
+             } else {              /* if so treat as normal */
+                 p = dot;
+             }
++            if (*p == ':')                  /* consume trailing colon */
++                ++p;
+             break;                          /* interface name ends here   */
+         }
package/net-tools/net-tools.mk +1 -0
index a227d6477f..0468a00bf0 100644
@@ -13,6 +13,7 @@ NET_TOOLS_LICENSE_FILES = COPYING
 NET_TOOLS_CPE_ID_VALID = YES
 
 # 0001-CVE-2025-46836-interface.c-Stack-based-Buffer-Overfl.patch
+# 0002-CVE-2025-46836-interface-statistic-regression.patch
 NET_TOOLS_IGNORE_CVES += CVE-2025-46836
 
 define NET_TOOLS_CONFIGURE_CMDS
Signature · 6 lines
2.50.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot