Skip to content

analysisd: fix possible null ptr deref in OS_CleanMSG.#1823

Merged
ddpbsd merged 1 commit intoossec:masterfrom
cpu:cpu-os_cleanmsg-bad-location-fix
Jan 16, 2020
Merged

analysisd: fix possible null ptr deref in OS_CleanMSG.#1823
ddpbsd merged 1 commit intoossec:masterfrom
cpu:cpu-os_cleanmsg-bad-location-fix

Conversation

@cpu
Copy link

@cpu cpu commented Jan 16, 2020

If the msg provided to OS_CleanMSG has a ( after the ID, but doesn't not contain a -> or : it should be rejected with a FORMAT_ERROR.

Prev. to this commit nesting strstr for -> as the first argument to strchr for : results in a null ptr deref when the message is malformed.

Resolves #1815

If the `msg` provided to `OS_CleanMSG` has a `(` after the ID, but
doesn't not contain a `->` or `:` it should be rejected with
a `FORMAT_ERROR`.

Prev. to this commit nesting `strstr` for `->` as the first argument to
`strchr` for `:` results in a null ptr deref when the message is
malformed.
@ddpbsd ddpbsd merged commit 67bd7be into ossec:master Jan 16, 2020
@cpu cpu deleted the cpu-os_cleanmsg-bad-location-fix branch January 16, 2020 23:01
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

Successfully merging this pull request may close these issues.

CVE-2020-8448: analysisd: OS_CleanMSG segfault processing invalid msg location.

2 participants