Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ossec 2.9 ossec-remoted have dos vul #1106

Closed
wawava opened this issue Apr 7, 2017 · 1 comment
Closed

ossec 2.9 ossec-remoted have dos vul #1106

wawava opened this issue Apr 7, 2017 · 1 comment

Comments

@wawava
Copy link

wawava commented Apr 7, 2017

Hi all
i'm use ossec 2.9 ,find a dos vul in the test

in os_crypto/shared/msgs.c file
        /* Check if it is a duplicated message */
        if (msg_global == keys->keyentries[id]->global) {
            return (NULL);
        }
when reinstall ossec agent ,and use old authentication key to connect ossec server, 
server think the new message is a duplicated message and return (NULL)

in remoted/secure.c file

        if (tmp_msg == NULL) {
            /* If duplicated, a warning was already generated */
            continue;
        }
but tmg_msg == NULL is false, the ossec-remoted process will crash in

IsValidHeader(tmp_msg) function

please fix the bug,thx

@wawava
Copy link
Author

wawava commented Apr 7, 2017

please modify msgs.c file code

        /* Check if it is a duplicated message */
        if (msg_global == keys->keyentries[id]->global) {
            return (NULL);
        }

        /* Warn about duplicated messages */
        merror("%s: WARN: Duplicate error:  global: %u, local: %u, "
               "saved global: %u, saved local:%u",
               __local_name,
               msg_global,
               msg_local,
               keys->keyentries[id]->global,
               keys->keyentries[id]->local);

to

        /* Check if it is a duplicated message */
        if (msg_global == keys->keyentries[id]->global) {
            /* Warn about duplicated messages */
            merror("%s: WARN: Duplicate error:  global: %u, local: %u, "
                "saved global: %u, saved local:%u",
                __local_name,
                msg_global,
                msg_local,
                keys->keyentries[id]->global,
                keys->keyentries[id]->local);
            return (NULL);
        }

ddpbsd added a commit to ddpbsd/ossec-hids that referenced this issue Apr 7, 2017
the return when a duplicate is found.
Should fix Issue ossec#1106 reported by weisst. Thanks!
@wawava wawava closed this as completed Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant