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

Bugfixes for OS_IPFound, OS_IPFoundList, OS_IsValidIP. #920

Merged
merged 1 commit into from
Aug 11, 2016

Conversation

reyjrar
Copy link
Member

@reyjrar reyjrar commented Aug 11, 2016

OS_IsValidIP violated it's const constraint when the ip_addr element
was set to 'any'. This caused some unexplained behavior when subsequent
calls. This is corrected.

OS_IPFound and OS_IPFoundList where call sacmp(), but if OS_IsValidIP
was called with "any", the sockaddr_store.ss_family would be AF_INET6.
AFAICT, this meant any comparison of "any" to an IPv4 address would
fail. This affected the ossec-remoted when validating IPv4 keys issued
by authd which set 'any' as the IP address to verify.

This would also cause failures everywhere in the rules, analysis,
exec, and activeresponse code where the src/dst IP being compared to any
was IPv4.

OS_IsValidIP violated it's `const` constraint when the ip_addr element
was set to 'any'.  This caused some unexplained behavior when subsequent
calls.  This is corrected.

OS_IPFound and OS_IPFoundList where call sacmp(), but if OS_IsValidIP
was called with "any", the sockaddr_store.ss_family would be AF_INET6.
AFAICT, this meant any comparison of "any" to an IPv4 address would
fail.  This affected the ossec-remoted when validating IPv4 keys issued
by authd which set 'any' as the IP address to verify.

This would also cause failures *everywhere* in the rules, analysis,
exec, and activeresponse code where the src/dst IP being compared to any
was IPv4.
@reyjrar
Copy link
Member Author

reyjrar commented Aug 11, 2016

Testing this on my infrastructure to ensure it's the last bug in 2.9 that's breaking the OSSEC/authd stuff.

@ddpbsd ddpbsd merged commit f42e4d0 into ossec:master Aug 11, 2016
atomicturtle added a commit to atomicturtle/ossec-hids that referenced this pull request Aug 31, 2016
Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
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.

2 participants