git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc294c4
)
CVE-2013-4408:s4:dcerpc_sock: check for invalid frag_len within sock_complete_packet()
author
Stefan Metzmacher
<metze@samba.org>
Tue, 24 Sep 2013 03:03:40 +0000
(
05:03
+0200)
committer
Karolin Seeger
<kseeger@samba.org>
Thu, 5 Dec 2013 10:11:52 +0000
(11:11 +0100)
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>
source4/librpc/rpc/dcerpc_sock.c
patch
|
blob
|
history
diff --git
a/source4/librpc/rpc/dcerpc_sock.c
b/source4/librpc/rpc/dcerpc_sock.c
index f0451ac6745bb57c222b6ca2e321bfb5e02c8201..9a596da47da628d7e98abf094ef1cf2b35d64290 100644
(file)
--- a/
source4/librpc/rpc/dcerpc_sock.c
+++ b/
source4/librpc/rpc/dcerpc_sock.c
@@
-102,6
+102,12
@@
static NTSTATUS sock_complete_packet(void *private_data, DATA_BLOB blob, size_t
return STATUS_MORE_ENTRIES;
}
*size = dcerpc_get_frag_length(&blob);
+ if (*size < blob.length) {
+ /*
+ * something is wrong, let the caller deal with it
+ */
+ *size = blob.length;
+ }
if (*size > blob.length) {
return STATUS_MORE_ENTRIES;
}