Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package PackageKit for openSUSE:Factory 
checked in at 2026-11-13 20:12:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/PackageKit (Old)
 and      /work/SRC/openSUSE:Factory/.PackageKit.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "PackageKit"

Fri Nov 13 20:12:27 2026 rev:251 rq:1396744 version:1.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/PackageKit/PackageKit.changes    2026-10-14 
18:34:29.377271745 +0200
+++ /work/SRC/openSUSE:Factory/.PackageKit.new.1251/PackageKit.changes  
2026-11-13 20:12:38.938224609 +0100
@@ -1,0 +2,9 @@
+Sat Oct 10 07:21:30 UTC 2026 - Jonathan Kang <[email protected]>
+
+- Add PackageKit-CVE-2026-104619.patch: zypp: Add version checks
+  when updating packages (bsc#1284389, CVE-2026-104619).
+- Add PackageKit-CVE-2026-104620.patch: zypp: sanitize RPM tag name
+  to prevent path traversal in temp files
+  (bsc#1284954, CVE-2026-104620).
+
+-------------------------------------------------------------------

New:
----
  PackageKit-CVE-2026-104619.patch
  PackageKit-CVE-2026-104620.patch

----------(New B)----------
  New:
- Add PackageKit-CVE-2026-104619.patch: zypp: Add version checks
  when updating packages (bsc#1284389, CVE-2026-104619).
  New:  when updating packages (bsc#1284389, CVE-2026-104619).
- Add PackageKit-CVE-2026-104620.patch: zypp: sanitize RPM tag name
  to prevent path traversal in temp files
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ PackageKit.spec ++++++
--- /var/tmp/diff_new_pack.cAel5E/_old  2026-11-13 20:12:40.321283154 +0100
+++ /var/tmp/diff_new_pack.cAel5E/_new  2026-11-13 20:12:40.325283323 +0100
@@ -42,6 +42,10 @@
 Patch0:         PackageKit-systemd-timers.patch
 # PATCH-FIX-OPENSUSE PackageKit-remove-polkit-rules.patch bsc#1125434 
[email protected] -- Remove polkit rules file
 Patch1:         PackageKit-remove-polkit-rules.patch
+# PATCH-FIX-UPSTREAM PackageKit-CVE-2026-104619.patch bsc#1284389, 
CVE-2026-104619 [email protected] -- zypp: Add version checks when updating 
packages
+Patch2:        PackageKit-CVE-2026-104619.patch
+# PATCH-FIX-UPSTREAM PackageKit-CVE-2026-104620.patch bsc#1284954, 
CVE-2026-104620 [email protected] -- zypp: sanitize RPM tag name to prevent path 
traversal in temp files
+Patch3:        PackageKit-CVE-2026-104620.patch
 
 BuildRequires:  docbook5-xsl-stylesheets
 BuildRequires:  fdupes


++++++ PackageKit-CVE-2026-104619.patch ++++++
>From adba95b0a6293f44a3abe46d38f951f2e89cbaea Mon Sep 17 00:00:00 2001
From: Jonathan Kang <[email protected]>
Date: Thu, 8 Oct 2026 15:58:33 +0800
Subject: [PATCH] zypp: Add version checks when updating packages

This prevents users installing older versions without any authorization.

Factor the version comparison shared with InstallPackages out into
zypp_get_version_relation(), and fix it on the way:

 - Compare against installed instances of every arch. A package replaces
   an installed one with the same name whatever its arch, so filtering by
   arch let e.g. an older noarch build replace a newer x86_64 one.
 - Make the result independent of iteration order when several versions
   are installed (multiversion packages): an equal edition wins, otherwise
   compare against the highest installed edition.

Tumbleweed is not covered as UpdatePackages performs a dup-style upgrade
there, where the user cannot pick package versions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 backends/zypp/pk-backend-zypp.cpp | 136 ++++++++++++++++++++----------
 1 file changed, 92 insertions(+), 44 deletions(-)

diff --git a/backends/zypp/pk-backend-zypp.cpp 
b/backends/zypp/pk-backend-zypp.cpp
index 9de7b5327..2c014c4d7 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -2885,6 +2885,51 @@ pk_backend_get_update_detail (PkBackend *backend, 
PkBackendJob *job, gchar **pac
        pk_backend_job_thread_create (job, backend_get_update_detail_thread, 
NULL, NULL);
 }
 
+/**
+ * zypp_get_version_relation:
+ *
+ * Compares @solvable against every installed instance of the same package.
+ * Installing a package replaces any installed one with the same name,
+ * whatever its arch, so all installed arches are taken into account.
+ *
+ * Returns EQUAL_VERSION if any installed instance has the same edition,
+ * OLDER_VERSION if the highest installed edition is newer than @solvable
+ * (stored in @latest_installed), and NEWER_VERSION otherwise.
+ */
+static VersionRelation
+zypp_get_version_relation (const sat::Solvable &solvable, sat::Solvable 
*latest_installed)
+{
+       ui::Selectable::Ptr sel (ui::Selectable::get (solvable));
+       sat::Solvable latest = sat::Solvable::noSolvable;
+
+       if (!sel)
+               return NEWER_VERSION;
+
+       for_ (it, sel->installedBegin (), sel->installedEnd ()) {
+               sat::Solvable inst = it->satSolvable ();
+
+               if (inst.arch() != solvable.arch() && inst.arch() != "noarch" 
&& solvable.arch() != "noarch")
+                       continue;
+
+               gint ret = inst.edition ().compare (solvable.edition ());
+
+               if (ret == 0)
+                       return EQUAL_VERSION;
+
+               if (ret > 0 &&
+                   (zypp_is_no_solvable (latest) ||
+                    latest.edition ().compare (inst.edition ()) < 0))
+                       latest = inst;
+       }
+
+       if (zypp_is_no_solvable (latest))
+               return NEWER_VERSION;
+
+       if (latest_installed)
+               *latest_installed = latest;
+       return OLDER_VERSION;
+}
+
 static void
 backend_install_packages_thread (PkBackendJob *job, GVariant *params, gpointer 
user_data)
 {
@@ -2921,12 +2966,8 @@ backend_install_packages_thread (PkBackendJob *job, 
GVariant *params, gpointer u
 
                for (guint i = 0; package_ids[i]; i++) {
                        MIL << package_ids[i] << endl;
-                       g_auto(GStrv) split = NULL;
-                       gint ret;
                        sat::Solvable solvable = zypp_get_package_by_id 
(package_ids[i]);
-                       sat::Solvable *inst_pkg = NULL;
-                       sat::Solvable *latest_pkg = NULL;
-                       vector<sat::Solvable> installed;
+                       sat::Solvable latest_installed = 
sat::Solvable::noSolvable;
 
                        if (zypp_is_no_solvable(solvable)) {
                                // Previously stored package_id no longer 
matches any solvable.
@@ -2935,36 +2976,7 @@ backend_install_packages_thread (PkBackendJob *job, 
GVariant *params, gpointer u
                                return;
                        }
 
-                       split = pk_package_id_split (package_ids[i]);
-                       ui::Selectable::Ptr sel (ui::Selectable::get 
(ResKind::package,
-                                                                     
split[PK_PACKAGE_ID_NAME]));
-                       if (sel && !sel->installedEmpty ()) {
-                               for_ (it, sel->installedBegin (), 
sel->installedEnd ()) {
-                                       if (it->satSolvable ().arch ().compare 
(Arch (split[PK_PACKAGE_ID_ARCH])) == 0) {
-                                               installed.push_back 
((it->satSolvable ()));
-                                       }
-                               }
-                       }
-
-                       VersionRelation relation = NEWER_VERSION;
-
-                       for (guint j = 0; j < installed.size (); j++) {
-                               inst_pkg = &installed.at (j);
-                               ret = inst_pkg->edition ().compare (Edition 
(split[PK_PACKAGE_ID_VERSION]));
-
-                               if (ret < 0) {
-                                       relation = NEWER_VERSION;
-                               } else if (relation != EQUAL_VERSION && ret > 
0) {
-                                       relation = OLDER_VERSION;
-                                       if (!latest_pkg ||
-                                           latest_pkg->edition ().compare 
(inst_pkg->edition ()) < 0) {
-                                               latest_pkg = inst_pkg;
-                                       }
-                               } else if (ret == 0) {
-                                       relation = EQUAL_VERSION;
-                                       break;
-                               }
-                       }
+                       VersionRelation relation = zypp_get_version_relation 
(solvable, &latest_installed);
 
                        if (relation == EQUAL_VERSION &&
                            !pk_bitfield_contain (transaction_flags,
@@ -2975,16 +2987,17 @@ backend_install_packages_thread (PkBackendJob *job, 
GVariant *params, gpointer u
                        if (relation == OLDER_VERSION &&
                            !pk_bitfield_contain (transaction_flags,
                                                  
PK_TRANSACTION_FLAG_ENUM_ALLOW_DOWNGRADE)) {
-                               pk_backend_job_error_code (job,
-                                                          
PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED,
-                                                          "higher version 
\"%s\" of package %s.%s is already installed",
-                                                          latest_pkg ? 
latest_pkg->edition ().version ().c_str () : "<NULL>",
-                                                          
split[PK_PACKAGE_ID_NAME],
-                                                          
split[PK_PACKAGE_ID_ARCH]);
+                               zypp_backend_finished_error (job,
+                                                            
PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED,
+                                                            "higher version 
\"%s\" of package %s.%s is already installed",
+                                                            
latest_installed.edition ().asString ().c_str (),
+                                                            
latest_installed.name ().c_str (),
+                                                            
latest_installed.arch ().c_str ());
                                return;
                        }
 
-                       if (relation != EQUAL_VERSION && installed.size() > 0 &&
+                       ui::Selectable::Ptr sel (ui::Selectable::get 
(solvable));
+                       if (relation != EQUAL_VERSION && sel && 
!sel->installedEmpty () &&
                            pk_bitfield_contain (transaction_flags,
                                                 
PK_TRANSACTION_FLAG_ENUM_JUST_REINSTALL)) {
                                pk_backend_job_error_code (job,
@@ -3665,6 +3678,7 @@ backend_update_packages_thread (PkBackendJob *job, 
GVariant *params, gpointer us
                return;
        }
 
+       guint to_update = 0;
        for (guint i = 0; package_ids[i]; i++) {
                sat::Solvable solvable = zypp_get_package_by_id 
(package_ids[i]);
 
@@ -3680,13 +3694,37 @@ backend_update_packages_thread (PkBackendJob *job, 
GVariant *params, gpointer us
                PoolItem item(solvable);
                // patches are special - they are not installed and can't have 
update candidates
                if (sel->kind() != ResKind::patch) {
+                       sat::Solvable latest_installed = 
sat::Solvable::noSolvable;
+                       VersionRelation relation;
+
                        MIL << "sel " << sel->kind() << " " << sel->ident() << 
endl;
                        if (sel->installedEmpty()) {
-                               zypp_backend_finished_error (job, 
PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "Package %s is not installed", 
package_ids[i]);
+                               zypp_backend_finished_error (job, 
PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, "Package %s is not installed", 
package_ids[i]);
+                               return;
+                       }
+
+                       relation = zypp_get_version_relation (solvable, 
&latest_installed);
+
+                       if (relation == EQUAL_VERSION &&
+                           !pk_bitfield_contain (transaction_flags,
+                                                 
PK_TRANSACTION_FLAG_ENUM_ALLOW_REINSTALL)) {
+                               continue;
+                       }
+
+                       if (relation == OLDER_VERSION &&
+                           !pk_bitfield_contain (transaction_flags,
+                                                 
PK_TRANSACTION_FLAG_ENUM_ALLOW_DOWNGRADE)) {
+                               zypp_backend_finished_error (job,
+                                                            
PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED,
+                                                            "higher version 
\"%s\" of package %s.%s is already installed",
+                                                            
latest_installed.edition ().asString ().c_str (),
+                                                            
latest_installed.name ().c_str (),
+                                                            
latest_installed.arch ().c_str ());
                                return;
                        }
                }
 
+               to_update++;
                item.status ().setToBeInstalled (ResStatus::USER);
                Patch::constPtr patch = asKind<Patch>(item.resolvable ());
                zypp_check_restart (&restart, patch);
@@ -3696,7 +3734,17 @@ backend_update_packages_thread (PkBackendJob *job, 
GVariant *params, gpointer us
                }
        }
 
-       zypp_perform_execution (job, zypp, UPDATE, FALSE, transaction_flags);
+       if (!to_update) {
+               zypp_backend_finished_error (
+                       job, PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED,
+                       "The packages are already all installed");
+               return;
+       }
+
+       if (!zypp_perform_execution (job, zypp, UPDATE, FALSE, 
transaction_flags))
+               return;
+
+       pk_backend_job_set_percentage (job, 100);
 }
 
 /**
-- 
2.55.0


++++++ PackageKit-CVE-2026-104620.patch ++++++
>From 7536b543ce28f25d71c1831ce8d794bc52c79212 Mon Sep 17 00:00:00 2001
From: Jonathan Kang <[email protected]>
Date: Sat, 10 Oct 2026 11:09:03 +0800
Subject: [PATCH] zypp: sanitize RPM tag name to prevent path traversal in temp
 files

Extracted RPM header tag names (`rpmHeader->tag_name()`) were used directly
in path concatenation when copying RPM files to `tmpDir`. A crafted or
malicious RPM containing directory traversal sequences (e.g., `../../`)
in its name tag could cause the backend to write outside the intended
temporary directory. When running elevated, this allowed replacing
arbitrary system files.

Fix this by:
1. Stripping path components from `rpmHeader->tag_name()` using string
manipulation.
2. Validating that the resolved `zypp::Pathname` remains directly inside
`tmpDir`.
3. Rejecting operations that fail boundary validation before copying.

Fixes: CVE-2026-104620
---
 backends/zypp/pk-backend-zypp.cpp | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/backends/zypp/pk-backend-zypp.cpp 
b/backends/zypp/pk-backend-zypp.cpp
index 2c014c4d7..6d90326bf 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -2713,12 +2713,30 @@ backend_install_files_thread (PkBackendJob *job, 
GVariant *params, gpointer user
                        return;
                }
 
-               // copy the rpm into tmpdir
-               string tempDest = tmpDir.path ().asString () + "/" + 
rpmHeader->tag_name () + ".rpm";
-               if (zypp::filesystem::copy (full_paths[i], tempDest) != 0) {
-                       zypp_backend_finished_error (
-                               job, PK_ERROR_ENUM_LOCAL_INSTALL_FAILED,
-                               "Could not copy the rpm-file into the 
temp-dir");
+               /*
+                * Copy the rpm into tmpdir.
+                * Sanitize the tag name to retain only the base filename, and
+                * the destination path stays within the /tmp directory before
+                * copying files to the target directory.
+                */
+               string raw_name = rpmHeader->tag_name();
+               size_t last_slash = raw_name.find_last_of("/\\");
+               if (last_slash != string::npos) {
+                       raw_name = raw_name.substr(last_slash + 1);
+               }
+
+               zypp::Pathname safeDest = tmpDir.path() / (raw_name + ".rpm");
+               if (safeDest.dirname() != tmpDir.path()) {
+                       zypp_backend_finished_error (job,
+                                                    
PK_ERROR_ENUM_LOCAL_INSTALL_FAILED,
+                                                    "Invalid RPM name tag: 
path traversal detected");
+                       return;
+               }
+
+               if (zypp::filesystem::copy (full_paths[i], safeDest.asString()) 
!= 0) {
+                       zypp_backend_finished_error (job,
+                                                    
PK_ERROR_ENUM_LOCAL_INSTALL_FAILED,
+                                                    "Could not copy the 
rpm-file into the temp-dir");
                        return;
                }
        }
-- 
2.55.0



++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.cAel5E/_old  2026-11-13 20:12:40.515291366 +0100
+++ /var/tmp/diff_new_pack.cAel5E/_new  2026-11-13 20:12:40.526291832 +0100
@@ -1,7 +1,7 @@
-mtime: 1791471552
-commit: 2c235c551628fa855eaca5b0e9caeeaddb7d6d42e2c694fc9989cde30e4cd20d
+mtime: 1794359040
+commit: b6efaca9ac887ec0431049453987a19d606aa5cafd8aa617029b491a13afeea1
 url: https://src.opensuse.org/GNOME/PackageKit
-revision: 2c235c551628fa855eaca5b0e9caeeaddb7d6d42e2c694fc9989cde30e4cd20d
+revision: b6efaca9ac887ec0431049453987a19d606aa5cafd8aa617029b491a13afeea1
 trackingbranch: factory
 projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-11-11 02:04:00.000000000 +0100
@@ -0,0 +1,4 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild

Reply via email to