dcerpc: check app proto for signature keywords

pull/5216/head
Philippe Antoine 5 years ago committed by Victor Julien
parent 6ab323d323
commit b8069365f5

@ -160,7 +160,9 @@ static int DetectDceIfaceSetup(DetectEngineCtx *de_ctx, Signature *s, const char
{
SCEnter();
if (DetectSignatureSetAppProto(s, ALPROTO_DCERPC) != 0) {
if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_DCERPC &&
s->alproto != ALPROTO_SMB) {
SCLogError(SC_ERR_CONFLICTING_RULE_KEYWORDS, "rule contains conflicting keywords.");
return -1;
}
void *did = rs_dcerpc_iface_parse(arg);

@ -132,6 +132,11 @@ static int DetectDceOpnumSetup(DetectEngineCtx *de_ctx, Signature *s, const char
return -1;
}
if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_DCERPC &&
s->alproto != ALPROTO_SMB) {
SCLogError(SC_ERR_CONFLICTING_RULE_KEYWORDS, "rule contains conflicting keywords.");
return -1;
}
void *dod = rs_dcerpc_opnum_parse(arg);
if (dod == NULL) {
SCLogError(SC_ERR_INVALID_SIGNATURE, "Error parsing dce_opnum option in "

@ -171,6 +171,11 @@ void DetectDceStubDataRegister(void)
static int DetectDceStubDataSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg)
{
if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_DCERPC &&
s->alproto != ALPROTO_SMB) {
SCLogError(SC_ERR_CONFLICTING_RULE_KEYWORDS, "rule contains conflicting keywords.");
return -1;
}
if (DetectBufferSetActiveList(s, g_dce_stub_data_buffer_id) < 0)
return -1;
return 0;

Loading…
Cancel
Save