summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2026-03-05 19:51:13 +0100
committerPaul Barker <paul@pbarker.dev>2026-03-25 17:34:13 +0000
commit6d3b13d2cce757d5fa3c529418ab974642067a6e (patch)
tree7d4eecea78dbb62680d539c6fca4d349cac3fdfe /meta
parentd9f03b7c82101ae64aa79a2f9aa44afd7c8ffc4c (diff)
downloadpoky-6d3b13d2cce757d5fa3c529418ab974642067a6e.tar.gz
inetutils: patch CVE-2026-28372
Pick patch according to [1] (equivalent to patch from [2]). This CVE is needed if util-linux >= 2.40 is used which is not the case in Yocto scarthgap, however it's always possible that users update packages in their layers. [1] https://security-tracker.debian.org/tracker/CVE-2026-28372 [2] https://nvd.nist.gov/vuln/detail/CVE-2026-28372 (From OE-Core rev: 2ab4f313ebd2c8f2d801dc3f53df3a0741cf848e) Signed-off-by: Peter Marko <peter.marko@siemens.com> [YC: replaced kirkstone by scarthap] Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/CVE-2026-28372.patch86
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils_2.5.bb1
2 files changed, 87 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/inetutils/inetutils/CVE-2026-28372.patch b/meta/recipes-connectivity/inetutils/inetutils/CVE-2026-28372.patch
new file mode 100644
index 0000000000..4e6bf0c87c
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/CVE-2026-28372.patch
@@ -0,0 +1,86 @@
1From 4db2f19f4caac03c7f4da6363c140bd70df31386 Mon Sep 17 00:00:00 2001
2From: Erik Auerswald <auerswal@unix-ag.uni-kl.de>
3Date: Sun, 15 Feb 2026 15:38:50 +0100
4Subject: [PATCH] telnetd: don't allow systemd service credentials
5
6The login(1) implementation of util-linux added support for
7systemd service credentials in release 2.40. This allows to
8bypass authentication by specifying a directory name in the
9environment variable CREDENTIALS_DIRECTORY. If this directory
10contains a file named 'login.noauth' with the content of 'yes',
11login(1) skips authentication.
12
13GNU Inetutils telnetd supports to set arbitrary environment
14variables using the 'Environment' and 'New Environment'
15Telnet options. This allows specifying a directory containing
16'login.noauth'. A local user can create such a directory
17and file, and, e.g., specify the user name 'root' to escalate
18privileges.
19
20This problem was reported by Ron Ben Yizhak in
21<https://lists.gnu.org/archive/html/bug-inetutils/2026-02/msg00000.html>.
22
23This commit clears CREDENTIALS_DIRECTORY from the environment
24before executing login(1) to implement a simple fix that can
25be backported easily.
26
27* NEWS.md: Mention fix.
28* THANKS: Mention Ron Ben Yizhak.
29* telnetd/pty.c: Clear CREDENTIALS_DIRECTORY from the environment
30before executing 'login'.
31
32CVE: CVE-2026-28372
33Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/inetutils.git/commit/?id=4db2f19f4caac03c7f4da6363c140bd70df31386]
34Signed-off-by: Peter Marko <peter.marko@siemens.com>
35---
36 NEWS | 5 +++++
37 THANKS | 1 +
38 telnetd/pty.c | 8 ++++++++
39 3 files changed, 14 insertions(+)
40
41diff --git a/NEWS b/NEWS
42index 877ca53b..f5172a71 100644
43--- a/NEWS
44+++ b/NEWS
45@@ -1,5 +1,10 @@
46 GNU inetutils NEWS -- history of user-visible changes.
47
48+** Prevent privilege escalation via telnetd abusing systemd service
49+credentials support added to the login(1) implementation of util-linux
50+in release 2.40. Reported by Ron Ben Yizhak in
51+<https://lists.gnu.org/archive/html/bug-inetutils/2026-02/msg00000.html>.
52+
53 * Noteworthy changes in release 2.5 (2023-12-29) [stable]
54
55 ** ftpd, rcp, rlogin, rsh, rshd, uucpd
56diff --git a/THANKS b/THANKS
57index 8d1d3dbb..ef5f6063 100644
58--- a/THANKS
59+++ b/THANKS
60@@ -9,6 +9,7 @@ In particular:
61 NIIBE Yutaka (Security fixes & making talk finally work)
62 Nathan Neulinger (tftpd)
63 Thomas Bushnell (sockaddr sin_len field)
64+ Ron Ben Yizhak (reported privilege escalation via telnetd)
65
66 Please see version control logs and ChangeLog.? for full credits.
67
68diff --git a/telnetd/pty.c b/telnetd/pty.c
69index c727e7be..f3518049 100644
70--- a/telnetd/pty.c
71+++ b/telnetd/pty.c
72@@ -130,6 +130,14 @@ start_login (char *host, int autologin, char *name)
73 if (!cmd)
74 fatal (net, "can't expand login command line");
75 argcv_get (cmd, "", &argc, &argv);
76+
77+ /* util-linux's "login" introduced an authentication bypass method
78+ * via environment variable "CREDENTIALS_DIRECTORY" in version 2.40.
79+ * Clear it from the environment before executing "login" to prevent
80+ * abuse via Telnet.
81+ */
82+ unsetenv ("CREDENTIALS_DIRECTORY");
83+
84 execv (argv[0], argv);
85 syslog (LOG_ERR, "%s: %m\n", cmd);
86 fatalperror (net, cmd);
diff --git a/meta/recipes-connectivity/inetutils/inetutils_2.5.bb b/meta/recipes-connectivity/inetutils/inetutils_2.5.bb
index 486878022f..6c53902356 100644
--- a/meta/recipes-connectivity/inetutils/inetutils_2.5.bb
+++ b/meta/recipes-connectivity/inetutils/inetutils_2.5.bb
@@ -20,6 +20,7 @@ SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \
20 file://tftpd.xinetd.inetutils \ 20 file://tftpd.xinetd.inetutils \
21 file://CVE-2026-24061-1.patch \ 21 file://CVE-2026-24061-1.patch \
22 file://CVE-2026-24061-2.patch \ 22 file://CVE-2026-24061-2.patch \
23 file://CVE-2026-28372.patch \
23 " 24 "
24 25
25inherit autotools gettext update-alternatives texinfo 26inherit autotools gettext update-alternatives texinfo