| Summary: | closefrom() calls in sshd closes the file descriptors associated with Intel QAT crypto engine | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Joel Schuetze <joel.d.schuetze> | ||||
| Component: | sshd | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | enhancement | CC: | djm, dtucker | ||||
| Priority: | P5 | ||||||
| Version: | 9.1p1 | ||||||
| Hardware: | Other | ||||||
| OS: | Windows 10 | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 3480 | ||||||
| Attachments: |
|
||||||
|
Description
Joel Schuetze
2022-10-13 10:47:08 AEDT
Looks reasonable, there's no RNG ops in the code between where it was and where it moves to. Applied, thanks. It will be in 9.2p1. BTW this caused a test breakage in the reexec test when built against OpenSSL 1.1.1 only. 1.1.1a and up is fine. The specific thing that doesn't work is the fallback path when, eg, the sshd binary has been removed while it's still running, so it's a fairly esoteric case: https://github.com/openssh/openssh-portable/actions/runs/3423783333/jobs/5705690743#step:11:854 I wanted to understand the reason for this, and I believe the reason is a bug in 1.1.1's RNG fixed in this commit: https://github.com/openssl/openssl/commit/abf58ed3191dcd3a7c6b296b1494bd7fd336e253 My theory is that OpenSSL opens descriptors to the random devices earlier than it should, sshd closes that descriptor and ends up reusing it for its own purposes, then blows up when seed_rng ends up trying to seed from this reused descriptor. I'll skip this specific test on that specific OpenSSL version. OpenSSH 9.3 has been released. Close resolved bugs |