inetutils: fix CVE-2026-24061
PATCH 1/1 inetutils: fix CVE-2026-24061
Details: https://nvd.nist.gov/vuln/detail/CVE-2026-24061
The vulnerability is about:
The telnetd server invokes /usr/bin/login (normally running as root) passing the value of the USER environment variable received from the client as the last parameter.
If the client supply a carefully crafted USER environment value being the string "-f root", and passes the telnet(1) -a or --login parameter to send this USER environment to the server, the client will be automatically logged in as root bypassing normal authentication processes.
This happens because the telnetd server do not sanitize the USER environment variable before passing it on to login(1), and login(1) uses the -f parameter to by-pass normal authentication.
--- .../inetutils/CVE-2026-24061-01.patch | 38 +++++++++ .../inetutils/CVE-2026-24061-02.patch | 82 +++++++++++++++++++ .../inetutils/inetutils_2.7.bb | 2 + 3 files changed, 122 insertions(+) create mode 100644 meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-01.patch create mode 100644 meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-02.patch
meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-01.patch new file +38 -0
@@ -0,0 +1,38 @@ +From fd702c02497b2f398e739e3119bed0b23dd7aa7b Mon Sep 17 00:00:00 2001 +From: Paul Eggert <[email protected]> +Date: Tue, 20 Jan 2026 01:10:36 -0800 +Subject: [PATCH] Fix injection bug with bogus user names + +Problem reported by Kyu Neushwaistein. +* telnetd/utility.c (_var_short_name): +Ignore user names that start with '-' or contain shell metacharacters. + +Signed-off-by: Simon Josefsson <[email protected]> + +CVE: CVE-2026-24061 +Upstream-Status: Backport [https://codeberg.org/inetutils/inetutils/commit/fd702c02497b2f398e739e3119bed0b23dd7aa7b] +Signed-off-by: Alper Ak <[email protected]> +--- + telnetd/utility.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/telnetd/utility.c b/telnetd/utility.c +index b486226e..c02cd0e6 100644 +--- a/telnetd/utility.c ++++ b/telnetd/utility.c +@@ -1733,7 +1733,14 @@ _var_short_name (struct line_expander *exp) + return user_name ? xstrdup (user_name) : NULL; + + case 'U': +- return getenv ("USER") ? xstrdup (getenv ("USER")) : xstrdup (""); ++ { ++ /* Ignore user names starting with '-' or containing shell ++ metachars, as they can cause trouble. */ ++ char const *u = getenv ("USER"); ++ return xstrdup ((u && *u != '-' ++ && !u[strcspn (u, "\t\n !\"#$&'()*;<=>?[\\^`{|}~")]) ++ ? u : ""); ++ } + + default: + exp->state = EXP_STATE_ERROR;
meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-02.patch new file +82 -0
82 lines not on this page · raw message
meta/recipes-connectivity/inetutils/inetutils_2.7.bb +2 -0
@@ -18,6 +18,8 @@ SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \ file://rsh.xinetd.inetutils \ file://telnet.xinetd.inetutils \ file://tftpd.xinetd.inetutils \ + file://CVE-2026-24061-01.patch \ + file://CVE-2026-24061-02.patch \ " inherit autotools gettext update-alternatives texinfo
Signature · 1 line
2.43.0
Quoted 18 lines · Alper Ak via lists.openembedded.org
Details: https://nvd.nist.gov/vuln/detail/CVE-2026-24061
The vulnerability is about:
The telnetd server invokes
/usr/bin/login(normally running as root) passing the value of the USER environment variable received from the client as the last parameter.If the client supply a carefully crafted USER environment value being the string "-f root", and passes the telnet(1) -a or --login parameter to send this USER environment to the server, the client will be automatically logged in as root bypassing normal authentication processes.
This happens because the telnetd server do not sanitize the USER environment variable before passing it on to login(1), and login(1) uses the -f parameter to by-pass normal authentication.
Quoted 8 lines
Signed-off-by Alper Ak <[email protected]>--- .../inetutils/CVE-2026-24061-01.patch | 38 +++++++++ .../inetutils/CVE-2026-24061-02.patch | 82 +++++++++++++++++++ .../inetutils/inetutils_2.7.bb | 2 + 3 files changed, 122 insertions(+) create mode 100644 meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-01.patch create mode 100644 meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-02.patch
Hello Alper,
Thank you for the patch.
Sorry but that patch was already sent a few days ago:
[PATCH] inetutils: patch CVE-2026-24061
https://lists.openembedded.org/g/openembedded-core/message/230248
... and that patch should merge shortly.
Regards,
Signature · 2 lines
Yoann Congal Smile ECS
Hi,
Yes, I missed that. My apologies.
Yoann Congal <[email protected]>, 5 Şub 2026 Per, 13:27 tarihinde şunu yazdı:
Quoted 45 lines
Quoted 18 lines · Alper Ak via lists.openembedded.org
Details: https://nvd.nist.gov/vuln/detail/CVE-2026-24061
The vulnerability is about:
The telnetd server invokes
/usr/bin/login(normally running as root) passing the value of the USER environment variable received from the client as the last parameter.If the client supply a carefully crafted USER environment value being the string "-f root", and passes the telnet(1) -a or --login parameter to send this USER environment to the server, the client will be automatically logged in as root bypassing normal authentication processes.
This happens because the telnetd server do not sanitize the USER environment variable before passing it on to login(1), and login(1) uses the -f parameter to by-pass normal authentication.
Quoted 7 lines
Signed-off-by Alper Ak <[email protected]>--- .../inetutils/CVE-2026-24061-01.patch | 38 +++++++++ .../inetutils/CVE-2026-24061-02.patch | 82 +++++++++++++++++++ .../inetutils/inetutils_2.7.bb | 2 + 3 files changed, 122 insertions(+) create mode 100644
meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-01.patchQuoted 1 line
create mode 100644
meta/recipes-connectivity/inetutils/inetutils/CVE-2026-24061-02.patchHello Alper,
Thank you for the patch.
Sorry but that patch was already sent a few days ago:
[PATCH] inetutils: patch CVE-2026-24061
https://lists.openembedded.org/g/openembedded-core/message/230248
... and that patch should merge shortly.Regards,
--
Yoann Congal
Smile ECS