Skip to contentSkip to conversation

Patch review

PATCH Superseded Steve Sakoman 2 participants 19 messages Jul 24, 2025 – Jul 25, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please review this set of changes for scarthgap and have comments back by end of day Monday, July 28

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/valkyrie/?#/builders/29/builds/2084

The following changes since commit 24c0ab18045920bb5c1e965c0ea6d176fd6de234:

oe-debuginfod: add option for data storage (2025-07-16 14:09:39 -0700)

are available in the Git repository at:

https://git.openembedded.org/openembedded-core-contrib stable/scarthgap-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/scarthgap-nut

Alexander Kanavin (1):
mtools: upgrade 4.0.43 -> 4.0.44

Archana Polampalli (1):
openssl: CVE-2024-41996

Deepesh Varatharajan (2):
binutils: Fix CVE-2025-7545
glibc: stable 2.39 branch updates

Hitendra Prajapati (1):
libpam: fix CVE-2025-6020

Jinfeng Wang (1):
mtools: upgrade 4.0.48 -> 4.0.49

Peter Marko (2):
orc: set CVE_PRODUCT
openssl: patch CVE-2025-27587

Richard Purdie (1):
mtools: upgrade 4.0.46 -> 4.0.47

Roland Kovacs (2):
libxml2: fix CVE-2025-49795
sqlite3: fix CVE-2025-6965

Vijay Anusuri (1):
xserver-xorg: upgrade 21.1.6 -> 21.1.18

Wang Mingyu (3):
mtools: upgrade 4.0.44 -> 4.0.45
mtools: upgrade 4.0.45 -> 4.0.46
mtools: upgrade 4.0.47 -> 4.0.48

Yash Shinde (1):
binutils: Fix CVE-2025-7546

 .../openssl/openssl/CVE-2024-41996.patch      |   44 +
 .../openssl/openssl/CVE-2025-27587-1.patch    | 1918 +++++++++++++++++
 .../openssl/openssl/CVE-2025-27587-2.patch    |  129 ++
 .../openssl/openssl_3.2.4.bb                  |    3 +
 meta/recipes-core/glibc/glibc-version.inc     |    2 +-
 .../libxml/libxml2/CVE-2025-49795.patch       |   92 +
 meta/recipes-core/libxml/libxml2_2.12.10.bb   |    1 +
 .../binutils/binutils-2.42.inc                |    2 +
 .../binutils/0023-CVE-2025-7545.patch         |   39 +
 .../binutils/0023-CVE-2025-7546.patch         |   58 +
 .../mtools/mtools/clang_UNUSED.patch          |   19 +-
 .../mtools/disable-hardcoded-configs.patch    |    7 +-
 .../mtools/mtools/mtools-makeinfo.patch       |   19 +-
 .../{mtools_4.0.43.bb => mtools_4.0.49.bb}    |    2 +-
 meta/recipes-devtools/orc/orc_0.4.40.bb       |    3 +
 .../libpam/0001-pam-inline-pam-asprintf.patch |  101 +
 .../libpam/0002-pam-namespace-rebase.patch    |  750 +++++++
 .../pam/libpam/CVE-2025-6020-01.patch         | 1128 ++++++++++
 .../pam/libpam/CVE-2025-6020-02.patch         |  187 ++
 .../pam/libpam/CVE-2025-6020-03.patch         |   35 +
 meta/recipes-extended/pam/libpam_1.5.3.bb     |    5 +
 ...org_21.1.16.bb => xserver-xorg_21.1.18.bb} |    2 +-
 .../sqlite/sqlite3/CVE-2025-6965.patch        |  112 +
 meta/recipes-support/sqlite/sqlite3_3.45.3.bb |    1 +
 24 files changed, 4636 insertions(+), 23 deletions(-)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-1.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-2.patch
 create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch
 create mode 100644 meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7545.patch
 create mode 100644 meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7546.patch
 rename meta/recipes-devtools/mtools/{mtools_4.0.43.bb => mtools_4.0.49.bb} (93%)
 create mode 100644 meta/recipes-extended/pam/libpam/0001-pam-inline-pam-asprintf.patch
 create mode 100644 meta/recipes-extended/pam/libpam/0002-pam-namespace-rebase.patch
 create mode 100644 meta/recipes-extended/pam/libpam/CVE-2025-6020-01.patch
 create mode 100644 meta/recipes-extended/pam/libpam/CVE-2025-6020-02.patch
 create mode 100644 meta/recipes-extended/pam/libpam/CVE-2025-6020-03.patch
 rename meta/recipes-graphics/xorg-xserver/{xserver-xorg_21.1.16.bb => xserver-xorg_21.1.18.bb} (92%)
 create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2025-6965.patch
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/16 libxml2: fix CVE-2025-49795

From: Roland Kovacs <[email protected]>

A NULL pointer dereference vulnerability was found in libxml2 when processing XPath XML expressions. This flaw allows an attacker to craft a malicious XML input to libxml2, leading to a denial of service.

---
 .../libxml/libxml2/CVE-2025-49795.patch       | 92 +++++++++++++++++++
 meta/recipes-core/libxml/libxml2_2.12.10.bb   |  1 +
 2 files changed, 93 insertions(+)
 create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch
meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch new file +92 -0
new file mode 100644
index 0000000000..2e21a99b45
@@ -0,0 +1,92 @@
+From 19e0a3ed092085a4d6689397d4f08cf5d86267af Mon Sep 17 00:00:00 2001
+From: Michael Mann <[email protected]>
+Date: Sat, 21 Jun 2025 12:11:30 -0400
+Subject: [PATCH] Schematron: Fix null pointer dereference leading to DoS
+
+(CVE-2025-49795)
+
+Fixes #932
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/c24909ba2601848825b49a60f988222da3019667]
+CVE: CVE-2025-49795
+
+(cherry picked from commit c24909ba2601848825b49a60f988222da3019667)
+Signed-off-by: Roland Kovacs <[email protected]>
+---
+ result/schematron/zvon16_0     | 6 ++++++
+ result/schematron/zvon16_0.err | 5 +++++
+ schematron.c                   | 5 +++++
+ test/schematron/zvon16.sct     | 7 +++++++
+ test/schematron/zvon16_0.xml   | 5 +++++
+ 5 files changed, 28 insertions(+)
+ create mode 100644 result/schematron/zvon16_0
+ create mode 100644 result/schematron/zvon16_0.err
+ create mode 100644 test/schematron/zvon16.sct
+ create mode 100644 test/schematron/zvon16_0.xml
+
+diff --git a/result/schematron/zvon16_0 b/result/schematron/zvon16_0
+new file mode 100644
+index 00000000..768cf6f5
+--- /dev/null
++++ b/result/schematron/zvon16_0
+@@ -0,0 +1,6 @@
++<?xml version="1.0"?>
++<library>
++	<book title="Test Book" id="bk101">
++		<author>Test Author</author>
++	</book>
++</library>
+diff --git a/result/schematron/zvon16_0.err b/result/schematron/zvon16_0.err
+new file mode 100644
+index 00000000..a4fab4c8
+--- /dev/null
++++ b/result/schematron/zvon16_0.err
+@@ -0,0 +1,5 @@
++Pattern: TestPattern
++xmlXPathCompOpEval: function falae not found
++XPath error : Unregistered function
++/library/book line 2: Book 
++./test/schematron/zvon16_0.xml fails to validate
+diff --git a/schematron.c b/schematron.c
+index a8259201..86c63e64 100644
+--- a/schematron.c
++++ b/schematron.c
+@@ -1481,6 +1481,11 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
+             select = xmlGetNoNsProp(child, BAD_CAST "select");
+             comp = xmlXPathCtxtCompile(ctxt->xctxt, select);
+             eval = xmlXPathCompiledEval(comp, ctxt->xctxt);
++            if (eval == NULL) {
++                xmlXPathFreeCompExpr(comp);
++                xmlFree(select);
++                return ret;
++            }
+ 
+             switch (eval->type) {
+             case XPATH_NODESET: {
+diff --git a/test/schematron/zvon16.sct b/test/schematron/zvon16.sct
+new file mode 100644
+index 00000000..f03848aa
+--- /dev/null
++++ b/test/schematron/zvon16.sct
+@@ -0,0 +1,7 @@
++<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
++	<sch:pattern id="TestPattern">
++		<sch:rule context="book">
++			<sch:report test="not(@available)">Book <sch:value-of select="falae()"/> test</sch:report>
++		</sch:rule>
++	</sch:pattern>
++</sch:schema>
+diff --git a/test/schematron/zvon16_0.xml b/test/schematron/zvon16_0.xml
+new file mode 100644
+index 00000000..551e2d65
+--- /dev/null
++++ b/test/schematron/zvon16_0.xml
+@@ -0,0 +1,5 @@
++<library>
++	<book title="Test Book" id="bk101">
++		<author>Test Author</author>
++	</book>
++</library>
+-- 
+2.34.1
+
meta/recipes-core/libxml/libxml2_2.12.10.bb +1 -0
index 488ace62e5..c289de6f73 100644
@@ -22,6 +22,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt
            file://CVE-2025-32415.patch \
            file://CVE-2025-6021.patch \
            file://CVE-2025-49794-CVE-2025-49796.patch \
+           file://CVE-2025-49795.patch \
            "
 
 SRC_URI[archive.sha256sum] = "c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995"
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/16 binutils: Fix CVE-2025-7546

In reply to Steve Sakoman

From: Yash Shinde <[email protected]>

Report corrupted group section instead of trying to recover.

CVE: CVE-2025-7546
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41461010eb7c79fee7a9d5f6209accdaac66cc6b]
PR 33050 [https://sourceware.org/bugzilla/show_bug.cgi?id=33050]

---
 .../binutils/binutils-2.42.inc                |  1 +
 .../binutils/0023-CVE-2025-7546.patch         | 58 +++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7546.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +1 -0
index 9471e6accd..a3ad655dbe 100644
@@ -53,5 +53,6 @@ SRC_URI = "\
      file://CVE-2025-1179.patch \
      file://0022-CVE-2025-5245.patch \
      file://0022-CVE-2025-5244.patch \
+     file://0023-CVE-2025-7546.patch \
 "
 S  = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7546.patch new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/16 binutils: Fix CVE-2025-7545

In reply to Steve Sakoman

From: Deepesh Varatharajan <[email protected]>

objcopy: Don't extend the output section size
Since the output section contents are copied from the input, don't extend the output section size beyond the input section size.

Backport a patch from upstream to fix CVE-2025-7545
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944]

---
 .../binutils/binutils-2.42.inc                |  4 ++
 .../binutils/0023-CVE-2025-7545.patch         | 39 +++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7545.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +4 -0
index a3ad655dbe..9aa3096b4f 100644
@@ -53,6 +53,10 @@ SRC_URI = "\
      file://CVE-2025-1179.patch \
      file://0022-CVE-2025-5245.patch \
      file://0022-CVE-2025-5244.patch \
+<<<<<<< HEAD
      file://0023-CVE-2025-7546.patch \
+=======
+     file://0023-CVE-2025-7545.patch \
+>>>>>>> binutils: Fix CVE-2025-7545
 "
 S  = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0023-CVE-2025-7545.patch new file +39 -0
new file mode 100644
index 0000000000..de132f74fc
@@ -0,0 +1,39 @@
+From: "H.J. Lu" <[email protected]>
+Date: Sat, 21 Jun 2025 06:36:56 +0800
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944]
+CVE: CVE-2025-7545
+
+Since the output section contents are copied from the input, don't
+extend the output section size beyond the input section size.
+
+	PR binutils/33049
+	* objcopy.c (copy_section): Don't extend the output section
+	size beyond the input section size.
+
+Signed-off-by: Deepesh Varatharajan <[email protected]>
+
+diff --git a/binutils/objcopy.c b/binutils/objcopy.c
+index a85d2620..18cd1bfd 100644
+--- a/binutils/objcopy.c
++++ b/binutils/objcopy.c
+@@ -4547,6 +4547,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
+ 	  char *to = (char *) memhunk;
+ 	  char *end = (char *) memhunk + size;
+ 	  int i;
++	  bfd_size_type memhunk_size = size;
+ 
+ 	  /* If the section address is not exactly divisible by the interleave,
+ 	     then we must bias the from address.  If the copy_byte is less than
+@@ -4566,6 +4567,11 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
+ 	      }
+ 
+ 	  size = (size + interleave - 1 - copy_byte) / interleave * copy_width;
++
++         /* Don't extend the output section size.  */
++         if (size > memhunk_size)
++           size = memhunk_size;
++	  
+ 	  osection->lma /= interleave;
+ 	  if (copy_byte < extra)
+ 	    osection->lma++;
Signature · 1 line
2.43.0
#6 lore raw

PATCH 4/16 sqlite3: fix CVE-2025-6965

In reply to Steve Sakoman

From: Roland Kovacs <[email protected]>

There exists a vulnerability in SQLite versions before 3.50.2 where the number of aggregate terms could exceed the number of columns available. This could lead to a memory corruption issue.

---
 .../binutils/binutils-2.42.inc                |   3 -
 .../sqlite/sqlite3/CVE-2025-6965.patch        | 112 ++++++++++++++++++
 meta/recipes-support/sqlite/sqlite3_3.45.3.bb |   1 +
 3 files changed, 113 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2025-6965.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +0 -3
index 9aa3096b4f..fb34ea9763 100644
@@ -53,10 +53,7 @@ SRC_URI = "\
      file://CVE-2025-1179.patch \
      file://0022-CVE-2025-5245.patch \
      file://0022-CVE-2025-5244.patch \
-<<<<<<< HEAD
      file://0023-CVE-2025-7546.patch \
-=======
      file://0023-CVE-2025-7545.patch \
->>>>>>> binutils: Fix CVE-2025-7545
 "
 S  = "${WORKDIR}/git"
meta/recipes-support/sqlite/sqlite3/CVE-2025-6965.patch new file +112 -0

112 lines not on this page · raw message

meta/recipes-support/sqlite/sqlite3_3.45.3.bb +1 -0
index d39cb3805b..60a8f1449b 100644
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed0
 SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \
            file://CVE-2025-3277.patch \
            file://CVE-2025-29088.patch \
+           file://CVE-2025-6965.patch \
           "
 SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"
 
Signature · 1 line
2.43.0
#7 lore raw

PATCH 5/16 orc: set CVE_PRODUCT

In reply to Steve Sakoman

From: Peter Marko <[email protected]>

There are new CVEs reported for this recipe which are not for this componene, but for a component with same name from apache.

sqlite> select vendor, product, id, count(*) from products where product like 'orc' group by vendor, product, id;

apache|orc|CVE-2018-8015|1
apache|orc|CVE-2025-47436|4

gstreamer|orc|CVE-2024-40897|1

---
 meta/recipes-devtools/orc/orc_0.4.40.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/orc/orc_0.4.40.bb +3 -0
index e437831cd7..ee96ca0a4c 100644
@@ -9,6 +9,9 @@ SRC_URI[sha256sum] = "3fc2bee78dfb7c41fd9605061fc69138db7df007eae2f669a1f56e8bac
 
 inherit meson pkgconfig gtk-doc
 
+# distinguish from apache:orc
+CVE_PRODUCT = "gstreamer:orc"
+
 GTKDOC_MESON_OPTION = "gtk_doc"
 GTKDOC_MESON_ENABLE_FLAG = "enabled"
 GTKDOC_MESON_DISABLE_FLAG = "disabled"
Signature · 1 line
2.43.0
#8 lore raw

PATCH 6/16 openssl: CVE-2024-41996

In reply to Steve Sakoman

From: Archana Polampalli <[email protected]>

From: Peter Marko <[email protected]>

As discussed in [1], this commit fixes CVE-2024-41996. Although openssl project does not consider this a vulnerability, it got CVE number assigned so it deserves attention.

[1] https://github.com/openssl/openssl/pull/25088

---
 .../openssl/openssl/CVE-2024-41996.patch      | 44 +++++++++++++++++++
 .../openssl/openssl_3.2.4.bb                  |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch
meta/recipes-connectivity/openssl/openssl/CVE-2024-41996.patch new file +44 -0
new file mode 100644
index 0000000000..dc18e0bef1
@@ -0,0 +1,44 @@
+From e70e34d857d4003199bcb5d3b52ca8102ccc1b98 Mon Sep 17 00:00:00 2001
+From: Tomas Mraz <[email protected]>
+Date: Mon, 5 Aug 2024 17:54:14 +0200
+Subject: [PATCH] dh_kmgmt.c: Avoid expensive public key validation for known
+ safe-prime groups
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The partial validation is fully sufficient to check the key validity.
+
+Thanks to Szilárd Pfeiffer for reporting the issue.
+
+Reviewed-by: Neil Horman <[email protected]>
+Reviewed-by: Matt Caswell <[email protected]>
+Reviewed-by: Paul Dale <[email protected]>
+(Merged from https://github.com/openssl/openssl/pull/25088)
+
+CVE: CVE-2024-41996
+Upstream-Status: Backport [https://github.com/openssl/openssl/commit/e70e34d857d4003199bcb5d3b52ca8102ccc1b98]
+Signed-off-by: Peter Marko <[email protected]>
+---
+ providers/implementations/keymgmt/dh_kmgmt.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c
+index 82c3093b12..ebdce76710 100644
+--- a/providers/implementations/keymgmt/dh_kmgmt.c
++++ b/providers/implementations/keymgmt/dh_kmgmt.c
+@@ -387,9 +387,11 @@ static int dh_validate_public(const DH *dh, int checktype)
+     if (pub_key == NULL)
+         return 0;
+ 
+-    /* The partial test is only valid for named group's with q = (p - 1) / 2 */
+-    if (checktype == OSSL_KEYMGMT_VALIDATE_QUICK_CHECK
+-        && ossl_dh_is_named_safe_prime_group(dh))
++    /*
++     * The partial test is only valid for named group's with q = (p - 1) / 2
++     * but for that case it is also fully sufficient to check the key validity.
++     */
++    if (ossl_dh_is_named_safe_prime_group(dh))
+         return ossl_dh_check_pub_key_partial(dh, pub_key, &res);
+ 
+     return DH_check_pub_key_ex(dh, pub_key);
meta/recipes-connectivity/openssl/openssl_3.2.4.bb +1 -0
index c4ad80e734..d6bf32d989 100644
@@ -12,6 +12,7 @@ SRC_URI = "https://github.com/openssl/openssl/releases/download/openssl-${PV}/op
            file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
            file://0001-Configure-do-not-tweak-mips-cflags.patch \
            file://0001-Added-handshake-history-reporting-when-test-fails.patch \
+           file://CVE-2024-41996.patch \
            "
 
 SRC_URI:append:class-nativesdk = " \
Signature · 1 line
2.43.0
#9 lore raw

PATCH 7/16 openssl: patch CVE-2025-27587

In reply to Steve Sakoman

From: Peter Marko <[email protected]>

Pick commits for Minerva fix between 3.2.4 and 3.2.5 release.

Update to 3.2.5 is blocked due to problem with python ptest errors, so use patch instead of upgrade for now.

---
 .../openssl/openssl/CVE-2025-27587-1.patch    | 1918 +++++++++++++++++
 .../openssl/openssl/CVE-2025-27587-2.patch    |  129 ++
 .../openssl/openssl_3.2.4.bb                  |    2 +
 3 files changed, 2049 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-1.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-2.patch
meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-1.patch new file +1918 -0
new file mode 100644
index 0000000000..eb3fc52dca
@@ -0,0 +1,1918 @@
+From 14ac0f0e4e1f36793d09b41ffd5e482575289ab2 Mon Sep 17 00:00:00 2001
+From: Danny Tsen <[email protected]>
+Date: Tue, 11 Feb 2025 13:48:01 -0500
+Subject: [PATCH] Fix Minerva timing side-channel signal for P-384 curve on PPC
+
+1. bn_ppc.c: Used bn_mul_mont_int() instead of bn_mul_mont_300_fixed_n6()
+   for Montgomery multiplication.
+2. ecp_nistp384-ppc64.pl:
+   - Re-wrote p384_felem_mul and p384_felem_square for easier maintenance with
+     minumum perl wrapper.
+   - Implemented p384_felem_reduce, p384_felem_mul_reduce and p384_felem_square_reduce.
+   - Implemented p384_felem_diff64, felem_diff_128_64 and felem_diff128 in assembly.
+3. ecp_nistp384.c:
+   - Added wrapper function for p384_felem_mul_reduce and p384_felem_square_reduce.
+
+Signed-off-by: Danny Tsen <[email protected]>
+
+Reviewed-by: Dmitry Belyavskiy <[email protected]>
+Reviewed-by: Tomas Mraz <[email protected]>
+(Merged from https://github.com/openssl/openssl/pull/26709)
+
+(cherry picked from commit 85cabd94958303859b1551364a609d4ff40b67a5)
+
+CVE: CVE-2025-27587
+Upstream-Status: Backport [https://github.com/openssl/openssl/commit/14ac0f0e4e1f36793d09b41ffd5e482575289ab2]
+Signed-off-by: Peter Marko <[email protected]>
+---
+ crypto/bn/bn_ppc.c                  |    3 +
+ crypto/ec/asm/ecp_nistp384-ppc64.pl | 1724 +++++++++++++++++++++++----
+ crypto/ec/ecp_nistp384.c            |   28 +-
+ 3 files changed, 1504 insertions(+), 251 deletions(-)
+
+diff --git a/crypto/bn/bn_ppc.c b/crypto/bn/bn_ppc.c
+index 1e9421bee2..29293bad55 100644
+--- a/crypto/bn/bn_ppc.c
++++ b/crypto/bn/bn_ppc.c
+@@ -41,12 +41,15 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
+      */
+ 
+ #if defined(_ARCH_PPC64) && !defined(__ILP32__)
++    /* Minerva side-channel fix danny */
++# if defined(USE_FIXED_N6)
+     if (num == 6) {
+         if (OPENSSL_ppccap_P & PPC_MADD300)
+             return bn_mul_mont_300_fixed_n6(rp, ap, bp, np, n0, num);
+         else
+             return bn_mul_mont_fixed_n6(rp, ap, bp, np, n0, num);
+     }
++# endif
+ #endif
+ 
+     return bn_mul_mont_int(rp, ap, bp, np, n0, num);
+diff --git a/crypto/ec/asm/ecp_nistp384-ppc64.pl b/crypto/ec/asm/ecp_nistp384-ppc64.pl
+index 28f4168e52..b663bddfc6 100755
+--- a/crypto/ec/asm/ecp_nistp384-ppc64.pl
++++ b/crypto/ec/asm/ecp_nistp384-ppc64.pl
+@@ -7,13 +7,15 @@
+ # https://www.openssl.org/source/license.html
+ #
+ # ====================================================================
+-# Written by Rohan McLure <[email protected]> for the OpenSSL
+-# project.
++# Written by Danny Tsen <[email protected]> # for the OpenSSL project.
++#
++# Copyright 2025- IBM Corp.
+ # ====================================================================
+ #
+-# p384 lower-level primitives for PPC64 using vector instructions.
++# p384 lower-level primitives for PPC64.
+ #
+ 
++
+ use strict;
+ use warnings;
+ 
+@@ -21,7 +23,7 @@ my $flavour = shift;
+ my $output = "";
+ while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
+ if (!$output) {
+-    $output = "-";
++        $output = "-";
+ }
+ 
+ my ($xlate, $dir);
+@@ -35,271 +37,1495 @@ open OUT,"| \"$^X\" $xlate $flavour $output";
+ 
+ my $code = "";
+ 
+-my ($sp, $outp, $savelr, $savesp) = ("r1", "r3", "r10", "r12");
+-
+-my $vzero = "v32";
+-
+-sub startproc($)
+-{
+-    my ($name) = @_;
+-
+-    $code.=<<___;
+-    .globl ${name}
+-    .align 5
+-${name}:
+-
+-___
+-}
+-
+-sub endproc($)
+-{
+-    my ($name) = @_;
+-
+-    $code.=<<___;
+-    blr
+-        .size ${name},.-${name}
+-
+-___
+-}
+-
+-sub load_vrs($$)
+-{
+-    my ($pointer, $reg_list) = @_;
+-
+-    for (my $i = 0; $i <= 6; $i++) {
+-        my $offset = $i * 8;
+-        $code.=<<___;
+-    lxsd        $reg_list->[$i],$offset($pointer)
+-___
+-    }
+-
+-    $code.=<<___;
+-
+-___
+-}
+-
+-sub store_vrs($$)
+-{
+-    my ($pointer, $reg_list) = @_;
+-
+-    for (my $i = 0; $i <= 12; $i++) {
+-        my $offset = $i * 16;
+-        $code.=<<___;
+-    stxv        $reg_list->[$i],$offset($pointer)
+-___
+-    }
+-
+-    $code.=<<___;
+-
+-___
+-}
+-
+ $code.=<<___;
+-.machine    "any"
++.machine "any"
+ .text
+ 
+-___
++.globl  p384_felem_mul
++.type   p384_felem_mul,\@function
++.align	4
++p384_felem_mul:
+ 
+-{
+-    # mul/square common
+-    my ($t1, $t2, $t3, $t4) = ("v33", "v34", "v42", "v43");
+-    my ($zero, $one) = ("r8", "r9");
+-    my $out = "v51";
++	stdu	1, -176(1)
++	mflr	0
++	std	14, 56(1)
++	std	15, 64(1)
++	std	16, 72(1)
++	std	17, 80(1)
++	std	18, 88(1)
++	std	19, 96(1)
++	std	20, 104(1)
++	std	21, 112(1)
++	std	22, 120(1)
+ 
+-    {
+-        #
+-        # p384_felem_mul
+-        #
++	bl	_p384_felem_mul_core
+ 
+-        my ($in1p, $in2p) = ("r4", "r5");
+-        my @in1 = map("v$_",(44..50));
+-        my @in2 = map("v$_",(35..41));
++	mtlr	0
++	ld	14, 56(1)
++	ld	15, 64(1)
++	ld	16, 72(1)
++	ld	17, 80(1)
++	ld	18, 88(1)
++	ld	19, 96(1)
++	ld	20, 104(1)
++	ld	21, 112(1)
++	ld	22, 120(1)
++	addi	1, 1, 176
++	blr
++.size   p384_felem_mul,.-p384_felem_mul
+ 
+-        startproc("p384_felem_mul");
++.globl  p384_felem_square
++.type   p384_felem_square,\@function
++.align	4
++p384_felem_square:
+ 
+-        $code.=<<___;
+-    vspltisw    $vzero,0
++	stdu	1, -176(1)
++	mflr	0
++	std	14, 56(1)
++	std	15, 64(1)
++	std	16, 72(1)
++	std	17, 80(1)
+ 
+-___
++	bl	_p384_felem_square_core
+ 
+-        load_vrs($in1p, \@in1);
+-        load_vrs($in2p, \@in2);
+-
+-        $code.=<<___;
+-    vmsumudm    $out,$in1[0],$in2[0],$vzero
+-    stxv        $out,0($outp)
+-
+-    xxpermdi    $t1,$in1[0],$in1[1],0b00
+-    xxpermdi    $t2,$in2[1],$in2[0],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    stxv        $out,16($outp)
+-
+-    xxpermdi    $t2,$in2[2],$in2[1],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$in1[2],$in2[0],$out
+-    stxv        $out,32($outp)
+-
+-    xxpermdi    $t2,$in2[1],$in2[0],0b00
+-    xxpermdi    $t3,$in1[2],$in1[3],0b00
+-    xxpermdi    $t4,$in2[3],$in2[2],0b00
+-    vmsumudm    $out,$t1,$t4,$vzero
+-    vmsumudm    $out,$t3,$t2,$out
+-    stxv        $out,48($outp)
+-
+-    xxpermdi    $t2,$in2[4],$in2[3],0b00
+-    xxpermdi    $t4,$in2[2],$in2[1],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$t3,$t4,$out
+-    vmsumudm    $out,$in1[4],$in2[0],$out
+-    stxv        $out,64($outp)
+-
+-    xxpermdi    $t2,$in2[5],$in2[4],0b00
+-    xxpermdi    $t4,$in2[3],$in2[2],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$t3,$t4,$out
+-    xxpermdi    $t4,$in2[1],$in2[0],0b00
+-    xxpermdi    $t1,$in1[4],$in1[5],0b00
+-    vmsumudm    $out,$t1,$t4,$out
+-    stxv        $out,80($outp)
+-
+-    xxpermdi    $t1,$in1[0],$in1[1],0b00
+-    xxpermdi    $t2,$in2[6],$in2[5],0b00
+-    xxpermdi    $t4,$in2[4],$in2[3],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$t3,$t4,$out
+-    xxpermdi    $t2,$in2[2],$in2[1],0b00
+-    xxpermdi    $t1,$in1[4],$in1[5],0b00
+-    vmsumudm    $out,$t1,$t2,$out
+-    vmsumudm    $out,$in1[6],$in2[0],$out
+-    stxv        $out,96($outp)
+-
+-    xxpermdi    $t1,$in1[1],$in1[2],0b00
+-    xxpermdi    $t2,$in2[6],$in2[5],0b00
+-    xxpermdi    $t3,$in1[3],$in1[4],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$t3,$t4,$out
+-    xxpermdi    $t3,$in2[2],$in2[1],0b00
+-    xxpermdi    $t1,$in1[5],$in1[6],0b00
+-    vmsumudm    $out,$t1,$t3,$out
+-    stxv        $out,112($outp)
+-
+-    xxpermdi    $t1,$in1[2],$in1[3],0b00
+-    xxpermdi    $t3,$in1[4],$in1[5],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$t3,$t4,$out
+-    vmsumudm    $out,$in1[6],$in2[2],$out
+-    stxv        $out,128($outp)
+-
+-    xxpermdi    $t1,$in1[3],$in1[4],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    xxpermdi    $t1,$in1[5],$in1[6],0b00
+-    vmsumudm    $out,$t1,$t4,$out
+-    stxv        $out,144($outp)
+-
+-    vmsumudm    $out,$t3,$t2,$vzero
+-    vmsumudm    $out,$in1[6],$in2[4],$out
+-    stxv        $out,160($outp)
+-
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    stxv        $out,176($outp)
+-
+-    vmsumudm    $out,$in1[6],$in2[6],$vzero
+-    stxv        $out,192($outp)
+-___
++	mtlr	0
++	ld	14, 56(1)
++	ld	15, 64(1)
++	ld	16, 72(1)
++	ld	17, 80(1)
++	addi	1, 1, 176
++	blr
++.size   p384_felem_square,.-p384_felem_square
+ 
+-        endproc("p384_felem_mul");
+-    }
++#
++# Felem mul core function -
++# r3, r4 and r5 need to pre-loaded.
++#
++.type   _p384_felem_mul_core,\@function
++.align	4
++_p384_felem_mul_core:
+ 
+-    {
+-        #
+-        # p384_felem_square
+-        #
++	ld	6,0(4)
++	ld	14,0(5)
++	ld	7,8(4)
++	ld	15,8(5)
++	ld	8,16(4)
++	ld	16,16(5)
++	ld	9,24(4)
++	ld	17,24(5)
++	ld	10,32(4)
++	ld	18,32(5)
++	ld	11,40(4)
++	ld	19,40(5)
++	ld	12,48(4)
++	ld	20,48(5)
+ 
+-        my ($inp) = ("r4");
+-        my @in = map("v$_",(44..50));
+-        my @inx2 = map("v$_",(35..41));
++	# out0
++	mulld	21, 14, 6
++	mulhdu	22, 14, 6
++	std	21, 0(3)
++	std	22, 8(3)
+ 
+-        startproc("p384_felem_square");
++	vxor	0, 0, 0
+ 
+-        $code.=<<___;
+-    vspltisw    $vzero,0
++	# out1
++	mtvsrdd	32+13, 14, 6
++	mtvsrdd	32+14, 7, 15
++	vmsumudm 1, 13, 14, 0
+ 
+-___
++	# out2
++	mtvsrdd	32+15, 15, 6
++	mtvsrdd	32+16, 7, 16
++	mtvsrdd	32+17, 0, 8
++	mtvsrdd	32+18, 0, 14
++	vmsumudm 19, 15, 16, 0
++	vmsumudm 2, 17, 18, 19
+ 
+-        load_vrs($inp, \@in);
++	# out3
++	mtvsrdd	32+13, 16, 6
++	mtvsrdd	32+14, 7, 17
++	mtvsrdd	32+15, 14, 8
++	mtvsrdd	32+16, 9, 15
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 3, 15, 16, 19
+ 
+-        $code.=<<___;
+-    li        $zero,0
+-    li        $one,1
+-    mtvsrdd        $t1,$one,$zero
+-___
++	# out4
++	mtvsrdd	32+13, 17, 6
++	mtvsrdd	32+14, 7, 18
++	mtvsrdd	32+15, 15, 8
++	mtvsrdd	32+16, 9, 16
++	mtvsrdd	32+17, 0, 10
++	mtvsrdd	32+18, 0, 14
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 4, 15, 16, 19
++	vmsumudm 4, 17, 18, 4
+ 
+-        for (my $i = 0; $i <= 6; $i++) {
+-            $code.=<<___;
+-    vsld        $inx2[$i],$in[$i],$t1
+-___
+-        }
+-
+-        $code.=<<___;
+-    vmsumudm    $out,$in[0],$in[0],$vzero
+-    stxv        $out,0($outp)
+-
+-    vmsumudm    $out,$in[0],$inx2[1],$vzero
+-    stxv        $out,16($outp)
+-
+-    vmsumudm    $out,$in[0],$inx2[2],$vzero
+-    vmsumudm    $out,$in[1],$in[1],$out
+-    stxv        $out,32($outp)
+-
+-    xxpermdi    $t1,$in[0],$in[1],0b00
+-    xxpermdi    $t2,$inx2[3],$inx2[2],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    stxv        $out,48($outp)
+-
+-    xxpermdi    $t4,$inx2[4],$inx2[3],0b00
+-    vmsumudm    $out,$t1,$t4,$vzero
+-    vmsumudm    $out,$in[2],$in[2],$out
+-    stxv        $out,64($outp)
+-
+-    xxpermdi    $t2,$inx2[5],$inx2[4],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$in[2],$inx2[3],$out
+-    stxv        $out,80($outp)
+-
+-    xxpermdi    $t2,$inx2[6],$inx2[5],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$in[2],$inx2[4],$out
+-    vmsumudm    $out,$in[3],$in[3],$out
+-    stxv        $out,96($outp)
+-
+-    xxpermdi    $t3,$in[1],$in[2],0b00
+-    vmsumudm    $out,$t3,$t2,$vzero
+-    vmsumudm    $out,$in[3],$inx2[4],$out
+-    stxv        $out,112($outp)
+-
+-    xxpermdi    $t1,$in[2],$in[3],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    vmsumudm    $out,$in[4],$in[4],$out
+-    stxv        $out,128($outp)
+-
+-    xxpermdi    $t1,$in[3],$in[4],0b00
+-    vmsumudm    $out,$t1,$t2,$vzero
+-    stxv        $out,144($outp)
+-
+-    vmsumudm    $out,$in[4],$inx2[6],$vzero
+-    vmsumudm    $out,$in[5],$in[5],$out
+-    stxv        $out,160($outp)
+-
+-    vmsumudm    $out,$in[5],$inx2[6],$vzero
+-    stxv        $out,176($outp)
+-
+-    vmsumudm    $out,$in[6],$in[6],$vzero
+-    stxv        $out,192($outp)
+-___
++	# out5
++	mtvsrdd	32+13, 18, 6
++	mtvsrdd	32+14, 7, 19
++	mtvsrdd	32+15, 16, 8
++	mtvsrdd	32+16, 9, 17
++	mtvsrdd	32+17, 14, 10
++	mtvsrdd	32+18, 11, 15
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 5, 15, 16, 19
++	vmsumudm 5, 17, 18, 5
++
++	stxv	32+1, 16(3)
++	stxv	32+2, 32(3)
++	stxv	32+3, 48(3)
++	stxv	32+4, 64(3)
++	stxv	32+5, 80(3)
++
++	# out6
++	mtvsrdd	32+13, 19, 6
++	mtvsrdd	32+14, 7, 20
++	mtvsrdd	32+15, 17, 8
++	mtvsrdd	32+16, 9, 18
++	mtvsrdd	32+17, 15, 10
++	mtvsrdd	32+18, 11, 16
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 6, 15, 16, 19
++	mtvsrdd	32+13, 0, 12
++	mtvsrdd	32+14, 0, 14
++	vmsumudm 19, 17, 18, 6
++	vmsumudm 6, 13, 14, 19
++
++	# out7
++	mtvsrdd	32+13, 19, 7
++	mtvsrdd	32+14, 8, 20
++	mtvsrdd	32+15, 17, 9
++	mtvsrdd	32+16, 10, 18
++	mtvsrdd	32+17, 15, 11
++	mtvsrdd	32+18, 12, 16
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 7, 15, 16, 19
++	vmsumudm 7, 17, 18, 7
++
++	# out8
++	mtvsrdd	32+13, 19, 8
++	mtvsrdd	32+14, 9, 20
++	mtvsrdd	32+15, 17, 10
++	mtvsrdd	32+16, 11, 18
++	mtvsrdd	32+17, 0, 12
++	mtvsrdd	32+18, 0, 16
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 8, 15, 16, 19
++	vmsumudm 8, 17, 18, 8
++
++	# out9
++	mtvsrdd	32+13, 19, 9
++	mtvsrdd	32+14, 10, 20
++	mtvsrdd	32+15, 17, 11
++	mtvsrdd	32+16, 12, 18
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 9, 15, 16, 19
++
++	# out10
++	mtvsrdd	32+13, 19, 10
++	mtvsrdd	32+14, 11, 20
++	mtvsrdd	32+15, 0, 12
++	mtvsrdd	32+16, 0, 18
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 10, 15, 16, 19
++
++	# out11
++	mtvsrdd	32+17, 19, 11
++	mtvsrdd	32+18, 12, 20
++	vmsumudm 11, 17, 18, 0
++
++	stxv	32+6, 96(3)
++	stxv	32+7, 112(3)
++	stxv	32+8, 128(3)
++	stxv	32+9, 144(3)
++	stxv	32+10, 160(3)
++	stxv	32+11, 176(3)
++
++	# out12
++	mulld	21, 20, 12
++	mulhdu	22, 20, 12	# out12
++
++	std	21, 192(3)
++	std	22, 200(3)
++
++	blr
++.size   _p384_felem_mul_core,.-_p384_felem_mul_core
++
++#
++# Felem square core function -
++# r3 and r4 need to pre-loaded.
++#
++.type   _p384_felem_square_core,\@function
++.align	4
++_p384_felem_square_core:
++
++	ld	6, 0(4)
++	ld	7, 8(4)
++	ld	8, 16(4)
++	ld	9, 24(4)
++	ld	10, 32(4)
++	ld	11, 40(4)
++	ld	12, 48(4)
++
++	vxor	0, 0, 0
++
++	# out0
++	mulld	14, 6, 6
++	mulhdu	15, 6, 6
++	std	14, 0(3)
++	std	15, 8(3)
++
++	# out1
++	add	14, 6, 6
++	mtvsrdd	32+13, 0, 14
++	mtvsrdd	32+14, 0, 7
++	vmsumudm 1, 13, 14, 0
++
++	# out2
++	mtvsrdd	32+15, 7, 14
++	mtvsrdd	32+16, 7, 8
++	vmsumudm 2, 15, 16, 0
++
++	# out3
++	add	15, 7, 7
++	mtvsrdd	32+13, 8, 14
++	mtvsrdd	32+14, 15, 9
++	vmsumudm 3, 13, 14, 0
++
++	# out4
++	mtvsrdd	32+13, 9, 14
++	mtvsrdd	32+14, 15, 10
++	mtvsrdd	32+15, 0, 8
++	vmsumudm 4, 13, 14, 0
++	vmsumudm 4, 15, 15, 4
++
++	# out5
++	mtvsrdd	32+13, 10, 14
++	mtvsrdd	32+14, 15, 11
++	add	16, 8, 8
++	mtvsrdd	32+15, 0, 16
++	mtvsrdd	32+16, 0, 9
++	vmsumudm 5, 13, 14, 0
++	vmsumudm 5, 15, 16, 5
++
++	stxv	32+1, 16(3)
++	stxv	32+2, 32(3)
++	stxv	32+3, 48(3)
++	stxv	32+4, 64(3)
++
++	# out6
++	mtvsrdd	32+13, 11, 14
++	mtvsrdd	32+14, 15, 12
++	mtvsrdd	32+15, 9, 16
++	mtvsrdd	32+16, 9, 10
++	stxv	32+5, 80(3)
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 6, 15, 16, 19
++
++	# out7
++	add	17, 9, 9
++	mtvsrdd	32+13, 11, 15
++	mtvsrdd	32+14, 16, 12
++	mtvsrdd	32+15, 0, 17
++	mtvsrdd	32+16, 0, 10
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 7, 15, 16, 19
++
++	# out8
++	mtvsrdd	32+13, 11, 16
++	mtvsrdd	32+14, 17, 12
++	mtvsrdd	32+15, 0, 10
++	vmsumudm 19, 13, 14, 0
++	vmsumudm 8, 15, 15, 19
++
++	# out9
++	add	14, 10, 10
++	mtvsrdd	32+13, 11, 17
++	mtvsrdd	32+14, 14, 12
++	vmsumudm 9, 13, 14, 0
++
++	# out10
++	mtvsrdd	32+13, 11, 14
++	mtvsrdd	32+14, 11, 12
++	vmsumudm 10, 13, 14, 0
++
++	stxv	32+6, 96(3)
++	stxv	32+7, 112(3)
++
++	# out11
++	#add	14, 11, 11
++	#mtvsrdd	32+13, 0, 14
++	#mtvsrdd	32+14, 0, 12
++	#vmsumudm 11, 13, 14, 0
++
++	mulld	6, 12, 11
++	mulhdu	7, 12, 11
++	addc	8, 6, 6
++	adde	9, 7, 7
++
++	stxv	32+8, 128(3)
++	stxv	32+9, 144(3)
++	stxv	32+10, 160(3)
++	#stxv	32+11, 176(3)
++
++	# out12
++	mulld	14, 12, 12
++	mulhdu	15, 12, 12
++
++	std	8, 176(3)
++	std	9, 184(3)
++	std	14, 192(3)
++	std	15, 200(3)
++
++	blr
++.size   _p384_felem_square_core,.-_p384_felem_square_core
++
++#
++# widefelem (128 bits) * 8
++#
++.macro F128_X_8 _off1 _off2
++	ld	9,\\_off1(3)
++	ld	8,\\_off2(3)
++	srdi	10,9,61
++	rldimi	10,8,3,0
++	sldi	9,9,3
++	std	9,\\_off1(3)
++	std	10,\\_off2(3)
++.endm
++
++.globl p384_felem128_mul_by_8
++.type	p384_felem128_mul_by_8, \@function
++.align 4
++p384_felem128_mul_by_8:
++
++	F128_X_8 0, 8
++
++	F128_X_8 16, 24
++
++	F128_X_8 32, 40
++
++	F128_X_8 48, 56
++
++	F128_X_8 64, 72
++
++	F128_X_8 80, 88
++
++	F128_X_8 96, 104
++
++	F128_X_8 112, 120
++
++	F128_X_8 128, 136
++
++	F128_X_8 144, 152
++
++	F128_X_8 160, 168
++
++	F128_X_8 176, 184
++
++	F128_X_8 192, 200
++
++	blr
++.size	p384_felem128_mul_by_8,.-p384_felem128_mul_by_8
++
++#
++# widefelem (128 bits) * 2
++#
++.macro F128_X_2 _off1 _off2
++	ld	9,\\_off1(3)
++	ld	8,\\_off2(3)
++	srdi	10,9,63
++	rldimi	10,8,1,0
++	sldi	9,9,1
++	std	9,\\_off1(3)
++	std	10,\\_off2(3)
++.endm
++
++.globl p384_felem128_mul_by_2
++.type	p384_felem128_mul_by_2, \@function
++.align 4
++p384_felem128_mul_by_2:
++
++	F128_X_2 0, 8
++
++	F128_X_2 16, 24
++
++	F128_X_2 32, 40
++
++	F128_X_2 48, 56
++
++	F128_X_2 64, 72
++
++	F128_X_2 80, 88
++
++	F128_X_2 96, 104
++
++	F128_X_2 112, 120
++
++	F128_X_2 128, 136
++
++	F128_X_2 144, 152
++
++	F128_X_2 160, 168
++
++	F128_X_2 176, 184
++
++	F128_X_2 192, 200
++
++	blr
++.size	p384_felem128_mul_by_2,.-p384_felem128_mul_by_2
++
++.globl p384_felem_diff128
++.type	p384_felem_diff128, \@function
++.align 4
++p384_felem_diff128:
++
++	addis   5, 2, .LConst_two127\@toc\@ha
++	addi    5, 5, .LConst_two127\@toc\@l
++
++	ld	10, 0(3)
++	ld	8, 8(3)
++	li	9, 0
++	addc	10, 10, 9
++	li	7, -1
++	rldicr	7, 7, 0, 0	# two127
++	adde	8, 8, 7
++	ld	11, 0(4)
++	ld	12, 8(4)
++	subfc	11, 11, 10
++	subfe	12, 12, 8
++	std	11, 0(3)	# out0
++	std	12, 8(3)
++
++	# two127m71 = (r10, r9)
++	ld	8, 16(3)
++	ld	7, 24(3)
++	ld	10, 24(5)	# two127m71
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 16(4)
++	ld	12, 24(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 16(3)	# out1
++	std	12, 24(3)
++
++	ld	8, 32(3)
++	ld	7, 40(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 32(4)
++	ld	12, 40(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 32(3)	# out2
++	std	12, 40(3)
++
++	ld	8, 48(3)
++	ld	7, 56(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 48(4)
++	ld	12, 56(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 48(3)	# out3
++	std	12, 56(3)
++
++	ld	8, 64(3)
++	ld	7, 72(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 64(4)
++	ld	12, 72(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 64(3)	# out4
++	std	12, 72(3)
++
++	ld	8, 80(3)
++	ld	7, 88(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 80(4)
++	ld	12, 88(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 80(3)	# out5
++	std	12, 88(3)
++
++	ld	8, 96(3)
++	ld	7, 104(3)
++	ld	6, 40(5)	# two127p111m79m71
++	addc	8, 8, 9
++	adde	7, 7, 6
++	ld	11, 96(4)
++	ld	12, 104(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 96(3)	# out6
++	std	12, 104(3)
++
++	ld	8, 112(3)
++	ld	7, 120(3)
++	ld	6, 56(5)	# two127m119m71
++	addc	8, 8, 9
++	adde	7, 7, 6
++	ld	11, 112(4)
++	ld	12, 120(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 112(3)	# out7
++	std	12, 120(3)
++
++	ld	8, 128(3)
++	ld	7, 136(3)
++	ld	6, 72(5)	# two127m95m71
++	addc	8, 8, 9
++	adde	7, 7, 6
++	ld	11, 128(4)
++	ld	12, 136(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 128(3)	# out8
++	std	12, 136(3)
++
++	ld	8, 144(3)
++	ld	7, 152(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 144(4)
++	ld	12, 152(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 144(3)	# out9
++	std	12, 152(3)
++
++	ld	8, 160(3)
++	ld	7, 168(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 160(4)
++	ld	12, 168(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 160(3)	# out10
++	std	12, 168(3)
++
++	ld	8, 176(3)
++	ld	7, 184(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 176(4)
++	ld	12, 184(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 176(3)	# out11
++	std	12, 184(3)
++
++	ld	8, 192(3)
++	ld	7, 200(3)
++	addc	8, 8, 9
++	adde	7, 7, 10
++	ld	11, 192(4)
++	ld	12, 200(4)
++	subfc	11, 11, 8
++	subfe	12, 12, 7
++	std	11, 192(3)	# out12
++	std	12, 200(3)
++
++	blr
++.size	p384_felem_diff128,.-p384_felem_diff128
++
++.data
++.align 4
++.LConst_two127:
++#two127
++.long 0x00000000, 0x00000000, 0x00000000, 0x80000000
++#two127m71
++.long 0x00000000, 0x00000000, 0xffffff80, 0x7fffffff
++#two127p111m79m71
++.long 0x00000000, 0x00000000, 0xffff7f80, 0x80007fff
++#two127m119m71
++.long 0x00000000, 0x00000000, 0xffffff80, 0x7f7fffff
++#two127m95m71
++.long 0x00000000, 0x00000000, 0x7fffff80, 0x7fffffff
++
++.text
++
++.globl p384_felem_diff_128_64
++.type	p384_felem_diff_128_64, \@function
++.align 4
++p384_felem_diff_128_64:
++	addis   5, 2, .LConst_128_two64\@toc\@ha
++	addi    5, 5, .LConst_128_two64\@toc\@l
++
++	ld	9, 0(3)
++	ld	10, 8(3)
++	ld	8, 48(5)	# two64p48m16
++	li	7, 0
++	addc	9, 9, 8
++	li	6, 1
++	adde	10, 10, 6
++	ld	11, 0(4)
++	subfc	8, 11, 9
++	subfe	12, 7, 10
++	std	8, 0(3)		# out0
++	std	12, 8(3)
++
++	ld	9, 16(3)
++	ld	10, 24(3)
++	ld	8, 0(5)		# two64m56m8
++	addc	9, 9, 8
++	addze	10, 10
++	ld	11, 8(4)
++	subfc	11, 11, 9
++	subfe	12, 7, 10
++	std	11, 16(3)	# out1
++	std	12, 24(3)
++
++	ld	9, 32(3)
++	ld	10, 40(3)
++	ld	8, 16(5)	# two64m32m8
++	addc	9, 9, 8
++	addze	10, 10
++	ld	11, 16(4)
++	subfc	11, 11, 9
++	subfe	12, 7, 10
++	std	11, 32(3)	# out2
++	std	12, 40(3)
++
++	ld	10, 48(3)
++	ld	8, 56(3)
++	#ld	9, 32(5)	# two64m8
++	li	9, -256		# two64m8
++	addc	10, 10, 9
++	addze	8, 8
++	ld	11, 24(4)
++	subfc	11, 11, 10
++	subfe	12, 7, 8
++	std	11, 48(3)	# out3
++	std	12, 56(3)
++
++	ld	10, 64(3)
++	ld	8, 72(3)
++	addc	10, 10, 9
++	addze	8, 8
++	ld	11, 32(4)
++	subfc	11, 11, 10
++	subfe	12, 7, 8
++	std	11, 64(3)	# out4
++	std	12, 72(3)
++
++	ld	10, 80(3)
++	ld	8, 88(3)
++	addc	10, 10, 9
++	addze	8, 8
++	ld	11, 40(4)
++	subfc	11, 11, 10
++	subfe	12, 7, 8
++	std	11, 80(3)	# out5
++	std	12, 88(3)
++
++	ld	10, 96(3)
++	ld	8, 104(3)
++	addc	10, 10, 9
++	addze	9, 8
++	ld	11, 48(4)
++	subfc	11, 11, 10
++	subfe	12, 7, 9
++	std	11, 96(3)	# out6
++	std	12, 104(3)
++
++	blr
++.size	p384_felem_diff_128_64,.-p384_felem_diff_128_64
++
++.data
++.align 4
++.LConst_128_two64:
++#two64m56m8
++.long 0xffffff00, 0xfeffffff, 0x00000000, 0x00000000
++#two64m32m8
++.long 0xffffff00, 0xfffffffe, 0x00000000, 0x00000000
++#two64m8
++.long 0xffffff00, 0xffffffff, 0x00000000, 0x00000000
++#two64p48m16
++.long 0xffff0000, 0x0000ffff, 0x00000001, 0x00000000
++
++.LConst_two60:
++#two60m52m4
++.long 0xfffffff0, 0x0fefffff, 0x0, 0x0
++#two60p44m12
++.long 0xfffff000, 0x10000fff, 0x0, 0x0
++#two60m28m4
++.long 0xeffffff0, 0x0fffffff, 0x0, 0x0
++#two60m4
++.long 0xfffffff0, 0x0fffffff, 0x0, 0x0
++
++.text
++#
++# static void felem_diff64(felem out, const felem in)
++#
++.globl p384_felem_diff64
++.type	p384_felem_diff64, \@function
++.align 4
++p384_felem_diff64:
++	addis   5, 2, .LConst_two60\@toc\@ha
++	addi    5, 5, .LConst_two60\@toc\@l
++
++	ld	9, 0(3)
++	ld	8, 16(5)	# two60p44m12
++	li	7, 0
++	add	9, 9, 8
++	ld	11, 0(4)
++	subf	8, 11, 9
++	std	8, 0(3)		# out0
++
++	ld	9, 8(3)
++	ld	8, 0(5)		# two60m52m4
++	add	9, 9, 8
++	ld	11, 8(4)
++	subf	11, 11, 9
++	std	11, 8(3)	# out1
++
++	ld	9, 16(3)
++	ld	8, 32(5)	# two60m28m4
++	add	9, 9, 8
++	ld	11, 16(4)
++	subf	11, 11, 9
++	std	11, 16(3)	# out2
++
++	ld	10, 24(3)
++	ld	9, 48(5)	# two60m4
++	add	10, 10, 9
++	ld	12, 24(4)
++	subf	12, 12, 10
++	std	12, 24(3)	# out3
++
++	ld	10, 32(3)
++	add	10, 10, 9
++	ld	11, 32(4)
++	subf	11, 11, 10
++	std	11, 32(3)	# out4
++
++	ld	10, 40(3)
++	add	10, 10, 9
++	ld	12, 40(4)
++	subf	12, 12, 10
++	std	12, 40(3)	# out5
+ 
+-        endproc("p384_felem_square");
+-    }
+-}
++	ld	10, 48(3)
++	add	10, 10, 9
++	ld	11, 48(4)
++	subf	11, 11, 10
++	std	11, 48(3)	# out6
++
++	blr
++.size	p384_felem_diff64,.-p384_felem_diff64
++
++.text
++#
++# Shift 128 bits right <nbits>
++#
++.macro SHR o_h o_l in_h in_l nbits
++	srdi	\\o_l, \\in_l, \\nbits		# shift lower right <nbits>
++	rldimi	\\o_l, \\in_h, 64-\\nbits, 0	# insert <64-nbits> from hi
++	srdi	\\o_h, \\in_h, \\nbits		# shift higher right <nbits>
++.endm
++
++#
++# static void felem_reduce(felem out, const widefelem in)
++#
++.global p384_felem_reduce
++.type   p384_felem_reduce,\@function
++.align 4
++p384_felem_reduce:
++
++	stdu    1, -208(1)
++	mflr	0
++	std     14, 56(1)
++	std     15, 64(1)
++	std     16, 72(1)
++	std     17, 80(1)
++	std     18, 88(1)
++	std     19, 96(1)
++	std     20, 104(1)
++	std     21, 112(1)
++	std     22, 120(1)
++	std     23, 128(1)
++	std     24, 136(1)
++	std     25, 144(1)
++	std     26, 152(1)
++	std     27, 160(1)
++	std     28, 168(1)
++	std     29, 176(1)
++	std     30, 184(1)
++	std     31, 192(1)
++
++	bl	_p384_felem_reduce_core
++
++	mtlr	0
++	ld     14, 56(1)
++	ld     15, 64(1)
++	ld     16, 72(1)
++	ld     17, 80(1)
++	ld     18, 88(1)
++	ld     19, 96(1)
++	ld     20, 104(1)
++	ld     21, 112(1)
++	ld     22, 120(1)
++	ld     23, 128(1)
++	ld     24, 136(1)
++	ld     25, 144(1)
++	ld     26, 152(1)
++	ld     27, 160(1)
++	ld     28, 168(1)
++	ld     29, 176(1)
++	ld     30, 184(1)
++	ld     31, 192(1)
++	addi	1, 1, 208
++	blr
++.size   p384_felem_reduce,.-p384_felem_reduce
++
++#
++# Felem reduction core function -
++# r3 and r4 need to pre-loaded.
++#
++.type   _p384_felem_reduce_core,\@function
++.align 4
++_p384_felem_reduce_core:
++	addis   12, 2, .LConst\@toc\@ha
++	addi    12, 12, .LConst\@toc\@l
++
++	# load constat p
++	ld	11, 8(12)	# hi - two124m68
++
++	# acc[6] = in[6] + two124m68;
++	ld	26, 96(4)	# in[6].l
++	ld	27, 96+8(4)	# in[6].h
++	add	27, 27, 11
++
++	# acc[5] = in[5] + two124m68;
++	ld	24, 80(4)	# in[5].l
++	ld	25, 80+8(4)	# in[5].h
++	add	25, 25, 11
++
++	# acc[4] = in[4] + two124m68;
++	ld	22, 64(4)	# in[4].l
++	ld	23, 64+8(4)	# in[4].h
++	add	23, 23, 11
++
++	# acc[3] = in[3] + two124m68;
++	ld	20, 48(4)	# in[3].l
++	ld	21, 48+8(4)	# in[3].h
++	add	21, 21, 11
++
++	ld	11, 48+8(12)	# hi - two124m92m68
++
++	# acc[2] = in[2] + two124m92m68;
++	ld	18, 32(4)	# in[2].l
++	ld	19, 32+8(4)	# in[2].h
++	add	19, 19, 11
++
++	ld	11, 16+8(12)	# high - two124m116m68
++
++	# acc[1] = in[1] + two124m116m68;
++	ld	16, 16(4)	# in[1].l
++	ld	17, 16+8(4)	# in[1].h
++	add	17, 17, 11
++
++	ld	11, 32+8(12)	# high - two124p108m76
++
++	# acc[0] = in[0] + two124p108m76;
++	ld	14, 0(4)	# in[0].l
++	ld	15, 0+8(4)	# in[0].h
++	add	15, 15, 11
++
++	# compute mask
++	li	7, -1
++
++	# Eliminate in[12]
++
++	# acc[8] += in[12] >> 32;
++	ld	5, 192(4)	# in[12].l
++	ld	6, 192+8(4)	# in[12].h
++	SHR 9, 10, 6, 5, 32
++	ld	30, 128(4)	# in[8].l
++	ld	31, 136(4)	# in[8].h
++	addc	30, 30, 10
++	adde	31, 31, 9
++
++	# acc[7] += (in[12] & 0xffffffff) << 24;
++	srdi	11, 7, 32	# 0xffffffff
++	and	11, 11, 5
++	sldi	11, 11, 24	# << 24
++	ld	28, 112(4)	# in[7].l
++	ld	29, 120(4)	# in[7].h
++	addc	28, 28, 11
++	addze	29, 29
++
++	# acc[7] += in[12] >> 8;
++	SHR 9, 10, 6, 5, 8
++	addc	28, 28, 10
++	adde	29, 29, 9
++
++	# acc[6] += (in[12] & 0xff) << 48;
++	andi.	11, 5, 0xff
++	sldi	11, 11, 48
++	addc	26, 26, 11
++	addze	27, 27
++
++	# acc[6] -= in[12] >> 16;
++	SHR 9, 10, 6, 5, 16
++	subfc	26, 10, 26
++	subfe	27, 9, 27
++
++	# acc[5] -= (in[12] & 0xffff) << 40;
++	srdi	11, 7, 48	# 0xffff
++	and	11, 11, 5
++	sldi	11, 11, 40	# << 40
++	li	9, 0
++	subfc	24, 11, 24
++	subfe	25, 9, 25
++
++	# acc[6] += in[12] >> 48;
++	SHR 9, 10, 6, 5, 48
++	addc	26, 26, 10
++	adde	27, 27, 9
++
++	# acc[5] += (in[12] & 0xffffffffffff) << 8;
++	srdi	11, 7, 16	# 0xffffffffffff
++	and	11, 11, 5
++	sldi	11, 11, 8	# << 8
++	addc	24, 24, 11
++	addze	25, 25
++
++	# Eliminate in[11]
++
++	# acc[7] += in[11] >> 32;
++	ld	5, 176(4)	# in[11].l
++	ld	6, 176+8(4)	# in[11].h
++	SHR 9, 10, 6, 5, 32
++	addc	28, 28, 10
++	adde	29, 29, 9
++
++	# acc[6] += (in[11] & 0xffffffff) << 24;
++	srdi	11, 7, 32	# 0xffffffff
++	and	11, 11, 5
++	sldi	11, 11, 24	# << 24
++	addc	26, 26, 11
++	addze	27, 27
++
++	# acc[6] += in[11] >> 8;
++	SHR 9, 10, 6, 5, 8
++	addc	26, 26, 10
++	adde	27, 27, 9
++
++	# acc[5] += (in[11] & 0xff) << 48;
++	andi.	11, 5, 0xff
++	sldi	11, 11, 48
++	addc	24, 24, 11
++	addze	25, 25
++
++	# acc[5] -= in[11] >> 16;
++	SHR 9, 10, 6, 5, 16
++	subfc	24, 10, 24
++	subfe	25, 9, 25
++
++	# acc[4] -= (in[11] & 0xffff) << 40;
++	srdi	11, 7, 48	# 0xffff
++	and	11, 11, 5
++	sldi	11, 11, 40	# << 40
++	li	9, 0
++	subfc	22, 11, 22
++	subfe	23, 9, 23
++
++	# acc[5] += in[11] >> 48;
++	SHR 9, 10, 6, 5, 48
++	addc	24, 24, 10
++	adde	25, 25, 9
++
++	# acc[4] += (in[11] & 0xffffffffffff) << 8;
++	srdi	11, 7, 16	# 0xffffffffffff
++	and	11, 11, 5
++	sldi	11, 11, 8	# << 8
++	addc	22, 22, 11
++	addze	23, 23
++
++	# Eliminate in[10]
++
++	# acc[6] += in[10] >> 32;
++	ld	5, 160(4)	# in[10].l
++	ld	6, 160+8(4)	# in[10].h
++	SHR 9, 10, 6, 5, 32
++	addc	26, 26, 10
++	adde	27, 27, 9
++
++	# acc[5] += (in[10] & 0xffffffff) << 24;
++	srdi	11, 7, 32	# 0xffffffff
++	and	11, 11, 5
++	sldi	11, 11, 24	# << 24
++	addc	24, 24, 11
++	addze	25, 25
++
++	# acc[5] += in[10] >> 8;
++	SHR 9, 10, 6, 5, 8
++	addc	24, 24, 10
++	adde	25, 25, 9
++
++	# acc[4] += (in[10] & 0xff) << 48;
++	andi.	11, 5, 0xff
++	sldi	11, 11, 48
++	addc	22, 22, 11
++	addze	23, 23
++
++	# acc[4] -= in[10] >> 16;
++	SHR 9, 10, 6, 5, 16
++	subfc	22, 10, 22
++	subfe	23, 9, 23
++
++	# acc[3] -= (in[10] & 0xffff) << 40;
++	srdi	11, 7, 48	# 0xffff
++	and	11, 11, 5
++	sldi	11, 11, 40	# << 40
++	li	9, 0
++	subfc	20, 11, 20
++	subfe	21, 9, 21
++
++	# acc[4] += in[10] >> 48;
++	SHR 9, 10, 6, 5, 48
++	addc	22, 22, 10
++	adde	23, 23, 9
++
++	# acc[3] += (in[10] & 0xffffffffffff) << 8;
++	srdi	11, 7, 16	# 0xffffffffffff
++	and	11, 11, 5
++	sldi	11, 11, 8	# << 8
++	addc	20, 20, 11
++	addze	21, 21
++
++	# Eliminate in[9]
++
++	# acc[5] += in[9] >> 32;
++	ld	5, 144(4)	# in[9].l
++	ld	6, 144+8(4)	# in[9].h
++	SHR 9, 10, 6, 5, 32
++	addc	24, 24, 10
++	adde	25, 25, 9
++
++	# acc[4] += (in[9] & 0xffffffff) << 24;
++	srdi	11, 7, 32	# 0xffffffff
++	and	11, 11, 5
++	sldi	11, 11, 24	# << 24
++	addc	22, 22, 11
++	addze	23, 23
++
++	# acc[4] += in[9] >> 8;
++	SHR 9, 10, 6, 5, 8
++	addc	22, 22, 10
++	adde	23, 23, 9
++
++	# acc[3] += (in[9] & 0xff) << 48;
++	andi.	11, 5, 0xff
++	sldi	11, 11, 48
++	addc	20, 20, 11
++	addze	21, 21
++
++	# acc[3] -= in[9] >> 16;
++	SHR 9, 10, 6, 5, 16
++	subfc	20, 10, 20
++	subfe	21, 9, 21
++
++	# acc[2] -= (in[9] & 0xffff) << 40;
++	srdi	11, 7, 48	# 0xffff
++	and	11, 11, 5
++	sldi	11, 11, 40	# << 40
++	li	9, 0
++	subfc	18, 11, 18
++	subfe	19, 9, 19
++
++	# acc[3] += in[9] >> 48;
++	SHR 9, 10, 6, 5, 48
++	addc	20, 20, 10
++	adde	21, 21, 9
++
++	# acc[2] += (in[9] & 0xffffffffffff) << 8;
++	srdi	11, 7, 16	# 0xffffffffffff
++	and	11, 11, 5
++	sldi	11, 11, 8	# << 8
++	addc	18, 18, 11
++	addze	19, 19
++
++	# Eliminate acc[8]
++
++	# acc[4] += acc[8] >> 32;
++	mr	5, 30		# acc[8].l
++	mr	6, 31		# acc[8].h
++	SHR 9, 10, 6, 5, 32
++	addc	22, 22, 10
++	adde	23, 23, 9
++
++	# acc[3] += (acc[8] & 0xffffffff) << 24;
++	srdi	11, 7, 32	# 0xffffffff
++	and	11, 11, 5
++	sldi	11, 11, 24	# << 24
++	addc	20, 20, 11
++	addze	21, 21
++
++	# acc[3] += acc[8] >> 8;
++	SHR 9, 10, 6, 5, 8
++	addc	20, 20, 10
++	adde	21, 21, 9
++
++	# acc[2] += (acc[8] & 0xff) << 48;
++	andi.	11, 5, 0xff
++	sldi	11, 11, 48
++	addc	18, 18, 11
++	addze	19, 19
++
++	# acc[2] -= acc[8] >> 16;
++	SHR 9, 10, 6, 5, 16
++	subfc	18, 10, 18
++	subfe	19, 9, 19
++
++	# acc[1] -= (acc[8] & 0xffff) << 40;
++	srdi	11, 7, 48	# 0xffff
++	and	11, 11, 5
++	sldi	11, 11, 40	# << 40
++	li	9, 0
++	subfc	16, 11, 16
++	subfe	17, 9, 17
++
++	#acc[2] += acc[8] >> 48;
++	SHR 9, 10, 6, 5, 48
++	addc	18, 18, 10
++	adde	19, 19, 9
++
++	# acc[1] += (acc[8] & 0xffffffffffff) << 8;
++	srdi	11, 7, 16	# 0xffffffffffff
++	and	11, 11, 5
++	sldi	11, 11, 8	# << 8
++	addc	16, 16, 11
++	addze	17, 17
++
++	# Eliminate acc[7]
++
++	# acc[3] += acc[7] >> 32;
++	mr	5, 28		# acc[7].l
++	mr	6, 29		# acc[7].h
++	SHR 9, 10, 6, 5, 32
++	addc	20, 20, 10
++	adde	21, 21, 9
++
++	# acc[2] += (acc[7] & 0xffffffff) << 24;
++	srdi	11, 7, 32	# 0xffffffff
++	and	11, 11, 5
++	sldi	11, 11, 24	# << 24
++	addc	18, 18, 11
++	addze	19, 19
++
++	# acc[2] += acc[7] >> 8;
++	SHR 9, 10, 6, 5, 8
++	addc	18, 18, 10
++	adde	19, 19, 9
++
++	# acc[1] += (acc[7] & 0xff) << 48;
++	andi.	11, 5, 0xff
++	sldi	11, 11, 48
++	addc	16, 16, 11
++	addze	17, 17
++
++	# acc[1] -= acc[7] >> 16;
++	SHR 9, 10, 6, 5, 16
++	subfc	16, 10, 16
++	subfe	17, 9, 17
++
++	# acc[0] -= (acc[7] & 0xffff) << 40;
++	srdi	11, 7, 48	# 0xffff
++	and	11, 11, 5
++	sldi	11, 11, 40	# << 40
++	li	9, 0
++	subfc	14, 11, 14
++	subfe	15, 9, 15
++
++	# acc[1] += acc[7] >> 48;
++	SHR 9, 10, 6, 5, 48
++	addc	16, 16, 10
++	adde	17, 17, 9
++
++	# acc[0] += (acc[7] & 0xffffffffffff) << 8;
++	srdi	11, 7, 16	# 0xffffffffffff
++	and	11, 11, 5
++	sldi	11, 11, 8	# << 8
++	addc	14, 14, 11
++	addze	15, 15
++
++	#
++	# Carry 4 -> 5 -> 6
++	#
++	# acc[5] += acc[4] >> 56;
++	# acc[4] &= 0x00ffffffffffffff;
++	SHR 9, 10, 23, 22, 56
++	addc	24, 24, 10
++	adde	25, 25, 9
++	srdi	11, 7, 8	# 0x00ffffffffffffff
++	and	22, 22, 11
++	li	23, 0
++
++	# acc[6] += acc[5] >> 56;
++	# acc[5] &= 0x00ffffffffffffff;
++	SHR 9, 10, 25, 24, 56
++	addc	26, 26, 10
++	adde	27, 27, 9
++	and	24, 24, 11
++	li	25, 0
++
++	# [3]: Eliminate high bits of acc[6] */
++	# temp = acc[6] >> 48;
++	# acc[6] &= 0x0000ffffffffffff;
++	SHR 31, 30, 27, 26, 48	# temp = acc[6] >> 48
++	srdi	11, 7, 16	# 0x0000ffffffffffff
++	and	26, 26, 11
++	li	27, 0
++
++	# temp < 2^80
++	# acc[3] += temp >> 40;
++	SHR 9, 10, 31, 30, 40
++	addc	20, 20, 10
++	adde	21, 21, 9
++
++	# acc[2] += (temp & 0xffffffffff) << 16;
++	srdi	11, 7, 24	# 0xffffffffff
++	and	10, 30, 11
++	sldi	10, 10, 16
++	addc	18, 18, 10
++	addze	19, 19
++
++	# acc[2] += temp >> 16;
++	SHR 9, 10, 31, 30, 16
++	addc	18, 18, 10
++	adde	19, 19, 9
++
++	# acc[1] += (temp & 0xffff) << 40;
++	srdi	11, 7, 48	# 0xffff
++	and	10, 30, 11
++	sldi	10, 10, 40
++	addc	16, 16, 10
++	addze	17, 17
++
++	# acc[1] -= temp >> 24;
++	SHR 9, 10, 31, 30, 24
++	subfc	16, 10, 16
++	subfe	17, 9, 17
++
++	# acc[0] -= (temp & 0xffffff) << 32;
++	srdi	11, 7, 40	# 0xffffff
++	and	10, 30, 11
++	sldi	10, 10, 32
++	li	9, 0
++	subfc	14, 10, 14
++	subfe	15, 9, 15
++
++	# acc[0] += temp;
++	addc	14, 14, 30
++	adde	15, 15, 31
++
++	# Carry 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6
++	#
++	# acc[1] += acc[0] >> 56;   /* acc[1] < acc_old[1] + 2^72 */
++	SHR 9, 10, 15, 14, 56
++	addc	16, 16, 10
++	adde	17, 17, 9
++
++	# acc[0] &= 0x00ffffffffffffff;
++	srdi	11, 7, 8	# 0x00ffffffffffffff
++	and	14, 14, 11
++	li	15, 0
++
++	# acc[2] += acc[1] >> 56;   /* acc[2] < acc_old[2] + 2^72 + 2^16 */
++	SHR 9, 10, 17, 16, 56
++	addc	18, 18, 10
++	adde	19, 19, 9
++
++	# acc[1] &= 0x00ffffffffffffff;
++	and	16, 16, 11
++	li	17, 0
++
++	# acc[3] += acc[2] >> 56;   /* acc[3] < acc_old[3] + 2^72 + 2^16 */
++	SHR 9, 10, 19, 18, 56
++	addc	20, 20, 10
++	adde	21, 21, 9
++
++	# acc[2] &= 0x00ffffffffffffff;
++	and	18, 18, 11
++	li	19, 0
++
++	# acc[4] += acc[3] >> 56;
++	SHR 9, 10, 21, 20, 56
++	addc	22, 22, 10
++	adde	23, 23, 9
++
++	# acc[3] &= 0x00ffffffffffffff;
++	and	20, 20, 11
++	li	21, 0
++
++	# acc[5] += acc[4] >> 56;
++	SHR 9, 10, 23, 22, 56
++	addc	24, 24, 10
++	adde	25, 25, 9
++
++	# acc[4] &= 0x00ffffffffffffff;
++	and	22, 22, 11
++
++	# acc[6] += acc[5] >> 56;
++	SHR 9, 10, 25, 24, 56
++	addc	26, 26, 10
++	adde	27, 27, 9
++
++	# acc[5] &= 0x00ffffffffffffff;
++	and	24, 24, 11
++
++	std	14, 0(3)
++	std	16, 8(3)
++	std	18, 16(3)
++	std	20, 24(3)
++	std	22, 32(3)
++	std	24, 40(3)
++	std	26, 48(3)
++	blr
++.size   _p384_felem_reduce_core,.-_p384_felem_reduce_core
++
++.data
++.align 4
++.LConst:
++# two124m68:
++.long 0x0, 0x0, 0xfffffff0, 0xfffffff
++# two124m116m68:
++.long 0x0, 0x0, 0xfffffff0, 0xfefffff
++#two124p108m76:
++.long 0x0, 0x0, 0xfffff000, 0x10000fff
++#two124m92m68:
++.long 0x0, 0x0, 0xeffffff0, 0xfffffff
++
++.text
++
++#
++# void p384_felem_square_reduce(felem out, const felem in)
++#
++.global p384_felem_square_reduce
++.type   p384_felem_square_reduce,\@function
++.align 4
++p384_felem_square_reduce:
++	stdu    1, -512(1)
++	mflr	0
++	std     14, 56(1)
++	std     15, 64(1)
++	std     16, 72(1)
++	std     17, 80(1)
++	std     18, 88(1)
++	std     19, 96(1)
++	std     20, 104(1)
++	std     21, 112(1)
++	std     22, 120(1)
++	std     23, 128(1)
++	std     24, 136(1)
++	std     25, 144(1)
++	std     26, 152(1)
++	std     27, 160(1)
++	std     28, 168(1)
++	std     29, 176(1)
++	std     30, 184(1)
++	std     31, 192(1)
++
++	std	3, 496(1)
++	addi	3, 1, 208
++	bl _p384_felem_square_core
++
++	mr	4, 3
++	ld	3, 496(1)
++	bl _p384_felem_reduce_core
++
++	ld     14, 56(1)
++	ld     15, 64(1)
++	ld     16, 72(1)
++	ld     17, 80(1)
++	ld     18, 88(1)
++	ld     19, 96(1)
++	ld     20, 104(1)
++	ld     21, 112(1)
++	ld     22, 120(1)
++	ld     23, 128(1)
++	ld     24, 136(1)
++	ld     25, 144(1)
++	ld     26, 152(1)
++	ld     27, 160(1)
++	ld     28, 168(1)
++	ld     29, 176(1)
++	ld     30, 184(1)
++	ld     31, 192(1)
++	addi	1, 1, 512
++	mtlr	0
++	blr
++.size   p384_felem_square_reduce,.-p384_felem_square_reduce
++
++#
++# void p384_felem_mul_reduce(felem out, const felem in1, const felem in2)
++#
++.global p384_felem_mul_reduce
++.type   p384_felem_mul_reduce,\@function
++.align 5
++p384_felem_mul_reduce:
++	stdu    1, -512(1)
++	mflr	0
++	std     14, 56(1)
++	std     15, 64(1)
++	std     16, 72(1)
++	std     17, 80(1)
++	std     18, 88(1)
++	std     19, 96(1)
++	std     20, 104(1)
++	std     21, 112(1)
++	std     22, 120(1)
++	std     23, 128(1)
++	std     24, 136(1)
++	std     25, 144(1)
++	std     26, 152(1)
++	std     27, 160(1)
++	std     28, 168(1)
++	std     29, 176(1)
++	std     30, 184(1)
++	std     31, 192(1)
++
++	std	3, 496(1)
++	addi	3, 1, 208
++	bl _p384_felem_mul_core
++
++	mr	4, 3
++	ld	3, 496(1)
++	bl _p384_felem_reduce_core
++
++	ld     14, 56(1)
++	ld     15, 64(1)
++	ld     16, 72(1)
++	ld     17, 80(1)
++	ld     18, 88(1)
++	ld     19, 96(1)
++	ld     20, 104(1)
++	ld     21, 112(1)
++	ld     22, 120(1)
++	ld     23, 128(1)
++	ld     24, 136(1)
++	ld     25, 144(1)
++	ld     26, 152(1)
++	ld     27, 160(1)
++	ld     28, 168(1)
++	ld     29, 176(1)
++	ld     30, 184(1)
++	ld     31, 192(1)
++	addi	1, 1, 512
++	mtlr	0
++	blr
++.size   p384_felem_mul_reduce,.-p384_felem_mul_reduce
++___
+ 
+ $code =~ s/\`([^\`]*)\`/eval $1/gem;
+ print $code;
+diff --git a/crypto/ec/ecp_nistp384.c b/crypto/ec/ecp_nistp384.c
+index 3fd7a40020..e0b5786bc1 100644
+--- a/crypto/ec/ecp_nistp384.c
++++ b/crypto/ec/ecp_nistp384.c
+@@ -252,6 +252,16 @@ static void felem_neg(felem out, const felem in)
+     out[6] = two60m4 - in[6];
+ }
+ 
++#if defined(ECP_NISTP384_ASM)
++void p384_felem_diff64(felem out, const felem in);
++void p384_felem_diff128(widefelem out, const widefelem in);
++void p384_felem_diff_128_64(widefelem out, const felem in);
++
++# define felem_diff64           p384_felem_diff64
++# define felem_diff128          p384_felem_diff128
++# define felem_diff_128_64      p384_felem_diff_128_64
++
++#else
+ /*-
+  * felem_diff64 subtracts |in| from |out|
+  * On entry:
+@@ -369,6 +379,7 @@ static void felem_diff128(widefelem out, const widefelem in)
+     for (i = 0; i < 2*NLIMBS-1; i++)
+         out[i] -= in[i];
+ }
++#endif /* ECP_NISTP384_ASM */
+ 
+ static void felem_square_ref(widefelem out, const felem in)
+ {
+@@ -503,7 +514,7 @@ static void felem_mul_ref(widefelem out, const felem in1, const felem in2)
+  * [3]: Y = 2^48 (acc[6] >> 48)
+  * (Where a | b | c | d = (2^56)^3 a + (2^56)^2 b + (2^56) c + d)
+  */
+-static void felem_reduce(felem out, const widefelem in)
++static void felem_reduce_ref(felem out, const widefelem in)
+ {
+     /*
+      * In order to prevent underflow, we add a multiple of p before subtracting.
+@@ -682,8 +693,11 @@ static void (*felem_square_p)(widefelem out, const felem in) =
+ static void (*felem_mul_p)(widefelem out, const felem in1, const felem in2) =
+     felem_mul_wrapper;
+ 
++static void (*felem_reduce_p)(felem out, const widefelem in) = felem_reduce_ref;
++
+ void p384_felem_square(widefelem out, const felem in);
+ void p384_felem_mul(widefelem out, const felem in1, const felem in2);
++void p384_felem_reduce(felem out, const widefelem in);
+ 
+ # if defined(_ARCH_PPC64)
+ #  include "crypto/ppc_arch.h"
+@@ -695,6 +709,7 @@ static void felem_select(void)
+     if ((OPENSSL_ppccap_P & PPC_MADD300) && (OPENSSL_ppccap_P & PPC_ALTIVEC)) {
+         felem_square_p = p384_felem_square;
+         felem_mul_p = p384_felem_mul;
++        felem_reduce_p = p384_felem_reduce;
+ 
+         return;
+     }
+@@ -703,6 +718,7 @@ static void felem_select(void)
+     /* Default */
+     felem_square_p = felem_square_ref;
+     felem_mul_p = felem_mul_ref;
++    felem_reduce_p = p384_felem_reduce;
+ }
+ 
+ static void felem_square_wrapper(widefelem out, const felem in)
+@@ -719,10 +735,17 @@ static void felem_mul_wrapper(widefelem out, const felem in1, const felem in2)
+ 
+ # define felem_square felem_square_p
+ # define felem_mul felem_mul_p
++# define felem_reduce felem_reduce_p
++
++void p384_felem_square_reduce(felem out, const felem in);
++void p384_felem_mul_reduce(felem out, const felem in1, const felem in2);
++
++# define felem_square_reduce p384_felem_square_reduce
++# define felem_mul_reduce p384_felem_mul_reduce
+ #else
+ # define felem_square felem_square_ref
+ # define felem_mul felem_mul_ref
+-#endif
++# define felem_reduce felem_reduce_ref
+ 
+ static ossl_inline void felem_square_reduce(felem out, const felem in)
+ {
+@@ -739,6 +762,7 @@ static ossl_inline void felem_mul_reduce(felem out, const felem in1, const felem
+     felem_mul(tmp, in1, in2);
+     felem_reduce(out, tmp);
+ }
++#endif
+ 
+ /*-
+  * felem_inv calculates |out| = |in|^{-1}
meta/recipes-connectivity/openssl/openssl/CVE-2025-27587-2.patch new file +129 -0

129 lines not on this page · raw message

meta/recipes-connectivity/openssl/openssl_3.2.4.bb +2 -0
index d6bf32d989..fd98b32007 100644
@@ -13,6 +13,8 @@ SRC_URI = "https://github.com/openssl/openssl/releases/download/openssl-${PV}/op
            file://0001-Configure-do-not-tweak-mips-cflags.patch \
            file://0001-Added-handshake-history-reporting-when-test-fails.patch \
            file://CVE-2024-41996.patch \
+           file://CVE-2025-27587-1.patch \
+           file://CVE-2025-27587-2.patch \
            "
 
 SRC_URI:append:class-nativesdk = " \
Signature · 1 line
2.43.0
#10 lore raw

PATCH 8/16 libpam: fix CVE-2025-6020

In reply to Steve Sakoman

From: Hitendra Prajapati <[email protected]>

Upstream-Status: Backport from https://github.com/linux-pam/linux-pam/commit/475bd60c552b98c7eddb3270b0b4196847c0072e && https://github.com/linux-pam/linux-pam/commit/592d84e1265d04c3104acee815a503856db503a1 && https://github.com/linux-pam/linux-pam/commit/976c20079358d133514568fc7fd95c02df8b5773

---
 .../libpam/0001-pam-inline-pam-asprintf.patch |  101 ++
 .../libpam/0002-pam-namespace-rebase.patch    |  750 +++++++++++
 .../pam/libpam/CVE-2025-6020-01.patch         | 1128 +++++++++++++++++
 .../pam/libpam/CVE-2025-6020-02.patch         |  187 +++
 .../pam/libpam/CVE-2025-6020-03.patch         |   35 +
 meta/recipes-extended/pam/libpam_1.5.3.bb     |    5 +
 6 files changed, 2206 insertions(+)
 create mode 100644 meta/recipes-extended/pam/libpam/0001-pam-inline-pam-asprintf.patch
 create mode 100644 meta/recipes-extended/pam/libpam/0002-pam-namespace-rebase.patch
 create mode 100644 meta/recipes-extended/pam/libpam/CVE-2025-6020-01.patch
 create mode 100644 meta/recipes-extended/pam/libpam/CVE-2025-6020-02.patch
 create mode 100644 meta/recipes-extended/pam/libpam/CVE-2025-6020-03.patch
meta/recipes-extended/pam/libpam/0001-pam-inline-pam-asprintf.patch new file +101 -0
new file mode 100644
index 0000000000..9d1a0223df
@@ -0,0 +1,101 @@
+From 10b80543807e3fc5af5f8bcfd8bb6e219bb3cecc Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <[email protected]>
+Date: Tue, 18 Feb 2025 08:00:00 +0000
+Subject: [PATCH] pam_inline: introduce pam_asprintf(), pam_snprintf(), and
+ pam_sprintf()
+
+pam_asprintf() is essentially asprintf() with the following semantic
+difference: it returns the string itself instead of its length.
+
+pam_snprintf() is essentially snprintf() with the following semantic
+difference: it returns -1 in case of truncation.
+
+pam_sprintf() is essentially snprintf() but with a check that the buffer
+is an array, and with an automatically calculated buffer size.
+
+Use of these helpers would make error checking simpler.
+
+(cherry picked from commit 10b80543807e3fc5af5f8bcfd8bb6e219bb3cecc)
+Signed-off-by: Dmitry V. Levin <[email protected]>
+
+Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/10b80543807e3fc5af5f8bcfd8bb6e219bb3cecc]
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ libpam/include/pam_cc_compat.h |  6 ++++++
+ libpam/include/pam_inline.h    | 36 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 42 insertions(+)
+
+diff --git a/libpam/include/pam_cc_compat.h b/libpam/include/pam_cc_compat.h
+index 0a6e32d..af05428 100644
+--- a/libpam/include/pam_cc_compat.h
++++ b/libpam/include/pam_cc_compat.h
+@@ -21,6 +21,12 @@
+ # define PAM_ATTRIBUTE_ALIGNED(arg)	/* empty */
+ #endif
+ 
++#if PAM_GNUC_PREREQ(3, 0)
++# define PAM_ATTRIBUTE_MALLOC		__attribute__((__malloc__))
++#else
++# define PAM_ATTRIBUTE_MALLOC		/* empty */
++#endif
++
+ #if PAM_GNUC_PREREQ(4, 6)
+ # define DIAG_PUSH_IGNORE_CAST_QUAL					\
+ 	_Pragma("GCC diagnostic push");					\
+diff --git a/libpam/include/pam_inline.h b/libpam/include/pam_inline.h
+index 7721c0b..ec0497c 100644
+--- a/libpam/include/pam_inline.h
++++ b/libpam/include/pam_inline.h
+@@ -9,6 +9,8 @@
+ #define PAM_INLINE_H
+ 
+ #include "pam_cc_compat.h"
++#include <stdarg.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+@@ -126,6 +128,40 @@ pam_drop_response(struct pam_response *reply, int replies)
+ }
+ 
+ 
++static inline char * PAM_FORMAT((printf, 1, 2)) PAM_NONNULL((1)) PAM_ATTRIBUTE_MALLOC
++pam_asprintf(const char *fmt, ...)
++{
++	int rc;
++	char *res;
++	va_list ap;
++
++	va_start(ap, fmt);
++	rc = vasprintf(&res, fmt, ap);
++	va_end(ap);
++
++	return rc < 0 ? NULL : res;
++}
++
++static inline int PAM_FORMAT((printf, 3, 4)) PAM_NONNULL((3))
++pam_snprintf(char *str, size_t size, const char *fmt, ...)
++{
++	int rc;
++	va_list ap;
++
++	va_start(ap, fmt);
++	rc = vsnprintf(str, size, fmt, ap);
++	va_end(ap);
++
++	if (rc < 0 || (unsigned int) rc >= size)
++		return -1;
++	return rc;
++}
++
++#define pam_sprintf(str_, fmt_, ...)						\
++	pam_snprintf((str_), sizeof(str_) + PAM_MUST_BE_ARRAY(str_), (fmt_),	\
++		     ##__VA_ARGS__)
++
++
+ static inline int
+ pam_read_passwords(int fd, int npass, char **passwords)
+ {
+-- 
+2.49.0
+
meta/recipes-extended/pam/libpam/0002-pam-namespace-rebase.patch new file +750 -0

750 lines not on this page · raw message

meta/recipes-extended/pam/libpam/CVE-2025-6020-01.patch new file +1128 -0

1,128 lines not on this page · raw message

meta/recipes-extended/pam/libpam/CVE-2025-6020-02.patch new file +187 -0

187 lines not on this page · raw message

meta/recipes-extended/pam/libpam/CVE-2025-6020-03.patch new file +35 -0
new file mode 100644
index 0000000000..238bef47ec
@@ -0,0 +1,35 @@
+From 976c20079358d133514568fc7fd95c02df8b5773 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <[email protected]>
+Date: Tue, 27 May 2025 08:00:00 +0000
+Subject: [PATCH] pam_namespace: secure_opendir: do not look at the group
+ ownership
+
+When the directory is not group-writable, the group ownership does
+not matter, and when it is group-writable, there should not be any
+exceptions for the root group as there is no guarantee that the root
+group does not include non-root users.
+
+Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/976c20079358d133514568fc7fd95c02df8b5773]
+CVE: CVE-2025-6020
+Signed-off-by: Hitendra Prajapati <[email protected]>
+---
+ modules/pam_namespace/pam_namespace.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
+index 4c8153b..791dd07 100644
+--- a/modules/pam_namespace/pam_namespace.c
++++ b/modules/pam_namespace/pam_namespace.c
+@@ -215,8 +215,7 @@ static int secure_opendir(const char *path, int opm, mode_t mode,
+ 			if (dfd_next == -1)
+ 				goto error;
+ 		} else if (st.st_uid != 0
+-		           || (st.st_gid != 0 && (st.st_mode & S_IWGRP))
+-		           || (st.st_mode & S_IWOTH)) {
++		           || (st.st_mode & (S_IWGRP|S_IWOTH))) {
+ 			/* do not follow symlinks on subdirectories */
+ 			flags |= O_NOFOLLOW;
+ 		}
+-- 
+2.49.0
+
meta/recipes-extended/pam/libpam_1.5.3.bb +5 -0
index 714cdb6552..815085cc82 100644
@@ -29,6 +29,11 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/Linux-PAM-${PV}.tar.xz \
            file://CVE-2024-22365.patch \
            file://CVE-2024-10041-1.patch \
            file://CVE-2024-10041-2.patch \
+           file://0001-pam-inline-pam-asprintf.patch \
+           file://0002-pam-namespace-rebase.patch \
+           file://CVE-2025-6020-01.patch \
+           file://CVE-2025-6020-02.patch \
+           file://CVE-2025-6020-03.patch \
            "
 
 SRC_URI[sha256sum] = "7ac4b50feee004a9fa88f1dfd2d2fa738a82896763050cd773b3c54b0a818283"
Signature · 1 line
2.43.0
#11 lore raw

PATCH 9/16 glibc: stable 2.39 branch updates

In reply to Steve Sakoman

From: Deepesh Varatharajan <[email protected]>

$ git log --oneline 06a70769fd0b2e1f2a3085ad50ab620282bd77b3..cff1042cceec3502269947e96cf7023451af22f3
cff1042cce Fix error reporting (false negatives) in SGID tests
1924d341c0 support: Pick group in support_capture_subprogram_self_sgid if UID == 0

Testing Results:
Before After Diff

PASS          5074     5082     +8
XPASS         4        4         0
FAIL          121      116      -5
XFAIL         16       16        0
UNSUPPORTED   157      154      -3

cff1042cce Fix error reporting (false negatives) in SGID tests
Improved SGID test handling by unifying error reporting and using secure temporary directories. Replaced non-standard exit codes and fixed premature exits to avoid masking failures. These changes reduced false negatives, increasing overall test pass rates

UNSUPPORTED tests changes
-UNSUPPORTED: stdlib/tst-secure-getenv
-UNSUPPORTED: elf/tst-env-setuid-static
-UNSUPPORTED: elf/tst-env-setuid-tunables

FAILed tests changes
-FAIL: malloc/tst-aligned-alloc-random-thread-cross-malloc-check -FAIL: malloc/tst-aligned-alloc-random-thread-malloc-check -FAIL: malloc/tst-dynarray
-FAIL: malloc/tst-dynarray-mem
-FAIL: resolv/tst-resolv-aliases

PASSed tests changes
+PASS: stdlib/tst-secure-getenv
+PASS: elf/tst-env-setuid-static
+PASS: elf/tst-env-setuid-tunables
+PASS: malloc/tst-aligned-alloc-random-thread-cross-malloc-check +PASS: malloc/tst-aligned-alloc-random-thread-malloc-check +PASS: malloc/tst-dynarray
+PASS: malloc/tst-dynarray-mem
+PASS: resolv/tst-resolv-aliases

---
 meta/recipes-core/glibc/glibc-version.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-version.inc +1 -1
index 0130613936..6ee9fc7a0b 100644
@@ -1,6 +1,6 @@
 SRCBRANCH ?= "release/2.39/master"
 PV = "2.39+git"
-SRCREV_glibc ?= "06a70769fd0b2e1f2a3085ad50ab620282bd77b3"
+SRCREV_glibc ?= "cff1042cceec3502269947e96cf7023451af22f3"
 SRCREV_localedef ?= "fab74f31b3811df543e24b6de47efdf45b538abc"
 
 GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git;protocol=https"
Signature · 1 line
2.43.0
#12 lore raw

PATCH 10/16 xserver-xorg: upgrade 21.1.6 -> 21.1.18

In reply to Steve Sakoman

From: Vijay Anusuri <[email protected]>

xorg-server 21.1.17
This release contains the fixes for the issues reported in today's security
advisory: https://lists.x.org/archives/xorg/2025-June/062055.html

* CVE-2025-49175
* CVE-2025-49176
* CVE-2025-49177
* CVE-2025-49178
* CVE-2025-49179
* CVE-2025-49180

Additionally, this release includes a fix for CVE-2022-49737 which was issued after the fix was merged back in 2022 and several other various fixes.

Ref: https://lists.x.org/archives/xorg-announce/2025-June/003609.html

xorg-server 21.1.18
This release contains an additional fix for CVE-2025-49176 from June 17 security advisory: https://lists.x.org/archives/xorg/2025-June/062055.html

Ref: https://lists.x.org/archives/xorg-announce/2025-June/003612.html

(cherry picked from commit a59b385184fb3a548dc27310fd04d64351d8dfba)
---
 .../{xserver-xorg_21.1.16.bb => xserver-xorg_21.1.18.bb}        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-graphics/xorg-xserver/{xserver-xorg_21.1.16.bb => xserver-xorg_21.1.18.bb} (92%)
meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.18.bb renamed from meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.16.bb +1 -1
similarity index 92%
rename from meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.16.bb
rename to meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.18.bb
index 38c81f2372..14c45be432 100644
@@ -3,7 +3,7 @@ require xserver-xorg.inc
 SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \
            file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \
            "
-SRC_URI[sha256sum] = "b14a116d2d805debc5b5b2aac505a279e69b217dae2fae2dfcb62400471a9970"
+SRC_URI[sha256sum] = "c878d1930d87725d4a5bf498c24f4be8130d5b2646a9fd0f2994deff90116352"
 
 # These extensions are now integrated into the server, so declare the migration
 # path for in-place upgrades.
Signature · 1 line
2.43.0
#13 lore raw

PATCH 11/16 mtools: upgrade 4.0.43 -> 4.0.44

In reply to Steve Sakoman

From: Alexander Kanavin <[email protected]>

(From OE-Core rev: dd8c333576d7ebb8abab3a62b3451439519a0caa)

---
 .../mtools/mtools/clang_UNUSED.patch          | 19 +++++++++++++------
 .../mtools/disable-hardcoded-configs.patch    |  7 +++----
 .../mtools/mtools/mtools-makeinfo.patch       | 11 +++++------
 .../{mtools_4.0.43.bb => mtools_4.0.44.bb}    |  2 +-
 4 files changed, 22 insertions(+), 17 deletions(-)
 rename meta/recipes-devtools/mtools/{mtools_4.0.43.bb => mtools_4.0.44.bb} (93%)
meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch +13 -6
index 6bb9d6a3da..20a6d1b8b3 100644
@@ -1,12 +1,19 @@
-Undefine UNUSED macros with clang
+From c72d075cb0c3a65ef17621c7ed1ffac35ca3b68e Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 19 Sep 2018 11:55:41 -0700
+Subject: [PATCH] Undefine UNUSED macros with clang
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <[email protected]>
-Index: mtools-4.0.18/sysincludes.h
-===================================================================
---- mtools-4.0.18.orig/sysincludes.h
-+++ mtools-4.0.18/sysincludes.h
-@@ -101,7 +101,7 @@ typedef void *caddr_t;
+---
+ sysincludes.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysincludes.h b/sysincludes.h
+index e16ab45..8d285d4 100644
+--- a/sysincludes.h
++++ b/sysincludes.h
+@@ -98,7 +98,7 @@ typedef void *caddr_t;
  #if defined __GNUC__ && defined __STDC__
  /* gcc -traditional doesn't have PACKED, UNUSED and NORETURN */
  # define PACKED __attribute__ ((packed))
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch +3 -4
index 57be935487..1bed4e7614 100644
@@ -1,4 +1,4 @@
-From 2ef9b371a5cc44e730143e694d71665831fac216 Mon Sep 17 00:00:00 2001
+From 0953b744b0257e26c170fb6d6b4c0f6210e4ae43 Mon Sep 17 00:00:00 2001
 From: Ed Bartosh <[email protected]>
 Date: Tue, 13 Jun 2017 14:55:52 +0300
 Subject: [PATCH] Disabled reading host configs.
@@ -6,16 +6,15 @@ Subject: [PATCH] Disabled reading host configs.
 Upstream-Status: Inappropriate [native]
 
 Signed-off-by: Ed Bartosh <[email protected]>
-
 ---
  config.c | 8 --------
  1 file changed, 8 deletions(-)
 
 diff --git a/config.c b/config.c
-index 2f6a297..3181ed7 100644
+index 358282b..8ebafb4 100644
 --- a/config.c
 +++ b/config.c
-@@ -844,14 +844,6 @@ void read_config(void)
+@@ -868,14 +868,6 @@ void read_config(void)
  	memcpy(devices, const_devices,
  	       nr_const_devices*sizeof(struct device));
  
meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch +5 -6
index 6ae91d6cb9..3771f94c59 100644
@@ -1,17 +1,16 @@
-From 3cf56b36db78679273f61ba78fbbf7f3fab52f68 Mon Sep 17 00:00:00 2001
+From 184b76e9742ff89f90a066edb0f46b4a150351cf Mon Sep 17 00:00:00 2001
 From: Marcin Juszkiewicz <[email protected]>
 Date: Fri, 8 Jun 2007 08:35:12 +0000
 Subject: [PATCH] mtools: imported from OE
 
 Upstream-Status: Inappropriate [licensing]
-
 ---
  Makefile.in  | 11 ++++++-----
  configure.in | 27 +++++++++++++++++++++++++++
  2 files changed, 33 insertions(+), 5 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
-index 616d59f..85b5b1d 100644
+index 5db50d7..92ad461 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -26,10 +26,11 @@ USERCFLAGS =
@@ -30,7 +29,7 @@ index 616d59f..85b5b1d 100644
  
  
  # do not edit below this line
-@@ -199,7 +200,7 @@ dvi: mtools.dvi
+@@ -185,7 +186,7 @@ dvi: mtools.dvi
  
  ps: mtools.ps
  %.ps: %.dvi
@@ -40,10 +39,10 @@ index 616d59f..85b5b1d 100644
  pdf: mtools.pdf
  %.pdf: %.texi sysconfdir.texi
 diff --git a/configure.in b/configure.in
-index 5ff75c1..c0f7440 100644
+index 1de916e..fd6cb08 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -35,6 +35,33 @@ AC_CANONICAL_SYSTEM
+@@ -32,6 +32,33 @@ AC_CANONICAL_TARGET
  AC_C_CONST
  AC_C_INLINE
  
meta/recipes-devtools/mtools/mtools_4.0.44.bb renamed from meta/recipes-devtools/mtools/mtools_4.0.43.bb +1 -1
similarity index 93%
rename from meta/recipes-devtools/mtools/mtools_4.0.43.bb
rename to meta/recipes-devtools/mtools/mtools_4.0.44.bb
index 859103979e..d8dd671be2 100644
@@ -24,7 +24,7 @@ RRECOMMENDS:${PN}:libc-glibc = "\
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[sha256sum] = "541e179665dc4e272b9602f2074243591a157da89cc47064da8c5829dbd2b339"
+SRC_URI[sha256sum] = "37dc4df022533c3d4b2ec1c78973c27c7e8b585374c2d46ab64c6a3db31eddb8"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
Signature · 1 line
2.43.0
#14 lore raw

PATCH 12/16 mtools: upgrade 4.0.44 -> 4.0.45

In reply to Steve Sakoman

From: Wang Mingyu <[email protected]>

Changelog:
============
- Fixed iconv descriptor leak
- Fixed size of error message buffer

(From OE-Core rev: cc1975888ffdc58655e80d3d14450cf68ee0f719)

---
 .../mtools/{mtools_4.0.44.bb => mtools_4.0.45.bb}               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/mtools/{mtools_4.0.44.bb => mtools_4.0.45.bb} (93%)
meta/recipes-devtools/mtools/mtools_4.0.45.bb renamed from meta/recipes-devtools/mtools/mtools_4.0.44.bb +1 -1
similarity index 93%
rename from meta/recipes-devtools/mtools/mtools_4.0.44.bb
rename to meta/recipes-devtools/mtools/mtools_4.0.45.bb
index d8dd671be2..34040d7a0d 100644
@@ -24,7 +24,7 @@ RRECOMMENDS:${PN}:libc-glibc = "\
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[sha256sum] = "37dc4df022533c3d4b2ec1c78973c27c7e8b585374c2d46ab64c6a3db31eddb8"
+SRC_URI[sha256sum] = "0b008a96bd0efe0e542fa4383d469af66bc4a93394990b103730a8160a67d618"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
Signature · 1 line
2.43.0
#15 lore raw

PATCH 13/16 mtools: upgrade 4.0.45 -> 4.0.46

In reply to Steve Sakoman

From: Wang Mingyu <[email protected]>

clang_UNUSED.patch
mtools-makeinfo.patch
refreshed for 4.0.46

Changelog:
=============
- iconv buffer overflow fixes
- removed references to mread and mwrite (obsolete subcommands from mcopy)
- documented mdoctorfat, and addressed 2 bugs/oversights
- removed references to obsolete mread and mwrite
- portability fixes (dietlibc and MacOS X) & simplification

(From OE-Core rev: f5a5b2372669d8be4ae3f19ed6892264ea3999d0)

---
 .../mtools/mtools/clang_UNUSED.patch             |  6 +++---
 .../mtools/mtools/mtools-makeinfo.patch          | 16 ++++++++--------
 .../{mtools_4.0.45.bb => mtools_4.0.46.bb}       |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)
 rename meta/recipes-devtools/mtools/{mtools_4.0.45.bb => mtools_4.0.46.bb} (93%)
meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch +3 -3
index 20a6d1b8b3..1420d84b86 100644
@@ -1,4 +1,4 @@
-From c72d075cb0c3a65ef17621c7ed1ffac35ca3b68e Mon Sep 17 00:00:00 2001
+From 6654edfb1eee416b58bcb6490658f80071a353c2 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 19 Sep 2018 11:55:41 -0700
 Subject: [PATCH] Undefine UNUSED macros with clang
@@ -10,10 +10,10 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/sysincludes.h b/sysincludes.h
-index e16ab45..8d285d4 100644
+index 6b322ff..48daecd 100644
 --- a/sysincludes.h
 +++ b/sysincludes.h
-@@ -98,7 +98,7 @@ typedef void *caddr_t;
+@@ -85,7 +85,7 @@ ac_cv_func_setpgrp_void=yes ../mtools/configure --build=i386-linux-gnu --host=i3
  #if defined __GNUC__ && defined __STDC__
  /* gcc -traditional doesn't have PACKED, UNUSED and NORETURN */
  # define PACKED __attribute__ ((packed))
meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch +8 -8
index 3771f94c59..8c80040f91 100644
@@ -1,4 +1,4 @@
-From 184b76e9742ff89f90a066edb0f46b4a150351cf Mon Sep 17 00:00:00 2001
+From fd1e84c66852c2c906ee292aad942b4bfbd9e306 Mon Sep 17 00:00:00 2001
 From: Marcin Juszkiewicz <[email protected]>
 Date: Fri, 8 Jun 2007 08:35:12 +0000
 Subject: [PATCH] mtools: imported from OE
@@ -6,11 +6,11 @@ Subject: [PATCH] mtools: imported from OE
 Upstream-Status: Inappropriate [licensing]
 ---
  Makefile.in  | 11 ++++++-----
- configure.in | 27 +++++++++++++++++++++++++++
+ configure.ac | 27 +++++++++++++++++++++++++++
  2 files changed, 33 insertions(+), 5 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
-index 5db50d7..92ad461 100644
+index 7b305b0..70c8c74 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -26,10 +26,11 @@ USERCFLAGS =
@@ -38,11 +38,11 @@ index 5db50d7..92ad461 100644
  
  pdf: mtools.pdf
  %.pdf: %.texi sysconfdir.texi
-diff --git a/configure.in b/configure.in
-index 1de916e..fd6cb08 100644
---- a/configure.in
-+++ b/configure.in
-@@ -32,6 +32,33 @@ AC_CANONICAL_TARGET
+diff --git a/configure.ac b/configure.ac
+index de108a8..0fd9ef0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,33 @@ AC_CANONICAL_TARGET
  AC_C_CONST
  AC_C_INLINE
  
meta/recipes-devtools/mtools/mtools_4.0.46.bb renamed from meta/recipes-devtools/mtools/mtools_4.0.45.bb +1 -1
similarity index 93%
rename from meta/recipes-devtools/mtools/mtools_4.0.45.bb
rename to meta/recipes-devtools/mtools/mtools_4.0.46.bb
index 34040d7a0d..1173718662 100644
@@ -24,7 +24,7 @@ RRECOMMENDS:${PN}:libc-glibc = "\
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[sha256sum] = "0b008a96bd0efe0e542fa4383d469af66bc4a93394990b103730a8160a67d618"
+SRC_URI[sha256sum] = "9aad8dd859f88fb7787924ec47590192d3abf7bad6c840509c854290d6bc16c0"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
Signature · 1 line
2.43.0
#16 lore raw

PATCH 14/16 mtools: upgrade 4.0.46 -> 4.0.47

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

(From OE-Core rev: 14ef270cc003646e6ca97ff3405507f2b9e92736)

---
 meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch      | 2 +-
 .../mtools/mtools/disable-hardcoded-configs.patch           | 4 ++--
 meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch   | 6 +++---
 .../mtools/{mtools_4.0.46.bb => mtools_4.0.47.bb}           | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
 rename meta/recipes-devtools/mtools/{mtools_4.0.46.bb => mtools_4.0.47.bb} (93%)
meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch +1 -1
index 1420d84b86..2f3c452420 100644
@@ -1,4 +1,4 @@
-From 6654edfb1eee416b58bcb6490658f80071a353c2 Mon Sep 17 00:00:00 2001
+From d8e9cf472f49c8dbb3b0855145974d199a83e8a4 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 19 Sep 2018 11:55:41 -0700
 Subject: [PATCH] Undefine UNUSED macros with clang
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch +2 -2
index 1bed4e7614..1b3c3e003d 100644
@@ -1,4 +1,4 @@
-From 0953b744b0257e26c170fb6d6b4c0f6210e4ae43 Mon Sep 17 00:00:00 2001
+From 4e51cf33fc34e8e82661b9bc3ab13858a2ffe43d Mon Sep 17 00:00:00 2001
 From: Ed Bartosh <[email protected]>
 Date: Tue, 13 Jun 2017 14:55:52 +0300
 Subject: [PATCH] Disabled reading host configs.
@@ -11,7 +11,7 @@ Signed-off-by: Ed Bartosh <[email protected]>
  1 file changed, 8 deletions(-)
 
 diff --git a/config.c b/config.c
-index 358282b..8ebafb4 100644
+index 436c94b..794f098 100644
 --- a/config.c
 +++ b/config.c
 @@ -868,14 +868,6 @@ void read_config(void)
meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch +3 -3
index 8c80040f91..fb7ba56eec 100644
@@ -1,4 +1,4 @@
-From fd1e84c66852c2c906ee292aad942b4bfbd9e306 Mon Sep 17 00:00:00 2001
+From b517158e8ffc6a665506007b20708d6c2589cec1 Mon Sep 17 00:00:00 2001
 From: Marcin Juszkiewicz <[email protected]>
 Date: Fri, 8 Jun 2007 08:35:12 +0000
 Subject: [PATCH] mtools: imported from OE
@@ -39,10 +39,10 @@ index 7b305b0..70c8c74 100644
  pdf: mtools.pdf
  %.pdf: %.texi sysconfdir.texi
 diff --git a/configure.ac b/configure.ac
-index de108a8..0fd9ef0 100644
+index 37f0d00..c93cfb5 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -33,6 +33,33 @@ AC_CANONICAL_TARGET
+@@ -36,6 +36,33 @@ AC_PATH_PROG(INSTALL_INFO, install-info, "")
  AC_C_CONST
  AC_C_INLINE
  
meta/recipes-devtools/mtools/mtools_4.0.47.bb renamed from meta/recipes-devtools/mtools/mtools_4.0.46.bb +1 -1
similarity index 93%
rename from meta/recipes-devtools/mtools/mtools_4.0.46.bb
rename to meta/recipes-devtools/mtools/mtools_4.0.47.bb
index 1173718662..70d6579621 100644
@@ -24,7 +24,7 @@ RRECOMMENDS:${PN}:libc-glibc = "\
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[sha256sum] = "9aad8dd859f88fb7787924ec47590192d3abf7bad6c840509c854290d6bc16c0"
+SRC_URI[sha256sum] = "31aa06078cc3f50591b95e71a909c56dd179d87e9cbdc07bf435e595bd7cc7ff"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
Signature · 1 line
2.43.0
#17 lore raw

PATCH 15/16 mtools: upgrade 4.0.47 -> 4.0.48

In reply to Steve Sakoman

From: Wang Mingyu <[email protected]>

clang_UNUSED.patch
disable-hardcoded-configs.patch
refreshed for 4.0.48

(From OE-Core rev: 1d5aee7e67cd614073a15b47b832375428865260)

---
 meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch      | 6 +++---
 .../mtools/mtools/disable-hardcoded-configs.patch           | 6 +++---
 .../mtools/{mtools_4.0.47.bb => mtools_4.0.48.bb}           | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
 rename meta/recipes-devtools/mtools/{mtools_4.0.47.bb => mtools_4.0.48.bb} (93%)
meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch +3 -3
index 2f3c452420..ddf3706f51 100644
@@ -1,4 +1,4 @@
-From d8e9cf472f49c8dbb3b0855145974d199a83e8a4 Mon Sep 17 00:00:00 2001
+From 6914c6e15cd15daf1dae81458e5346958c9d5449 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 19 Sep 2018 11:55:41 -0700
 Subject: [PATCH] Undefine UNUSED macros with clang
@@ -10,10 +10,10 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/sysincludes.h b/sysincludes.h
-index 6b322ff..48daecd 100644
+index 272b316..49ee5ae 100644
 --- a/sysincludes.h
 +++ b/sysincludes.h
-@@ -85,7 +85,7 @@ ac_cv_func_setpgrp_void=yes ../mtools/configure --build=i386-linux-gnu --host=i3
+@@ -98,7 +98,7 @@ ac_cv_func_setpgrp_void=yes ../mtools/configure --build=i386-linux-gnu --host=i3
  #if defined __GNUC__ && defined __STDC__
  /* gcc -traditional doesn't have PACKED, UNUSED and NORETURN */
  # define PACKED __attribute__ ((packed))
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch +3 -3
index 1b3c3e003d..63992ac547 100644
@@ -1,4 +1,4 @@
-From 4e51cf33fc34e8e82661b9bc3ab13858a2ffe43d Mon Sep 17 00:00:00 2001
+From 16969d42ec6514883bcee87cc89b3e7864481d7e Mon Sep 17 00:00:00 2001
 From: Ed Bartosh <[email protected]>
 Date: Tue, 13 Jun 2017 14:55:52 +0300
 Subject: [PATCH] Disabled reading host configs.
@@ -11,10 +11,10 @@ Signed-off-by: Ed Bartosh <[email protected]>
  1 file changed, 8 deletions(-)
 
 diff --git a/config.c b/config.c
-index 436c94b..794f098 100644
+index 2433457..3972150 100644
 --- a/config.c
 +++ b/config.c
-@@ -868,14 +868,6 @@ void read_config(void)
+@@ -849,14 +849,6 @@ void read_config(void)
  	memcpy(devices, const_devices,
  	       nr_const_devices*sizeof(struct device));
  
meta/recipes-devtools/mtools/mtools_4.0.48.bb renamed from meta/recipes-devtools/mtools/mtools_4.0.47.bb +1 -1
similarity index 93%
rename from meta/recipes-devtools/mtools/mtools_4.0.47.bb
rename to meta/recipes-devtools/mtools/mtools_4.0.48.bb
index 70d6579621..646735f3b3 100644
@@ -24,7 +24,7 @@ RRECOMMENDS:${PN}:libc-glibc = "\
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[sha256sum] = "31aa06078cc3f50591b95e71a909c56dd179d87e9cbdc07bf435e595bd7cc7ff"
+SRC_URI[sha256sum] = "03c29aac8735dd7154a989fbc29eaf2b506121ae1c3a35cd0bf2a02e94d271a9"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
Signature · 1 line
2.43.0
#18 lore raw

PATCH 16/16 mtools: upgrade 4.0.48 -> 4.0.49

In reply to Steve Sakoman

From: Jinfeng Wang <[email protected]>

New version includes check for overlong file names, see [1].

[1] https://lists.gnu.org/archive/html/info-mtools/2025-06/msg00005.html

(From OE-Core rev: 044c2bceefcc12262cb2421e8f1da5f6c2ed9f72)

---
 .../mtools/{mtools_4.0.48.bb => mtools_4.0.49.bb}               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/mtools/{mtools_4.0.48.bb => mtools_4.0.49.bb} (93%)
meta/recipes-devtools/mtools/mtools_4.0.49.bb renamed from meta/recipes-devtools/mtools/mtools_4.0.48.bb +1 -1
similarity index 93%
rename from meta/recipes-devtools/mtools/mtools_4.0.48.bb
rename to meta/recipes-devtools/mtools/mtools_4.0.49.bb
index 646735f3b3..294b2f37b2 100644
@@ -24,7 +24,7 @@ RRECOMMENDS:${PN}:libc-glibc = "\
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[sha256sum] = "03c29aac8735dd7154a989fbc29eaf2b506121ae1c3a35cd0bf2a02e94d271a9"
+SRC_URI[sha256sum] = "6fe5193583d6e7c59da75e63d7234f76c0b07caf33b103894f46f66a871ffc9f"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
Signature · 1 line
2.43.0
#4 lore raw

Re: [OE-core][scarthgap 03/16] binutils: Fix CVE-2025-7545

In reply to Steve Sakoman

meta/recipes-devtools/binutils/binutils-2.42.inc SRC_URI = "\ · line 61

Quoted 12 lines · Steve Sakoman via lists.openembedded.org
meta/recipes-devtools/binutils/binutils-2.42.inc +4 -0
@@ -53,6 +53,10 @@ SRC_URI = "\
      file://CVE-2025-1179.patch \
      file://0022-CVE-2025-5245.patch \
      file://0022-CVE-2025-5244.patch \
+<<<<<<< HEAD
      file://0023-CVE-2025-7546.patch \
+=======
+     file://0023-CVE-2025-7545.patch \
+>>>>>>> binutils: Fix CVE-2025-7545
 "

This looks like a merge conflict.

#5 lore raw

Re: [OE-core][scarthgap 03/16] binutils: Fix CVE-2025-7545

Quoted 16 lines · Gyorgy Sarvari

meta/recipes-devtools/binutils/binutils-2.42.inc SRC_URI = "\ · line 61

Quoted 12 lines · Steve Sakoman via lists.openembedded.org
meta/recipes-devtools/binutils/binutils-2.42.inc +4 -0
@@ -53,6 +53,10 @@ SRC_URI = "\
      file://CVE-2025-1179.patch \
      file://0022-CVE-2025-5245.patch \
      file://0022-CVE-2025-5244.patch \
+<<<<<<< HEAD
      file://0023-CVE-2025-7546.patch \
+=======
+     file://0023-CVE-2025-7545.patch \
+>>>>>>> binutils: Fix CVE-2025-7545
 "

This looks like a merge conflict.

Hmmm . . . I remember fixing that!

I'll send a V2 of the series.

Thanks so much for reviewing!

Steve