Skip to content

Commit

Permalink
Fix CVE-2021-4048 for package lapack (#1785)
Browse files Browse the repository at this point in the history
* lapack CVE-2021-4048 fix

* Update autosetup
  • Loading branch information
0xba1a authored and jslobodzian committed Dec 19, 2021
1 parent c1763f1 commit 542d0c1
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
52 changes: 52 additions & 0 deletions SPECS/lapack/CVE-2021-4048.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
diff --git a/SRC/clarrv.f b/SRC/clarrv.f
index 72fe1f9..aeb2cf1 100644
--- a/SRC/clarrv.f
+++ b/SRC/clarrv.f
@@ -351,7 +351,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
diff --git a/SRC/dlarrv.f b/SRC/dlarrv.f
index cace17c..fd06294 100644
--- a/SRC/dlarrv.f
+++ b/SRC/dlarrv.f
@@ -353,7 +353,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
diff --git a/SRC/slarrv.f b/SRC/slarrv.f
index f9e3cf2..be4e721 100644
--- a/SRC/slarrv.f
+++ b/SRC/slarrv.f
@@ -353,7 +353,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
diff --git a/SRC/zlarrv.f b/SRC/zlarrv.f
index 67a6758..6389e9a 100644
--- a/SRC/zlarrv.f
+++ b/SRC/zlarrv.f
@@ -351,7 +351,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
8 changes: 6 additions & 2 deletions SPECS/lapack/lapack.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Summary: linear algebra package
Name: lapack
Version: 3.8.0
Release: 3%{?dist}
Release: 4%{?dist}
URL: http://www.netlib.org/lapack/
License: BSD
Group: Development/Libraries
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://www.netlib.org/%{name}/%{name}-%{version}.tar.gz
Patch0: CVE-2021-4048.patch
%define sha1 %{name}=55ac9d6be510883c5442c8aca967722cdf58fb29

BuildRequires: cmake
Expand All @@ -26,7 +27,7 @@ The lapack-devel package contains libraries and header files for
developing applications that use lapack.

%prep
%setup
%autosetup -p1

%build
mkdir -p build
Expand Down Expand Up @@ -68,6 +69,9 @@ mv %{buildroot}/%{_includedir}/*.h %{buildroot}/%{_includedir}/lapacke/.
%exclude %{_libdir}/cmake/*

%changelog
* Fri Dec 17 2021 Bala <[email protected]> - 3.8.0-4
- Fix CVE-2021-4048

* Sat May 09 2020 Nick Samson <[email protected]> - 3.8.0-3
- Added %%license line automatically

Expand Down

0 comments on commit 542d0c1

Please sign in to comment.