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 07 Aug 2015 12:54:02 PM UTC  
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 Markup)

You are not logged in

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


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>
Project 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 File(s):

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 19 Jun 2016 09:13:38 PM UTCamadeOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.4.0
    Mon 31 Aug 2015 04:04:59 PM UTCamadeStatusNone=>Fixed
    Tue 25 Aug 2015 02:01:45 PM UTCkcwuAttached File-=>Added diff-screen-ansi2.txt, #34719
    Fri 07 Aug 2015 12:54:02 PM UTCkcwuAttached File-=>Added diff-screen-ansi.txt, #34590

    Back to the top

    Powered by Savane 3.1-cleanup1