| Summary: | busybox shell is more easily to get SEGV for processing backtick '`' command. | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | frank chen <frank.chen2> |
| Component: | Other | Assignee: | unassigned |
| Status: | NEW --- | ||
| Severity: | critical | CC: | busybox-cvs, martin.lewis.x84 |
| Priority: | P5 | ||
| Version: | 1.28.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | ash: fix SEGV in parsebackq on big buffers caused by alloca | ||
|
Description
frank chen
2018-02-14 22:42:43 UTC
Created attachment 7886 [details]
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
|