| Summary: | ash will get segfault if the expend pathname length exceed 2048. | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | frank chen <frank.chen2> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.22.x | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: |
use 4096 buffer size, and check the expend before doing it.
recheck the code, this seems better another check here is the corrent one |
||
Created attachment 5366 [details]
recheck the code, this seems better
Created attachment 5390 [details]
another check
Created attachment 5396 [details]
here is the corrent one
Fixed by commit d5f5045b43 (ash: expand: Fix buffer overflow in expandmeta). The first release containing this commit is 1.29.0. |
Created attachment 5360 [details] use 4096 buffer size, and check the expend before doing it. The setup: using perl under ash. while true; do mkdir `perl -e 'print "A" x 255'`; cd A* || break; done cd (to the top root directory) issue: ls A*/A*/A*/A*/A*/A*/A*/A*/A* (deep 9, which pathname is more than 8x256) shell will die for segfault. I have the fix for us, which our PATH_MAX is 4096.