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

 
 

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

Submitted by:  Kuang-che Wu <kcwu>
Submitted on:  Fri Aug 7 12:54:02 2015  
 
Category: Crash/Freeze/InfloopSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: None
Fixed Release: 4.4.0Planned Release: None
Work Required: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon Aug 31 16:04:59 2015, comment #3:

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

Amadeusz Sławiński <amade>
Project Administrator
Tue Aug 25 14:01:45 2015, comment #2:

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

(file #34719)

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

p.s. this is detected by afl-fuzz

Kuang-che Wu <kcwu>
Fri Aug 7 12:54:02 2015, 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 File(s):
   
   
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
  • -unavailable- added by amade (Posted a comment)
  • -unavailable- added by kcwu (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Jun 19 21:13:38 2016amadeOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.4.0
    Mon Aug 31 16:04:59 2015amadeStatusNone=>Fixed
    Tue Aug 25 14:01:45 2015kcwuAttached File-=>Added diff-screen-ansi2.txt, #34719
    Fri Aug 7 12:54:02 2015kcwuAttached File-=>Added diff-screen-ansi.txt, #34590

    Back to the top


    Powered by Savane 3.1-cleanup1