Commit e7067a4
ksmbd: avoid out of bounds access in decode_preauth_ctxt()
Confirm that the accessed pneg_ctxt->HashAlgorithms address sits within
the SMB request boundary; deassemble_neg_contexts() only checks that the
eight byte smb2_neg_context header + (client controlled) DataLength are
within the packet boundary, which is insufficient.
Checking for sizeof(struct smb2_preauth_neg_context) is overkill given
that the type currently assumes SMB311_SALT_SIZE bytes of trailing Salt.
Signed-off-by: David Disseldorp <[email protected]>
Acked-by: Namjae Jeon <[email protected]>
Cc: <[email protected]>
Signed-off-by: Steve French <[email protected]>1 parent 09a9639 commit e7067a4
1 file changed
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
879 | | - | |
| 879 | + | |
| 880 | + | |
880 | 881 | | |
881 | | - | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
882 | 888 | | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
| 889 | + | |
| 890 | + | |
888 | 891 | | |
889 | | - | |
| 892 | + | |
| 893 | + | |
890 | 894 | | |
891 | 895 | | |
892 | 896 | | |
| |||
1014 | 1018 | | |
1015 | 1019 | | |
1016 | 1020 | | |
1017 | | - | |
| 1021 | + | |
| 1022 | + | |
1018 | 1023 | | |
1019 | 1024 | | |
1020 | 1025 | | |
| |||
0 commit comments