Bug 740484

Summary: mawk RE matching can return invalid results causing unexpected behavior and crashes
Product: [openSUSE] openSUSE 12.1 Reporter: Forgotten User cAXlJ_FoSf <forgotten_cAXlJ_FoSf>
Component: BasesystemAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: maint:released:11.3:44928 maint:released:11.4:44928
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Deadline: 2012-02-08   
Attachments: chngeset containing the fix for REmatch()

Description Forgotten User cAXlJ_FoSf 2012-01-10 10:44:46 UTC
Created attachment 470460 [details]
chngeset containing the fix for REmatch()

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

RE matching in mawk 1.3.4 can return invalid results leading to incorrect RSTART and RLENGTH or trigger unexpected behavior up to crashes.
E.g. when running mawk 'BEGIN{x="a";sub(/[^a]/,"", x)}' REmatch() returns an invalid match leading to an integer underflow which in turn causes a segfault in a subsequent memcpy() call.

This bug had been fixed in the 1.3.4.20100224 snapshot release, through bisecting Thomas Dickey identified the attached changeset. 

Reproducible: Always
Comment 1 Forgotten User cAXlJ_FoSf 2012-01-10 10:56:36 UTC
This affects 11.3, 11.4, and 12.1, requesting a SWAMPID for the issue.
Comment 2 Bernhard Wiedemann 2012-01-10 11:00:38 UTC
This is an autogenerated message for OBS integration:
This bug (740484) was mentioned in
https://build.opensuse.org/request/show/99588 Factory / mawk
Comment 3 Swamp Workflow Management 2012-01-11 15:46:53 UTC
The SWAMPID for this issue is 44911.
This issue was rated as low.
Please submit fixed packages until 2012-02-08.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/44911
Comment 4 Bernhard Wiedemann 2012-01-11 20:00:17 UTC
This is an autogenerated message for OBS integration:
This bug (740484) was mentioned in
https://build.opensuse.org/request/show/99809 12.1 / mawk
Comment 5 Dirk Mueller 2012-01-18 17:07:53 UTC
updates released.
Comment 6 Swamp Workflow Management 2012-01-18 17:08:47 UTC
Update released for: mawk, mawk-debuginfo, mawk-debugsource
Products:
openSUSE 11.3 (debug, i586, x86_64)
openSUSE 11.4 (debug, i586, x86_64)