-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix session id2 datetype missmatch #679
fix session id2 datetype missmatch #679
Conversation
@s911415 can you share your repro steps? |
@maertendMSFT
And the following is server side log:
Note: the 2nd child process crashed (pid: 12928).
see the link for the detail about size of data type : |
Is this actually
I see this error as well when password-based authentication is used and sshd is running in debug mode. |
@tgauth oh sorry I use -ddd After I changed the data type of session_id2_len to size_t to ensure the write to pointer will not overwrites to other memory space . Then I can login normally. Actually, there is no error log on server side. Only memory dump file generated (due to 0xc0000005) for child process. |
Ah ok, I see. Just curious - does this also repro when I understand that |
PR Summary
Fix session_id2_len data type mismatch when passing as a pointer.
PR Context
The data type of
session_id2_len
is u_int. Inmonitor.c
, it passed as a pointer to the functionsshbuf_get_string
and write 0 to the pointer. When running on x64 system, it cause other values override and cause 0xc0000005 error.This PR make the data type consistently.
It seems that the issue is not exists in the original openssh repo.
openssh-portable/sshbuf-getput-basic.c
Lines 200 to 209 in 41e1711
openssh-portable/monitor.c
Line 1773 in 41e1711