From a8d44a99cb0acec6257d8e6309ea54144dea6ecb Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Fri, 17 Jul 2026 12:02:42 +0530 Subject: [PATCH] Update libnvme to version 1.16.2 Resolves: RHEL-212863 Signed-off-by: Utkarsh Singh --- .gitignore | 1 + ...ter-dereference-in-nvme_host_get_ids.patch | 38 ------------------- libnvme.spec | 12 +++--- sources | 2 +- 4 files changed, 9 insertions(+), 44 deletions(-) delete mode 100644 0002-tree-Fix-potential-NULL-pointer-dereference-in-nvme_host_get_ids.patch diff --git a/.gitignore b/.gitignore index 08d5b7e..d40394e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /libnvme-1.13.tar.gz /libnvme-1.15.tar.gz /libnvme-1.16.1.tar.gz +/libnvme-1.16.2.tar.gz diff --git a/0002-tree-Fix-potential-NULL-pointer-dereference-in-nvme_host_get_ids.patch b/0002-tree-Fix-potential-NULL-pointer-dereference-in-nvme_host_get_ids.patch deleted file mode 100644 index fbf28d2..0000000 --- a/0002-tree-Fix-potential-NULL-pointer-dereference-in-nvme_host_get_ids.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d65b44cd0a2cde7aba895c7c9f9c9fff198ead99 Mon Sep 17 00:00:00 2001 -From: Stephen Cheng -Date: Thu, 20 Nov 2025 13:11:03 +0800 -Subject: [PATCH] tree: Fix potential NULL pointer dereference in - nvme_host_get_ids() - -The nvme_host_get_hostid() and nvme_host_get_hostnqn() functions can -return NULL when the host configuration is incomplete or invalid. Using -strdup() directly on these return values causes a segmentation fault -when NULL is passed to strdup(). - -Replace strdup() calls with xstrdup() to safely handle NULL input -values. - -Signed-off-by: Stephen Cheng ---- - src/nvme/tree.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/nvme/tree.c b/src/nvme/tree.c -index bc836487..c363cd13 100644 ---- a/src/nvme/tree.c -+++ b/src/nvme/tree.c -@@ -145,9 +145,9 @@ int nvme_host_get_ids(nvme_root_t r, - h = nvme_first_host(r); - if (h) { - if (!hid) -- hid = strdup(nvme_host_get_hostid(h)); -+ hid = xstrdup(nvme_host_get_hostid(h)); - if (!hnqn) -- hnqn = strdup(nvme_host_get_hostnqn(h)); -+ hnqn = xstrdup(nvme_host_get_hostnqn(h)); - } - - /* /etc/nvme/hostid and/or /etc/nvme/hostnqn */ --- -2.54.0 - diff --git a/libnvme.spec b/libnvme.spec index e6b3da2..0deabfd 100644 --- a/libnvme.spec +++ b/libnvme.spec @@ -3,13 +3,12 @@ Name: libnvme Summary: Linux-native nvme device management library -Version: 1.16.1 -Release: 4%{?dist} +Version: 1.16.2 +Release: 1%{?dist} License: LGPL-2.1-or-later URL: https://github.com/linux-nvme/libnvme Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz Patch0: 0001-tree-cleanup-paths-when-freeing-namespace.patch -Patch1: 0002-tree-Fix-potential-NULL-pointer-dereference-in-nvme_host_get_ids.patch BuildRequires: gcc gcc-c++ BuildRequires: swig @@ -78,9 +77,9 @@ rm -r %{buildroot}%{_pkgdocdir}/html/{.buildinfo,.doctrees/} %files %license COPYING ccan/licenses/* %{_libdir}/libnvme.so.1 -%{_libdir}/libnvme.so.1.16.1 +%{_libdir}/libnvme.so.1.16.2 %{_libdir}/libnvme-mi.so.1 -%{_libdir}/libnvme-mi.so.1.16.1 +%{_libdir}/libnvme-mi.so.1.16.2 %files devel %{_libdir}/libnvme.so @@ -100,6 +99,9 @@ rm -r %{buildroot}%{_pkgdocdir}/html/{.buildinfo,.doctrees/} %{python3_sitearch}/libnvme/* %changelog +* Thu Jul 17 2026 Utkarsh Singh - 1.16.2-1 +- Update libnvme to version 1.16.2 (RHEL-212863) + * Tue Jun 30 2026 Utkarsh Singh - 1.16.1-4 - Fix potential NULL pointer dereference in nvme_host_get_ids (RHEL-181034) diff --git a/sources b/sources index c239484..3a97390 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libnvme-1.16.1.tar.gz) = 92113cd62af53366fb63f2f385c2059dede171fef4d9a240fa941382e338d2941e90aeb40ae2d202311d7b531e41181839f45f8ab4da1b3a79ce4b597fcd4993 +SHA512 (libnvme-1.16.2.tar.gz) = e3a4b6d4906e7dc5f894042adc6490bc7e71bf096d39f216c8c742bc5c527a701a87cb3ee8eea305fa557d1b312513c3394f7d6030000e320a2d668c53215fb5