mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
Fix the offset checks in the trans routines
This fixes a potential crash bug, a client can make us read memory we should not read. Luckily I got the disp checks right... Volker
This commit is contained in:
parent
60a639b1ac
commit
64a1d80851
@ -764,10 +764,10 @@ void reply_transs(struct smb_request *req)
|
||||
goto bad_param;
|
||||
}
|
||||
|
||||
if (ddisp > av_size ||
|
||||
if (doff > av_size ||
|
||||
dcnt > av_size ||
|
||||
ddisp+dcnt > av_size ||
|
||||
ddisp+dcnt < ddisp) {
|
||||
doff+dcnt > av_size ||
|
||||
doff+dcnt < doff) {
|
||||
goto bad_param;
|
||||
}
|
||||
|
||||
|
@ -2853,10 +2853,10 @@ void reply_nttranss(struct smb_request *req)
|
||||
goto bad_param;
|
||||
}
|
||||
|
||||
if (ddisp > av_size ||
|
||||
if (doff > av_size ||
|
||||
dcnt > av_size ||
|
||||
ddisp+dcnt > av_size ||
|
||||
ddisp+dcnt < ddisp) {
|
||||
doff+dcnt > av_size ||
|
||||
doff+dcnt < doff) {
|
||||
goto bad_param;
|
||||
}
|
||||
|
||||
|
@ -7783,10 +7783,10 @@ void reply_transs2(struct smb_request *req)
|
||||
goto bad_param;
|
||||
}
|
||||
|
||||
if (ddisp > av_size ||
|
||||
if (doff > av_size ||
|
||||
dcnt > av_size ||
|
||||
ddisp+dcnt > av_size ||
|
||||
ddisp+dcnt < ddisp) {
|
||||
doff+dcnt > av_size ||
|
||||
doff+dcnt < doff) {
|
||||
goto bad_param;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user