[Bug 10761] busybox shell is more easily to get SEGV for processing backtick '`' command.

bugzilla at busybox.net bugzilla at busybox.net
Wed Nov 14 13:23:55 UTC 2018


https://bugs.busybox.net/show_bug.cgi?id=10761

Martin Lewis <martin.lewis.x84 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.lewis.x84 at gmail.com

--- Comment #1 from Martin Lewis <martin.lewis.x84 at gmail.com> ---
Created attachment 7886
  --> https://bugs.busybox.net/attachment.cgi?id=7886&action=edit
ash: fix SEGV in parsebackq on big buffers caused by alloca

Hi, I wrote a little patch that should fix this bug

Before fix:
# python -c "print 'echo \"' + ' ' * 3000000 + ' \`true\`' * 1000 + '\"'" >
test.sh
# bash test.sh | wc
      1       0 3001001
# ./busybox ash test.sh
Segmentation fault (core dumped)

After fix:
# python -c "print 'echo \"' + ' ' * 3000000 + ' \`true\`' * 1000 + '\"'" >
test.sh
# ./busybox ash test.sh | wc
      1       0 3001001

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list