Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

@ -1 +1 @@
8a0ee8a4693faef7232c7370d5c90a7806413edc SOURCES/fcoe-utils-1.0.34-14ef0d2.tar.gz
4310acd864ca374d849f63e6cd982c9a1e6f9484 SOURCES/fcoe-utils-1.0.34-b233050.tar.gz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/fcoe-utils-1.0.34-14ef0d2.tar.gz
SOURCES/fcoe-utils-1.0.34-b233050.tar.gz

@ -0,0 +1,95 @@
From c54147b3ada8c37a536a4df90e8707538021ed20 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Fri, 4 Feb 2022 09:21:47 -0800
Subject: [PATCH 1/1] fcoemon: add snprintf string precision modifiers in
fcm_netif_advance
GCC 12 is warning of potential snprintf truncations
fcm_netif.ifname is an IFNAMSIZ array, but formating with %s doesn't
understand that, so add a precision modifier every time we print it to
limit the output. This allows the compiler to verify that the output
buffer is of sufficient length to never truncate.
Signed-off-by: Chris Leech <cleech@redhat.com>
---
fcoemon.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/fcoemon.c b/fcoemon.c
index 8c08bc5a032..b85f276c7df 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -3135,55 +3135,55 @@ static void fcm_netif_advance(struct fcm_netif *ff)
case FCD_ERROR:
break;
case FCD_GET_DCB_STATE:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_CONFIG, FEATURE_DCB, 0,
- (u_int) strlen(ff->ifname), ff->ifname);
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname);
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_SEND_CONF:
snprintf(params, sizeof(params), "%x1%x02",
ff->ff_app_info.enable,
ff->ff_app_info.willing);
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_SET_CONFIG, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, params);
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, params);
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_PFC_CONFIG:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_CONFIG, FEATURE_PFC, 0,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_APP_CONFIG:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_CONFIG, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_PFC_OPER:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_OPER, FEATURE_PFC, 0,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_APP_OPER:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_OPER, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_PEER:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_PEER, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_DONE:
--
2.34.1

@ -0,0 +1,34 @@
From 78a5e2e17bba531b41101ca036a5bb1a0d5caca5 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 6 Feb 2024 21:15:33 -0500
Subject: [PATCH 2/2] Don't attempt to memcpy() zero bytes
add_rtattr_nest() is called in several places in the code. As part of
its operation, it calls add_rtattr(nm type, NULL, 0) which results in
NULL and 0 being passed to memcpy(). This fails with -Werror=nonnull
on recent GCC.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
lib/rtnetlink.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c
index 3b8413718997568a20752791807b19c1f299955e..faa60d7c12f68af175d223b6c3c3257a982e4f37 100644
--- a/lib/rtnetlink.c
+++ b/lib/rtnetlink.c
@@ -172,7 +172,10 @@ static void add_rtattr(struct nlmsghdr *n, int type, const void *data, int alen)
rta->rta_type = type;
rta->rta_len = len;
- memcpy(RTA_DATA(rta), data, alen);
+ if (alen > 0)
+ {
+ memcpy(RTA_DATA(rta), data, alen);
+ }
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len);
}
--
2.43.0

@ -1,15 +1,15 @@
# https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
%global _hardened_build 1
# v1.0.34
%global commit0 14ef0d24c0657e56c68360afcfe64034d37323e0
# v1.0.34-2
%global commit0 b233050792cc5fa54ba1da257706ca2b5ef3c987
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Name: fcoe-utils
Version: 1.0.34
Release: 0.git%{shortcommit0}%{?dist}
Release: 11.git%{shortcommit0}%{?dist}
Summary: Fibre Channel over Ethernet utilities
License: GPLv2
License: GPL-2.0-only
URL: http://www.open-fcoe.org
Source0: https://github.com/openSUSE/fcoe-utils/archive/%{commit0}.tar.gz#/%{name}-%{version}-%{shortcommit0}.tar.gz
ExcludeArch: ppc s390
@ -27,6 +27,14 @@ Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Patch1: 0001-fcoemon-add-snprintf-string-precision-modifiers-in-f.patch
# https://github.com/openSUSE/fcoe-utils/pull/25
Patch2: 0002-Don-t-attempt-to-memcpy-zero-bytes.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
%description
Fibre Channel over Ethernet utilities
fcoeadm - command line tool for configuring FCoE interfaces
@ -78,17 +86,56 @@ done
%{_libexecdir}/fcoe/
%changelog
* Thu Sep 09 2021 Chris Leech <cleech@redhat.com> - 1.0.34-0.git14ef0d2
- upstream 1.0.34
- drop gcc warning diabling patch, upstream fixes exist for these issues now
- #1961180 FCoE interface name regressions
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.0.34-11.gitb233050
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.0.34-10.gitb233050
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.0.34-10.gitb233050
- Bump release for June 2024 mass rebuild
* Tue Feb 06 2024 Stephen Gallagher <sgallagh@redhat.com> - 1.0.34-9.gitb233050
- FTBFS: Don't attempt to memcpy() zero bytes
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-8.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-7.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.33-7.git848bcc6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Oct 30 2023 Chris Leech <cleech@redhat.com> - 1.0.34-6.gitb233050
- use SPDX in license tag
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-5.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-4.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-3.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Feb 04 2022 Chris Leech <cleech@redhat.com> - 1.0.34-2.gitb233050
- FTBFS: more gcc 12 snprintf truncation issues on 32-bit arch
* Fri Jan 28 2022 Chris Leech <cleech@redhat.com> - 1.0.34-1.gitb233050
- FTBFS: update with gcc 12 fix from upstream
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-0.git14ef0d2.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-0.git14ef0d2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Apr 14 2021 Chris Leech <cleech@redhat.com> - 1.0.34-0.git14ef0d2
- upstream 1.0.34
- drop gcc11 warning disabling patch, warnings have been addressed upstream
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.33-6.git848bcc6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.33-6.git848bcc6
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Tue Feb 02 2021 Chris Leech <cleech@redhat.com> - 1.0.33-5.git848bcc6
- add in RHEL conditional for removed fcoe.ko support

Loading…
Cancel
Save