Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions SPECS/oniguruma/CVE-2020-26159.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 Mon Sep 17 00:00:00 2001
From: "K.Kosako" <kkosako0@gmail.com>
Date: Mon, 21 Sep 2020 12:58:29 +0900
Subject: [PATCH] #207: Out-of-bounds write

---
src/regcomp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/regcomp.c b/src/regcomp.c
index f6494b6d..a0a68561 100644
--- a/src/regcomp.c
+++ b/src/regcomp.c
@@ -6257,7 +6257,7 @@ concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc)

for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
len = enclen(enc, p);
- if (i + len > OPT_EXACT_MAXLEN) break;
+ if (i + len >= OPT_EXACT_MAXLEN) break;
for (j = 0; j < len && p < end; j++)
to->s[i++] = *p++;
}
9 changes: 7 additions & 2 deletions SPECS/oniguruma/oniguruma.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Name: oniguruma
Version: 6.9.5
Release: 1%{?dist}
Release: 2%{?dist}
License: BSD
Summary: Regular expressions library
Group: System Environment/Libraries
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://github.com/kkos/oniguruma/
Source0: https://github.com/kkos/oniguruma/releases/download/v%{version}/onig-%{version}.tar.gz
# https://github.com/kkos/oniguruma/commit/cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0.patch
Patch0: CVE-2020-26159.patch

%description
Oniguruma is a regular expressions library.
Expand All @@ -24,7 +26,8 @@ Requires: oniguruma = %{version}-%{release}
Development files for libonig

%prep
%setup -q -n onig-%{version}
%autosetup -n onig-%{version} -p1


%build
%configure \
Expand Down Expand Up @@ -62,6 +65,8 @@ make check
%{_libdir}/pkgconfig/%{name}.pc

%changelog
* Thu Oct 15 2020 Emre Girgin <mrgirgin@microsoft.com> 6.9.5-2
- Fix CVE-2020-26159.
* Tue May 19 2020 Andrew Phelps <anphel@microsoft.com> 6.9.5-1
- Upgrade to 6.9.5.
* Wed Apr 22 2020 Emre Girgin <mrgirgin@microsoft.com> 6.9.0-4
Expand Down