bugGNU Screen - Bugs: bug #45713, [PATCH] stack overflow due to too...

 
 

bug #45713: [PATCH] stack overflow due to too deep recursion

Submitter:  Kuang-che Wu <kcwu>
Submitted:  Fri 07 Aug 2015 12:54:02 PM UTC
   
 
Category:  Crash/Freeze/Infloop Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  None
Fixed Release:  4.4.0 Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 31 Aug 2015 04:04:59 PM UTC, comment #3: 

Thanks, I applied fix to both screen-v4 and master branch.

Amadeusz Sławiński <amade>
Group administrator
Tue 25 Aug 2015 02:01:45 PM UTC, comment #2: 

I found my previous patch is incorrect, sorry. New patch is attached.


(file #34719)

Kuang-che Wu <kcwu>
Fri 07 Aug 2015 12:56:36 PM UTC, comment #1: 

p.s. this is detected by afl-fuzz

Kuang-che Wu <kcwu>
Fri 07 Aug 2015 12:54:02 PM UTC, original submission:  

How to reproduce:
Run this command inside screen
$ printf '\x1b[10000000T'

screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge.

There is already code to handle huge value below the recursion.
if (ye - ys + 1 < n)
IIUC, we can just remove the recursion and don't change its behavior.

Kuang-che Wu <kcwu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #34719:  diff-screen-ansi2.txt added by kcwu (924B - text/plain)
file #34590:  diff-screen-ansi.txt added by kcwu (687B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  • -email is unavailable- added by kcwu (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-19 amade Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4.0
    2015-08-31 amade StatusNone Fixed
    2015-08-25 kcwu Attached File- Added diff-screen-ansi2.txt, #34719
    2015-08-07 kcwu Attached File- Added diff-screen-ansi.txt, #34590

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code