Compare commits

..

No commits in common. "rawhide" and "f34" have entirely different histories.

3 changed files with 20 additions and 106 deletions

View file

@ -1 +1 @@
SHA512 (w3m-0.5.3+git20230121.tar.gz) = f220aabf69cf11ca7560c1519a971bdb1cc0baa443b1b46cd8fca2a4defb614653dd9ba637afbf9315f3b63a349f972436348c2f93d06665573057e4232eab1c
SHA512 (w3m-0.5.3+git20220429.tar.gz) = 0f29d6a1f311c3f417ca041fe3788c94946d238b618eca923cd62a6e5e598aefd898fb8a54999876179011bf37d492a989872e38375ea96ac59914b244f1517e

View file

@ -1,55 +0,0 @@
From edc602651c506aeeb60544b55534dd1722a340d3 Mon Sep 17 00:00:00 2001
From: Rene Kita <mail@rkta.de>
Date: Thu, 13 Jul 2023 07:50:26 +0200
Subject: [PATCH] Fix OOB access due to multiple backspaces
Commit 419ca82d57 (Fix m17n backspace handling causes out-of-bounds
write in checkType) introduced an incomplete fix.
In function checkType we store the length of the previous multi-char
character in a buffer plens_buffer with pointer plens pointing to the
current position inside the buffer. When encountering a backspace plens
is set to the previous position without a bounds check. This will lead
to plens being out of bounds if we get more backspaces than we have
processed multi-char characters before.
If we are at the beginning of the buffer do not decrement and set plen
(the current length) to 0.
This also fixes GH Issue #270 [BUG] Out of bound read in Strnew_size ,
Str.c:61
If the above explanation does sound weird it's because I didn't fully
grok that function. :-)
---
etc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/etc.c b/etc.c
index 128717b18..b56615136 100644
--- a/etc.c
+++ b/etc.c
@@ -393,7 +393,10 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor)
if (color)
color -= plen;
#endif
- plen = *(--plens);
+ if (plens == plens_buffer)
+ plen = 0;
+ else
+ plen = *(--plens);
str += 2;
}
}
@@ -419,7 +422,10 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor)
if (color)
color -= plen;
#endif
- plen = *(--plens);
+ if (plens == plens_buffer)
+ plen = 0;
+ else
+ plen = *(--plens);
str++;
}
#else

View file

@ -1,19 +1,25 @@
# These are the build option passed to ./configure command
%global build_options --enable-m17n --enable-unicode --enable-nls --with-editor=/bin/vi --with-mailer="gnome-open mailto:%s" --with-browser=gnome-open --with-charset=UTF-8 --with-gc --with-termlib=ncurses --enable-nntp --enable-gopher --enable-image=x11,fb --with-imagelib=gtk2 --enable-keymap=w3m
%global gitdate 20230121
%global gitdate 20220429
%{?perl_default_filter}
%global __requires_exclude perl\\(w3mhelp-
Name: w3m
Version: 0.5.3
Release: 69.git%{gitdate}%{?dist}
# Unicode-DFS-2015 is added for EastAsianWidth.txt source
License: MIT AND Unicode-DFS-2015
Release: 55.git%{gitdate}%{?dist}
# UCD is added for EastAsianWidth.txt source
License: MIT and UCD
URL: http://w3m.sourceforge.net/
BuildRequires: ncurses-devel
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: openssl-devel
%else
BuildRequires: openssl11-devel
# -Wnull-dereference requires GCC >= 6
BuildRequires: devtoolset-8-toolchain
%endif
BuildRequires: perl-generators
BuildRequires: pkgconfig
BuildRequires: gettext-devel
@ -27,13 +33,12 @@ BuildRequires: gcc-c++
BuildRequires: make
# This is needed for perl files
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(NKF)
Source0: https://github.com/tats/%{name}/archive/v%{version}+git%{gitdate}/%{name}-%{version}+git%{gitdate}.tar.gz
Source1: w3mconfig
Patch0: https://github.com/tats/w3m/pull/273/commits/edc602651c506aeeb60544b55534dd1722a340d3.patch#/w3m-0.5.3-fix-oob-access.patch
Summary: Pager with Web browsing abilities
Provides: webclient
Provides: text-www-browser
@ -53,7 +58,9 @@ w3m-img package as well.
%package img
Summary: Helper program to display the inline images for w3m
BuildRequires: gtk2-devel
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: gdk-pixbuf2-xlib-devel
%endif
Requires: ImageMagick
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -66,7 +73,12 @@ linux framebuffer.
%autosetup -n %{name}-%{version}-git%{gitdate} -p1
%build
export CFLAGS="$CFLAGS -std=gnu17"
%if 0%{?rhel} == 7
. /opt/rh/devtoolset-8/enable
export SSL_CFLAGS="$(pkg-config --cflags-only-I openssl11)"
export SSL_LIBS="$(pkg-config --libs-only-L openssl11)"
%endif
%configure %{build_options}
%make_build
@ -98,49 +110,6 @@ rm -f doc*/w3m.1
%{_libexecdir}/w3m/w3mimgdisplay
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-69.git20230121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jun 13 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 0.5.3-68.git20230121
- Rebuilt for openssl 4.0
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-67.git20230121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-66.git20230121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-65.git20230121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-64.git20230121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Mar 18 2024 Robert Scheck <robert@fedoraproject.org> - 0.5.3-63.git20230121
- Added upstream patch to fix out-of-bounds access due to multiple backspaces
to address incomplete fix for CVE-2022-38223 (#2222775, #2222780, #2255207)
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-62.git20230121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-61.git20230121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun Jan 22 2023 Robert Scheck <robert@fedoraproject.org> - 0.5.3-60.git20230121
- Rebase to latest upstream gitrev 20230121 (#2163003)
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-59.git20220429
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 23 2022 Robert Scheck <robert@fedoraproject.org> - 0.5.3-58.git20220429
- Added upstream patch to address CVE-2022-38223 (#2126270)
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-57.git20220429
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.5.3-56.git20220429
- Perl 5.36 rebuild
* Sun May 01 2022 Robert Scheck <robert@fedoraproject.org> - 0.5.3-55.git20220429
- Rebase to latest upstream gitrev 20220429 (#2080136)