diff mbox series

[kirkstone,1/1] socat: Fix CVE-2024-54661

Message ID 20250116065747.1926599-1-archana.polampalli@windriver.com
State Rejected
Delegated to: Steve Sakoman
Headers show
Series [kirkstone,1/1] socat: Fix CVE-2024-54661 | expand

Commit Message

Polampalli, Archana Jan. 16, 2025, 6:57 a.m. UTC
From: Archana Polampalli <archana.polampalli@windriver.com>

readline.sh in socat through 1.8.0.1 relies on the /tmp/$USER/stderr2 file.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-54661
https://bugzilla.suse.com/show_bug.cgi?id=1225462#c7

Upstream-patch:
http://www.dest-unreach.org/socat/download/socat-1.8.0.2.tar.bz2

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
---
 .../socat/files/CVE-2024-54661.patch          | 31 +++++++++++++++++++
 .../socat/socat_1.7.4.4.bb                    |  4 ++-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/socat/files/CVE-2024-54661.patch

Comments

Marko, Peter Jan. 16, 2025, 10:29 p.m. UTC | #1
This patch cannot work.
It picks only one line from a larger commit.
And $STDERR is I think not initialized here.

I have sent a patch picking the whole commit.

Peter

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Polampalli, Archana via
> lists.openembedded.org
> Sent: Thursday, January 16, 2025 7:58
> To: openembedded-core@lists.openembedded.org
> Subject: [oe-core][kirkstone][PATCH 1/1] socat: Fix CVE-2024-54661
> 
> From: Archana Polampalli <archana.polampalli@windriver.com>
> 
> readline.sh in socat through 1.8.0.1 relies on the /tmp/$USER/stderr2 file.
> 
> References:
> https://nvd.nist.gov/vuln/detail/CVE-2024-54661
> https://bugzilla.suse.com/show_bug.cgi?id=1225462#c7
> 
> Upstream-patch:
> http://www.dest-unreach.org/socat/download/socat-1.8.0.2.tar.bz2
> 
> Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
> ---
>  .../socat/files/CVE-2024-54661.patch          | 31 +++++++++++++++++++
>  .../socat/socat_1.7.4.4.bb                    |  4 ++-
>  2 files changed, 34 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-connectivity/socat/files/CVE-2024-
> 54661.patch
> 
> diff --git a/meta/recipes-connectivity/socat/files/CVE-2024-54661.patch
> b/meta/recipes-connectivity/socat/files/CVE-2024-54661.patch
> new file mode 100644
> index 0000000000..aa170bc895
> --- /dev/null
> +++ b/meta/recipes-connectivity/socat/files/CVE-2024-54661.patch
> @@ -0,0 +1,31 @@
> +From da5d4bd0a79a9adb69469fe4e542b6874eec663c Mon Sep 17 00:00:00
> 2001
> +From: Archana Polampalli <archana.polampalli@windriver.com>
> +Date: Thu, 12 Dec 2024 13:00:06 +0000
> +Subject: [PATCH] socat: Fix CVE-2024-54661
> +
> +readline.sh in socat through 1.8.0.1 relies on the /tmp/$USER/stderr2 file.
> +
> +CVE: CVE-2024-54661
> +
> +Upstream-Status: Backport [http://www.dest-
> unreach.org/socat/download/socat-1.8.0.2.tar.bz2]
> +
> +Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
> +
> +%% original patch: CVE-2024-54661.patch
> +---
> + readline.sh | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/readline.sh b/readline.sh
> +index b6f8438..5c59458 100755
> +--- a/readline.sh
> ++++ b/readline.sh
> +@@ -26,5 +26,5 @@ mkdir -p /tmp/$USER || exit 1
> + #
> + #
> +
> +-exec socat -d readline"$HISTOPT",noecho='[Pp]assword:'
> exec:"$PROGRAM",sigint,pty,setsid,ctty,raw,echo=0,stderr 2>/tmp/$USER/stderr2
> ++exec socat -d readline"$HISTOPT",noecho='[Pp]assword:'
> exec:"$PROGRAM",sigint,pty,setsid,ctty,raw,echo=0,stderr 2>$STDERR
> +
> +--
> +2.40.0
> diff --git a/meta/recipes-connectivity/socat/socat_1.7.4.4.bb b/meta/recipes-
> connectivity/socat/socat_1.7.4.4.bb
> index 5a379380d1..86ca5879be 100644
> --- a/meta/recipes-connectivity/socat/socat_1.7.4.4.bb
> +++ b/meta/recipes-connectivity/socat/socat_1.7.4.4.bb
> @@ -9,7 +9,9 @@ LICENSE = "GPL-2.0-with-OpenSSL-exception"
>  LIC_FILES_CHKSUM =
> "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> 
> file://README;beginline=257;endline=287;md5=82520b052f322ac2b5b3dfdc7c7
> eea86"
> 
> -SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2"
> +SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2
> \
> +           file://CVE-2024-54661.patch \
> +          "
> 
>  SRC_URI[sha256sum] =
> "fbd42bd2f0e54a3af6d01bdf15385384ab82dbc0e4f1a5e153b3e0be1b6380ac"
> 
> --
> 2.40.0
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/socat/files/CVE-2024-54661.patch b/meta/recipes-connectivity/socat/files/CVE-2024-54661.patch
new file mode 100644
index 0000000000..aa170bc895
--- /dev/null
+++ b/meta/recipes-connectivity/socat/files/CVE-2024-54661.patch
@@ -0,0 +1,31 @@ 
+From da5d4bd0a79a9adb69469fe4e542b6874eec663c Mon Sep 17 00:00:00 2001
+From: Archana Polampalli <archana.polampalli@windriver.com>
+Date: Thu, 12 Dec 2024 13:00:06 +0000
+Subject: [PATCH] socat: Fix CVE-2024-54661
+
+readline.sh in socat through 1.8.0.1 relies on the /tmp/$USER/stderr2 file.
+
+CVE: CVE-2024-54661
+
+Upstream-Status: Backport [http://www.dest-unreach.org/socat/download/socat-1.8.0.2.tar.bz2]
+
+Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
+
+%% original patch: CVE-2024-54661.patch
+---
+ readline.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/readline.sh b/readline.sh
+index b6f8438..5c59458 100755
+--- a/readline.sh
++++ b/readline.sh
+@@ -26,5 +26,5 @@ mkdir -p /tmp/$USER || exit 1
+ #
+ #
+
+-exec socat -d readline"$HISTOPT",noecho='[Pp]assword:' exec:"$PROGRAM",sigint,pty,setsid,ctty,raw,echo=0,stderr 2>/tmp/$USER/stderr2
++exec socat -d readline"$HISTOPT",noecho='[Pp]assword:' exec:"$PROGRAM",sigint,pty,setsid,ctty,raw,echo=0,stderr 2>$STDERR
+
+--
+2.40.0
diff --git a/meta/recipes-connectivity/socat/socat_1.7.4.4.bb b/meta/recipes-connectivity/socat/socat_1.7.4.4.bb
index 5a379380d1..86ca5879be 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.4.4.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.4.4.bb
@@ -9,7 +9,9 @@  LICENSE = "GPL-2.0-with-OpenSSL-exception"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://README;beginline=257;endline=287;md5=82520b052f322ac2b5b3dfdc7c7eea86"
 
-SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2"
+SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
+           file://CVE-2024-54661.patch \
+          "
 
 SRC_URI[sha256sum] = "fbd42bd2f0e54a3af6d01bdf15385384ab82dbc0e4f1a5e153b3e0be1b6380ac"