Bug 497479 - Utility join could segfault due to multibyte patch
Summary: Utility join could segfault due to multibyte patch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: coreutils
Version: 4.9
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 497368 598425
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-24 06:32 UTC by Ondrej Vasik
Modified: 2011-02-16 14:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The "join" utility, which joins two text files, or a file and standard input, on a line-by-line basis, could experience a segmentation fault when running under a multibyte locale. In addition, multibyte locales could cause "join" to produce unexpected results. With this updated package, these coding errors have been corrected so that "join" completes correctly and successfully when run under a multibyte locale.
Clone Of: 497368
Environment:
Last Closed: 2011-02-16 14:10:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0230 0 normal SHIPPED_LIVE coreutils bug fix and enhancement update 2011-02-15 16:35:18 UTC

Description Ondrej Vasik 2009-04-24 06:32:45 UTC
+++ This bug was initially created as a clone of Bug #497368 +++

Description of problem 
As described in http://lists.gnu.org/archive/html/bug-coreutils/2009-04/msg00215.html , RHEL-4/5 and F-9/F-10 join command could segfault due to error in RedHat only i18n patch. Problem was already fixed in Rawhide branch.

Version-Release number of selected component (if applicable):


How reproducible:
always, see link in the mail above for reproducer files

Steps to Reproduce:
1. join s1.txt s2.txt >/dev/null
  
Actual results:
segfault

Expected results:
No segfault, just info about unsorted files.

--- Additional comment from ovasik on 2009-04-23 13:12:32 EDT ---

Created an attachment (id=340969)
Patch to fix segfault in join for multibyte locales

Actually it turned out that the issue was not fixed in rawhide, but the occurance was reduced from 100% to ~10% due to better memory management. Error was caused by checking pointers for exact equality/non equality with limit - which may cause skipping this limit for multibyte locales. Segfault could be easily workarounded by `LC_ALL=C join s1.txt s2.txt` or could be fixed even for multibyte locales by applying attached patch and rebuilding sources.

--- Additional comment from ovasik on 2009-04-23 13:13:14 EDT ---

Fixed in RAWHIDE and built as coreutils-7.2-3.fc12.

Comment 4 Jaromir Hradilek 2010-10-06 23:31:14 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The "join" utility, which joins two text files, or a file and standard input, on a line-by-line basis, could experience a segmentation fault when running under a multibyte locale. In addition, multibyte locales could cause "join" to produce unexpected results. With this updated package, these coding errors have been corrected so that "join" completes correctly and successfully when run under a multibyte locale.

Comment 6 errata-xmlrpc 2011-02-16 14:10:03 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0230.html


Note You need to log in before you can comment on or make changes to this bug.