| Summary: | Abnormal packet reading when SSH and tcmalloc are used together | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | kircher <kircherlike> |
| Component: | ssh | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED FIXED | ||
| Severity: | major | CC: | djm, dtucker |
| Priority: | P5 | ||
| Version: | 8.6p1 | ||
| Hardware: | amd64 | ||
| OS: | Linux | ||
| Bug Depends on: | |||
| Bug Blocks: | 3302 | ||
|
Description
kircher
2021-06-18 18:08:57 AEST
The change has gone in (https://github.com/openssh/openssh-portable/commit/c9f7bba2e6f70b7ac1f5ea190d890cb5162ce127) and will be in the next major release. Thanks for the report. Thank you very much for helping me incorporate the code. As far as I know, tcmalloc may apply for fds before the main function in some unknown scenarios. In this case, the problem can be solved only by deleting closefrom and carefully checking the status of these fds. Because deleting all handles greater than or equal to 3 is a strong constraint, do you have a plan to delete closefrom? There's no way we're going to remove closefrom() - it's essential for preventing leakage of open fds from parent to child processes, including fds that might have been inherited from the process that started sshd. Maybe fix tcmalloc not to do that? I did, however, add a tcmalloc test configuration: https://github.com/openssh/openssh-portable/commit/d4b38144c02f3faa5271e5fb35df93507e06f1b4 https://github.com/openssh/openssh-portable/actions/runs/1332985155 so it should catch the common case of future changes causing it to stop working. closing bugs resolved before openssh-8.9 |