diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-09-23 20:01:06 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-09-24 18:10:22 -0700 |
commit | ff542275c3e2bf432bcc303e95124374ada03675 (patch) | |
tree | 5718f3bb5618b46e965e9e80f149c70975a8bb03 /source4/smb_server/smb2 | |
parent | a78ac8a46be3e7c1cf3004b85aa1ec4d0330e5d2 (diff) | |
download | samba-ff542275c3e2bf432bcc303e95124374ada03675.tar.gz samba-ff542275c3e2bf432bcc303e95124374ada03675.tar.bz2 samba-ff542275c3e2bf432bcc303e95124374ada03675.zip |
stricter checking of SMB2 echo body (per the spec)
thanks to the bluearc test suite
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r-- | source4/smb_server/smb2/keepalive.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/smb_server/smb2/keepalive.c b/source4/smb_server/smb2/keepalive.c index f40bcc485c..d1a0ef3d72 100644 --- a/source4/smb_server/smb2/keepalive.c +++ b/source4/smb_server/smb2/keepalive.c @@ -54,11 +54,16 @@ void smb2srv_keepalive_recv(struct smb2srv_request *req) { uint16_t _pad; - if (req->in.body_size < 0x04) { + if (req->in.body_size != 0x04) { smb2srv_send_error(req, NT_STATUS_FOOBAR); return; } + if (SVAL(req->in.body, 0x00) != 0x04) { + smb2srv_send_error(req, NT_STATUS_INVALID_PARAMETER); + return; + } + _pad = SVAL(req->in.body, 0x02); req->status = smb2srv_keepalive_backend(req); |