Skip to contentSkip to conversation

package/xinetd: add upstream security fix for CVE-2013-4342

PATCH New Peter Korsgaard 1 participant 3 messages Nov 22, 2020 – Dec 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/xinetd: add upstream security fix for CVE-2013-4342

xinetd does not enforce the user and group configuration directives for TCPMUX services, which causes these services to be run as root and makes it easier for remote attackers to gain privileges by leveraging another vulnerability in a service.

---
 ...netd-ignores-user-and-group-directiv.patch | 29 +++++++++++++++++++
 package/xinetd/xinetd.mk                      |  3 ++
 2 files changed, 32 insertions(+)
 create mode 100644 package/xinetd/0005-CVE-2013-4342-xinetd-ignores-user-and-group-directiv.patch
package/xinetd/0005-CVE-2013-4342-xinetd-ignores-user-and-group-directiv.patch new file +29 -0
new file mode 100644
index 0000000000..bb2ee1fc9a
@@ -0,0 +1,29 @@
+From 91e2401a219121eae15244a6b25d2e79c1af5864 Mon Sep 17 00:00:00 2001
+From: Thomas Swan <[email protected]>
+Date: Wed, 2 Oct 2013 23:17:17 -0500
+Subject: [PATCH] CVE-2013-4342: xinetd: ignores user and group directives for
+ TCPMUX services
+
+Originally reported to Debian in 2005 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324678> and rediscovered <https://bugzilla.redhat.com/show_bug.cgi?id=1006100>, xinetd would execute TCPMUX services without dropping privilege to match the service configuration allowing the service to run with same privilege as the xinetd process (root).
+
+Signed-off-by: Peter Korsgaard <[email protected]>
+---
+ xinetd/builtins.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xinetd/builtins.c b/xinetd/builtins.c
+index 3b85579..34a5bac 100644
+--- a/xinetd/builtins.c
++++ b/xinetd/builtins.c
+@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp )
+    if( SC_IS_INTERNAL( scp ) ) {
+       SC_INTERNAL(scp, nserp);
+    } else {
+-      exec_server(nserp);
++      child_process(nserp);
+    }
+ }
+ 
+-- 
+2.20.1
+
package/xinetd/xinetd.mk +3 -0
index a2ba10df74..6d6767766b 100644
@@ -9,6 +9,9 @@ XINETD_SITE = $(call github,xinetd-org,xinetd,xinetd-$(XINETD_VERSION))
 XINETD_LICENSE = xinetd license
 XINETD_LICENSE_FILES = COPYRIGHT
 
+# 0005-CVE-2013-4342-xinetd-ignores-user-and-group-directiv.patch
+XINETD_IGNORE_CVES += CVE-2013-4342
+
 XINETD_CFLAGS = $(TARGET_CFLAGS)
 
 # Three cases here:
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/xinetd: add upstream security fix for CVE-2013-4342

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

xinetd does not enforce the user and group configuration directives for TCPMUX services, which causes these services to be run as root and makes it easier for remote attackers to gain privileges by leveraging another vulnerability in a service.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 package/xinetd: add upstream security fix for CVE-2013-4342

In reply to Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

xinetd does not enforce the user and group configuration directives for TCPMUX services, which causes these services to be run as root and makes it easier for remote attackers to gain privileges by leveraging another vulnerability in a service.

Committed to 2020.02.x and 2020.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard