mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.
Ensure we never wrap whilst adding client provided input. Signed-off-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6659f0164c
commit
c8d8bb257a
@ -990,7 +990,19 @@ struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t
|
||||
if (next_offset == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* Integer wrap protection for the increment. */
|
||||
if (offset + next_offset < offset) {
|
||||
break;
|
||||
}
|
||||
|
||||
offset += next_offset;
|
||||
|
||||
/* Integer wrap protection for while loop. */
|
||||
if (offset + 4 < offset) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ea_list_head;
|
||||
|
Loading…
Reference in New Issue
Block a user