Bug 1100488 - bash-doc random html corruption
bash-doc random html corruption
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development
Current
x86-64 openSUSE Factory
: P5 - None : Normal (vote)
: ---
Assigned To: Dr. Werner Fink
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-07 03:22 UTC by Bernhard Wiedemann
Modified: 2018-11-04 15:45 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Wiedemann 2018-07-07 03:22:01 UTC
When working on reproducible builds for openSUSE,
I found that the bash-doc package sometimes has a corrupted byte in a .html file
(below in "Bahh")


--- bash-doc-bug2/usr/share/doc/packages/bash/bash.html 2018-06-04 12:00:00.000000000 +0000
+++ bash-doc-bug/usr/share/doc/packages/bash/bash.html  2018-06-04 12:00:00.000000000 +0000
@@ -13561,7 +13561,7 @@
 <HR>
 <TABLE WIDTH=100%>
 <TR>
-<TH ALIGN=LEFT width=33%>GNU Bahh 4.4<TH ALIGN=CENTER width=33%>2016 August 26<TH ALIGN=RIGHT width=33%>BASH(1)
+<TH ALIGN=LEFT width=33%>GNU Bash 4.4<TH ALIGN=CENTER width=33%>2016 August 26<TH ALIGN=RIGHT width=33%>BASH(1)
 </TR>
 </TABLE>
 <HR>


This looks very similar to
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858389
where the fix was to use memmove instead of memcpy

bash.html is created by
bash-4.4/support/man2html bash.1 | ./htmlpost.sh > bash.html

Looking at man2html.c there are several calls of strlimitcpy working on overlapping memory regions. That could cause such undefined behaviour.
Comment 1 Bernhard Wiedemann 2018-07-07 06:34:14 UTC
I verified that this helps:
https://build.opensuse.org/request/show/621385
Comment 2 Bernhard Wiedemann 2018-07-07 07:30:29 UTC
and sent upstream
http://lists.gnu.org/archive/html/bug-bash/2018-07/msg00010.html
Comment 3 Dr. Werner Fink 2018-07-10 10:02:49 UTC
fixed with SR#621861
Comment 4 Swamp Workflow Management 2018-07-10 10:40:13 UTC
This is an autogenerated message for OBS integration:
This bug (1100488) was mentioned in
https://build.opensuse.org/request/show/621861 Factory / bash
Comment 8 Swamp Workflow Management 2018-10-09 10:14:34 UTC
SUSE-RU-2018:3079-1: An update that has three recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1095661,1095670,1100488
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Basesystem 15 (src):    bash-4.4-9.7.1
Comment 9 Swamp Workflow Management 2018-10-12 22:11:53 UTC
openSUSE-RU-2018:3139-1: An update that has three recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1095661,1095670,1100488
CVE References: 
Sources used:
openSUSE Leap 15.0 (src):    bash-4.4-lp150.8.3.1