| Summary: | cd allows odd .... directory | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Michel Stam <mstam> |
| Component: | Other | Assignee: | unassigned |
| Status: | NEW --- | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | busybox .config | ||
|
Description
Michel Stam
2023-03-22 15:39:17 UTC
cd DIR cdcmd() -> docd() -> updatepwd(), and updatepwd has the code which "normalizes" the DIR: prepends current dir if DIR is not absolute, then eliminates "SUBDIR/.." sections. The bug is, it does not care whether SUBDIR exists: cd BOGUSDIR/../existing_dir works. The same exact code is in dash. Needs to be fixed there first. |