diff options
| author | Ilan Dudnik <ilan.dudnik@safebreach.com> | 2026-08-07 12:03:31 +0300 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-08-17 22:38:21 +0900 |
| commit | 23a0be6a84a38ac169eeab49017934e8e27c65f0 (patch) | |
| tree | bef21b7dc1d2010894cfd5607cbb22f0b199311d /scripts/stackusage | |
| parent | 6a8292d379d640ad2cfba9caa9c74da5390b498f (diff) | |
| download | linux-23a0be6a84a38ac169eeab49017934e8e27c65f0.tar.gz linux-23a0be6a84a38ac169eeab49017934e8e27c65f0.zip | |
ksmbd: fix heap out-of-bounds write in krb5_authenticate()
In krb5_authenticate(), out_len is calculated to determine available
headroom in response_buf for the incoming Kerberos AP-REP token. However,
when SMB2_SESSION_SETUP is processed as a non-first element of a compounded
SMB2 request, the calculation omits work->next_smb2_rsp_hdr_off.
This causes out_len to overstate remaining buffer headroom by
the cumulative size of prior responses in the compound chain. Consequently,
the length check in ksmbd_krb5_authenticate()
(*out_len <= resp->spnego_blob_len) passes erroneously, allowing memcpy()
to write the AP-REP blob past the end of response_buf into adjacent kernel
heap memory.
Fix this by subtracting work->next_smb2_rsp_hdr_off when computing out_len,
ensuring it accurately reflects physical remaining buffer space.
Signed-off-by: Ilan Dudnik <ilan.dudnik@safebreach.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
