mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
CVE-2013-4408:async_sock: add some overflow detection to read_packet_handler()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
127de4f4ac
commit
94b2641a53
@ -667,6 +667,11 @@ static void read_packet_handler(struct tevent_context *ev,
|
||||
return;
|
||||
}
|
||||
|
||||
if (total + more < total) {
|
||||
tevent_req_error(req, EMSGSIZE);
|
||||
return;
|
||||
}
|
||||
|
||||
tmp = talloc_realloc(state, state->buf, uint8_t, total+more);
|
||||
if (tevent_req_nomem(tmp, req)) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user