Compare commits

..

No commits in common. "c8" and "imports/c9/fribidi-1.0.10-6.el9" have entirely different histories.

8 changed files with 126 additions and 161 deletions

View File

@ -1 +1 @@
79d45a92e0451e409feb6167500d40dbce51aa95 SOURCES/fribidi-1.0.4.tar.bz2
e22d6cf070966d2735b8e1a6d961a87f1e828a99 SOURCES/fribidi-1.0.10.tar.xz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/fribidi-1.0.4.tar.bz2
SOURCES/fribidi-1.0.10.tar.xz

View File

@ -1,27 +0,0 @@
From 034c6e9a1d296286305f4cfd1e0072b879f52568 Mon Sep 17 00:00:00 2001
From: Dov Grobgeld <dov.grobgeld@gmail.com>
Date: Thu, 24 Oct 2019 09:37:29 +0300
Subject: [PATCH] Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL
---
lib/fribidi-bidi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/fribidi-bidi.c b/lib/fribidi-bidi.c
index 6c84392..d384878 100644
--- a/lib/fribidi-bidi.c
+++ b/lib/fribidi-bidi.c
@@ -747,7 +747,9 @@ fribidi_get_par_embedding_levels_ex (
}
RL_LEVEL (pp) = level;
- RL_ISOLATE_LEVEL (pp) = isolate_level++;
+ RL_ISOLATE_LEVEL (pp) = isolate_level;
+ if (isolate_level < FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL-1)
+ isolate_level++;
base_level_per_iso_level[isolate_level] = new_level;
if (!FRIBIDI_IS_NEUTRAL (override))
--
2.23.0

View File

@ -1,48 +0,0 @@
From ad3a19e6372b1e667128ed1ea2f49919884587e1 Mon Sep 17 00:00:00 2001
From: Akira TAGOH <akira@tagoh.org>
Date: Thu, 17 Feb 2022 17:30:12 +0900
Subject: [PATCH 1/4] Fix the stack buffer overflow issue
strlen() could returns 0. Without a conditional check for len,
accessing S_ pointer with len - 1 may causes a stack buffer overflow.
AddressSanitizer reports this like:
==1219243==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffdce043c1f at pc 0x000000403547 bp 0x7ffdce0
43b30 sp 0x7ffdce043b28
READ of size 1 at 0x7ffdce043c1f thread T0
#0 0x403546 in main ../bin/fribidi-main.c:393
#1 0x7f226804e58f in __libc_start_call_main (/lib64/libc.so.6+0x2d58f)
#2 0x7f226804e648 in __libc_start_main_impl (/lib64/libc.so.6+0x2d648)
#3 0x4036f4 in _start (/tmp/fribidi/build/bin/fribidi+0x4036f4)
Address 0x7ffdce043c1f is located in stack of thread T0 at offset 63 in frame
#0 0x4022bf in main ../bin/fribidi-main.c:193
This frame has 5 object(s):
[32, 36) 'option_index' (line 233)
[48, 52) 'base' (line 386)
[64, 65064) 'S_' (line 375) <== Memory access at offset 63 underflows this variable
[65328, 130328) 'outstring' (line 385)
[130592, 390592) 'logical' (line 384)
This fixes https://github.com/fribidi/fribidi/issues/181
---
bin/fribidi-main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/fribidi-main.c b/bin/fribidi-main.c
index 3cf9fe1..3ae4fb6 100644
--- a/bin/fribidi-main.c
+++ b/bin/fribidi-main.c
@@ -390,7 +390,7 @@ FRIBIDI_END_IGNORE_DEPRECATIONS
S_[sizeof (S_) - 1] = 0;
len = strlen (S_);
/* chop */
- if (S_[len - 1] == '\n')
+ if (len > 0 && S_[len - 1] == '\n')
{
len--;
S_[len] = '\0';
--
2.35.1

View File

@ -1,30 +0,0 @@
From f22593b82b5d1668d1997dbccd10a9c31ffea3b3 Mon Sep 17 00:00:00 2001
From: Dov Grobgeld <dov.grobgeld@gmail.com>
Date: Fri, 25 Mar 2022 09:09:49 +0300
Subject: [PATCH 2/4] Protected against garbage in the CapRTL encoder
---
lib/fribidi-char-sets-cap-rtl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/fribidi-char-sets-cap-rtl.c b/lib/fribidi-char-sets-cap-rtl.c
index b0c0e4a..f74e010 100644
--- a/lib/fribidi-char-sets-cap-rtl.c
+++ b/lib/fribidi-char-sets-cap-rtl.c
@@ -232,7 +232,12 @@ fribidi_cap_rtl_to_unicode (
}
}
else
- us[j++] = caprtl_to_unicode[(int) s[i]];
+ {
+ if ((int)s[i] < 0)
+ us[j++] = '?';
+ else
+ us[j++] = caprtl_to_unicode[(int) s[i]];
+ }
}
return j;
--
2.35.1

View File

@ -1,12 +0,0 @@
diff -pruN fribidi-1.0.4/lib/fribidi-deprecated.c fribidi-1.0.4.orig/lib/fribidi-deprecated.c
--- fribidi-1.0.4.orig/lib/fribidi-deprecated.c 2022-04-14 17:00:47.432555374 +0900
+++ fribidi-1.0.4/lib/fribidi-deprecated.c 2018-03-01 16:37:02.000000000 +0900
@@ -121,7 +121,7 @@ fribidi_remove_bidi_marks (
fribidi_boolean status = false;
if UNLIKELY
- (len == 0)
+ (len == 0 || str == NULL)
{
status = true;
goto out;

View File

@ -1,6 +1,6 @@
diff -pruN fribidi-1.0.4.orig/bin/Makefile.am fribidi-1.0.4/bin/Makefile.am
--- fribidi-1.0.4.orig/bin/Makefile.am 2018-02-19 21:25:06.000000000 +0000
+++ fribidi-1.0.4/bin/Makefile.am 2018-07-26 09:53:02.746415439 +0000
diff -pruN fribidi-1.0.10.orig/bin/Makefile.am fribidi-1.0.10/bin/Makefile.am
--- fribidi-1.0.10.orig/bin/Makefile.am 2020-07-06 04:17:23.000000000 +0900
+++ fribidi-1.0.10/bin/Makefile.am 2020-07-07 21:09:49.076237457 +0900
@@ -2,11 +2,9 @@ bin_PROGRAMS = fribidi
noinst_PROGRAMS = fribidi-benchmark fribidi-bidi-types fribidi-caprtl2utf8
@ -14,10 +14,10 @@ diff -pruN fribidi-1.0.4.orig/bin/Makefile.am fribidi-1.0.4/bin/Makefile.am
+fribidi_benchmark_SOURCES = fribidi-benchmark.c
AM_CPPFLAGS = \
-I$(top_builddir)/lib \
diff -pruN fribidi-1.0.4.orig/bin/getopt.c fribidi-1.0.4/bin/getopt.c
--- fribidi-1.0.4.orig/bin/getopt.c 2018-02-03 20:57:13.000000000 +0000
+++ fribidi-1.0.4/bin/getopt.c 1970-01-01 00:00:00.000000000 +0000
@FRIBIDI_CPPFLAGS@ \
diff -pruN fribidi-1.0.10.orig/bin/getopt.c fribidi-1.0.10/bin/getopt.c
--- fribidi-1.0.10.orig/bin/getopt.c 2015-08-05 03:49:07.000000000 +0900
+++ fribidi-1.0.10/bin/getopt.c 1970-01-01 09:00:00.000000000 +0900
@@ -1,1268 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
@ -1287,9 +1287,9 @@ diff -pruN fribidi-1.0.4.orig/bin/getopt.c fribidi-1.0.4/bin/getopt.c
-}
-
-#endif /* TEST */
diff -pruN fribidi-1.0.4.orig/bin/getopt.h fribidi-1.0.4/bin/getopt.h
--- fribidi-1.0.4.orig/bin/getopt.h 2018-02-03 20:57:13.000000000 +0000
+++ fribidi-1.0.4/bin/getopt.h 1970-01-01 00:00:00.000000000 +0000
diff -pruN fribidi-1.0.10.orig/bin/getopt.h fribidi-1.0.10/bin/getopt.h
--- fribidi-1.0.10.orig/bin/getopt.h 2015-08-05 03:49:07.000000000 +0900
+++ fribidi-1.0.10/bin/getopt.h 1970-01-01 09:00:00.000000000 +0900
@@ -1,187 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004
@ -1478,9 +1478,9 @@ diff -pruN fribidi-1.0.4.orig/bin/getopt.h fribidi-1.0.4/bin/getopt.h
-#undef __need_getopt
-
-#endif /* getopt.h */
diff -pruN fribidi-1.0.4.orig/bin/getopt1.c fribidi-1.0.4/bin/getopt1.c
--- fribidi-1.0.4.orig/bin/getopt1.c 2018-02-03 20:57:13.000000000 +0000
+++ fribidi-1.0.4/bin/getopt1.c 1970-01-01 00:00:00.000000000 +0000
diff -pruN fribidi-1.0.10.orig/bin/getopt1.c fribidi-1.0.10/bin/getopt1.c
--- fribidi-1.0.10.orig/bin/getopt1.c 2015-08-05 03:49:07.000000000 +0900
+++ fribidi-1.0.10/bin/getopt1.c 1970-01-01 09:00:00.000000000 +0900
@@ -1,213 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004
@ -1695,9 +1695,9 @@ diff -pruN fribidi-1.0.4.orig/bin/getopt1.c fribidi-1.0.4/bin/getopt1.c
-}
-
-#endif /* TEST */
diff -pruN fribidi-1.0.4.orig/bin/getopt_int.h fribidi-1.0.4/bin/getopt_int.h
--- fribidi-1.0.4.orig/bin/getopt_int.h 2018-02-03 20:57:13.000000000 +0000
+++ fribidi-1.0.4/bin/getopt_int.h 1970-01-01 00:00:00.000000000 +0000
diff -pruN fribidi-1.0.10.orig/bin/getopt_int.h fribidi-1.0.10/bin/getopt_int.h
--- fribidi-1.0.10.orig/bin/getopt_int.h 2015-08-05 03:49:07.000000000 +0900
+++ fribidi-1.0.10/bin/getopt_int.h 1970-01-01 09:00:00.000000000 +0900
@@ -1,145 +0,0 @@
-/* Internal declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004
@ -1844,9 +1844,27 @@ diff -pruN fribidi-1.0.4.orig/bin/getopt_int.h fribidi-1.0.4/bin/getopt_int.h
-);
-
-#endif /* getopt_int.h */
diff -pruN fribidi-1.0.4.orig/bin/gettext.h fribidi-1.0.4/bin/gettext.h
--- fribidi-1.0.4.orig/bin/gettext.h 2018-02-03 20:57:13.000000000 +0000
+++ fribidi-1.0.4/bin/gettext.h 1970-01-01 00:00:00.000000000 +0000
diff -pruN fribidi-1.0.10.orig/bin/gettext.h fribidi-1.0.10/bin/gettext.h
--- fribidi-1.0.10.orig/bin/gettext.h 2015-08-05 03:49:07.000000000 +0900
+++ fribidi-1.0.10/bin/gettext.h 1970-01-01 09:00:00.000000000 +0900
@@ -1,2 +0,0 @@
-#undef gettext
-#define gettext
diff -pruN fribidi-1.0.10.orig/bin/meson.build fribidi-1.0.10/bin/meson.build
--- fribidi-1.0.10.orig/bin/meson.build 2020-07-06 04:17:23.000000000 +0900
+++ fribidi-1.0.10/bin/meson.build 2020-07-07 21:10:30.931408884 +0900
@@ -1,12 +1,12 @@
fribidi = executable('fribidi',
- 'fribidi-main.c', 'getopt.c', 'getopt1.c', fribidi_unicode_version_h,
+ 'fribidi-main.c', fribidi_unicode_version_h,
c_args: ['-DHAVE_CONFIG_H'] + fribidi_static_cargs + visibility_args,
include_directories: incs,
link_with: libfribidi,
install: true)
executable('fribidi-benchmark',
- 'fribidi-benchmark.c', 'getopt.c', 'getopt1.c', fribidi_unicode_version_h,
+ 'fribidi-benchmark.c', fribidi_unicode_version_h,
c_args: ['-DHAVE_CONFIG_H'] + fribidi_static_cargs + visibility_args,
include_directories: incs,
link_with: libfribidi,

View File

@ -1,17 +1,18 @@
Summary: Library implementing the Unicode Bidirectional Algorithm
Name: fribidi
Version: 1.0.4
Release: 9%{?dist}
Version: 1.0.10
Release: 6%{?dist}
URL: https://github.com/fribidi/fribidi/
Source: https://github.com//%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
License: LGPLv2+ and UCD
BuildRequires: gcc make
BuildRequires: gcc
%if 0%{?rhel} && 0%{?rhel} <= 8
BuildRequires: automake autoconf libtool
Patch0: %{name}-drop-bundled-gnulib.patch
Patch1: %{name}-CVE-2019-18397.patch
Patch2: %{name}-CVE-2022-25308.patch
Patch3: %{name}-CVE-2022-25309.patch
Patch4: %{name}-CVE-2022-25310.patch
%else
BuildRequires: meson
%endif
BuildRequires: make
Patch0: fribidi-drop-bundled-gnulib.patch
%description
A library to handle bidirectional scripts (for example Hebrew, Arabic),
@ -28,9 +29,12 @@ FriBidi.
%prep
%autosetup -p1
%if 0%{?rhel} && 0%{?rhel} <= 8
autoreconf -i
%endif
%build
%if 0%{?rhel} && 0%{?rhel} <= 8
%if 0%{?el5}
# FORTIFY_SOURCE=2 breaks EL-5 build
export CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's|FORTIFY_SOURCE=2|FORTIFY_SOURCE=1|'`
@ -43,14 +47,26 @@ export CFLAGS="$CFLAGS -DPAGE_SIZE=4096"
export CFLAGS="$RPM_OPT_FLAGS -DPAGE_SIZE=4096"
%endif
%endif
%configure --disable-static
make %{?_smp_mflags}
%configure --disable-static --disable-docs
make %{?_smp_mflags} V=1
%else
%meson -Ddocs=false
%meson_build
%endif
%check
%if 0%{?rhel} && 0%{?rhel} <= 8
make check
%else
%meson_test
%endif
%install
%if 0%{?rhel} && 0%{?rhel} <= 8
make DESTDIR=$RPM_BUILD_ROOT install INSTALL="install -p"
%else
%meson_install
%endif
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%ldconfig_scriptlets
@ -65,21 +81,69 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_includedir}/fribidi
%{_libdir}/libfribidi.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*.gz
#%%{_mandir}/man3/*.gz
%changelog
* Thu Apr 14 2022 Akira TAGOH <tagoh@redhat.com> - 1.0.4-9
- Fix security issues CVE-2022-25308, CVE-2022-25309, CVE-2022-25310.
Resolves: rhbz#2050085, rhbz#2050068, rhbz#2050062
- Drop --disable-docs from %%configure. no such options available.
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.10-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Dec 17 2019 Tomas Pelka <tpelka@redhat.com> - 1.0.4-8
- bump version and rebuild to avoid version conflict with 8.1.0.z
Resolves: rhbz#1781227
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.10-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Dec 13 2019 Akira TAGOH <tagoh@redhat.com> - 1.0.4-7
- Security fix for CVE-2019-18397
Resolves: rhbz#1781227
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 7 2020 Akira TAGOH <tagoh@redhat.com> - 1.0.10-2
- Update the patch to drop bundled gnulib.
* Mon Jul 6 2020 Akira TAGOH <tagoh@redhat.com> - 1.0.10-1
- New upstream release.
Resolves: rhbz#1853939
* Thu Mar 05 2020 Akira TAGOH <tagoh@redhat.com> - 1.0.9-1
- New upstream release.
Resolves: rhbz#1809478
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 15 2020 Akira TAGOH <tagoh@redhat.com> - 1.0.8-2
- Restore the deprecated API that was accidentally removed in the previous release.
Resolves: rhbz#1787293
* Fri Dec 13 2019 Akira TAGOH <tagoh@redhat.com> - 1.0.8-1
- New upstream release.
Resolves: rhbz#1783205
* Wed Dec 11 2019 Akira TAGOH <tagoh@redhat.com> - 1.0.7-2
- Fix CVE-2019-18397
Resolves: rhbz#1781218
* Mon Sep 30 2019 Akira TAGOH <tagoh@redhat.com> - 1.0.7-1
- New upstream release.
Resolves: rhbz#1756434
* Fri Sep 27 2019 Akira TAGOH <tagoh@redhat.com> - 1.0.6-1
- New upstream release.
Resolves: rhbz#1756212
- Use meson to build.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jul 23 2019 Akira TAGOH <tagoh@redhat.com> - 1.0.5-3
- Backport upstream patch to remove HAVE_CONFIG_H from public API.
Fixes rhbz#1730516
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Aug 06 2018 Akira TAGOH <tagoh@redhat.com> - 1.0.5-1
- New upstream release. (#1609080)
* Thu Jul 26 2018 Akira TAGOH <tagoh@redhat.com> - 1.0.4-6
- Drop bundled gnulib code.
@ -218,7 +282,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
- put devel .so symlink in the right subpackage
* Tue May 23 2006 Caolan McNamara <caolanm@redhat.com> 0.10.7-3
- rh#192669# clearly I didn't actually get around to basing fribidi-config
- rh#192669# clearly I didn't actually get around to basing fribidi-config
of pkg-config output
* Tue May 02 2006 Caolan McNamara <caolanm@redhat.com> 0.10.7-2