-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ossec 2.9.1 Reports not being sent out #1227
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
Comments
Tried running monitord under gdb [XXX@mXX-ossec-XX ~]# gdb /var/ossec/bin/ossec-monitord |
This may be related: #1088 |
Can you provide your report configuration? I'll try to reproduce the crash. |
Here's my ossec.conf file. |
Yeah I jumped the gun on assuming scheduled reports worked. I have the same symptoms as those listed in here (im running 2.9.2) from messages: ossec log: and the maillog (this is after disabling all restrictions such as reject_unauth_pipelining): Aug 23 00:00:34 XXXXXXX postfix/smtpd[6962]: connect from localhost[127.0.0.1] Aug 23 00:00:54 XXXXXXX postfix/smtpd[6962]: connect from localhost[127.0.0.1] Also attached the relevant sections from my ossec.conf |
@ddpbsd Did you able to reproduce this ? |
Sorry, it fell through the cracks. I have just put your reports config into my ossec.conf (running master). Hopefully I'll know more tomorrow. |
Actually I managed to find this:
So I'll be trying to dig into monitord this weekend. |
After adding some debugging, I'm not sure the email addresses are getting picked up out of the configuration. Still digging. EDIT: got my logic in the test wrong, oops. This isn't the problem. |
|
Something funky with the strftime?
|
The usage looks right and the visible parameter values (out string, maxsize, format) look okay. About the only thing I can imagine could cause a segfault then is the time value being passed in (whatever value is at pointer |
This post makes a decent comment: |
I checked the Coverity defects for |
I've had some success with "rebuilding" |
I'd be curious to see the diff, but I expect what you describe will be necessary to get this stable. Not necessarily an objection, but my inclination would be to add one or - likely - more null checks upon entry to |
It's pretty simple, but I don't think it's the (only?) problem:
|
Latest crash:
line 285 from
|
OS_SendCustomemail did not like some of the variables passed, so recreate them.
This feature is causing me many headaches. Try to limit the information passed between functions to limit any memory shenanigans I don't understand.
I have recently, upgraded ossec from 2.8.3 to 2.9.1 and I have noticed that reports are being generated but not being sent out. These reports were being sent out without a hitch before the upgrade.
I see that in /var/ossec/logs/ossec.log, reports are being generated..
2017/08/16 00:01:59 ossec-monitord: INFO: Starting daily reporting for 'Daily report: File changes'
2017/08/16 00:02:05 ossec-monitord: INFO: Report 'Daily report: File changes' completed. Creating output...
2017/08/16 00:02:05 INFO: Connected to 1X2.30.XX.X1 at address 1X2.30.XX.X1, port 25
2017/08/16 00:02:45 ossec-monitord: INFO: Report 'Daily report: Windows Authentication Failure Report' completed. Creating output...
2017/08/16 00:02:45 INFO: Connected to 1X2.30.XX.X1 at address 1X2.30.XX.X1, port 25
2017/08/17 00:01:33 ossec-monitord: INFO: Starting daily reporting for 'Daily report: Authentication Failure Report'
2017/08/17 00:01:43 ossec-monitord: INFO: Report 'Daily report: Authentication Failure Report' completed. Creating output...
2017/08/17 00:01:43 ossec-monitord: INFO: Report 'Daily report: File changes' completed. Creating output...
2017/08/17 00:01:44 ossec-monitord: INFO: Report 'Daily report: Windows Authentication Failure Report' completed. Creating output...
2017/08/17 00:01:44 INFO: Connected to 1X2.30.XX.X1 at address 1X2.30.XX.X1, port 25
2017/08/17 00:01:44 INFO: Connected to 1X2.30.XX.X1 at address 1X2.30.XX.X1, port 25
2017/08/17 00:01:44 INFO: Connected to 1X2.30.XX.X1 at address 1X2.30.XX.X1, port 25
Here what I see in /var/log/messages which could be the culprit.
Aug 16 00:02:05 mtc-ossec-01p kernel: ossec-monitord[20805]: segfault at 17 ip 00007f4cba3908c5 sp 00007fff4f190950 error 4 in libc-2.12.so[7f4cba2ed000+18a000]
Aug 16 00:02:45 mtc-ossec-01p kernel: ossec-monitord[20817]: segfault at 17 ip 00007f4cba3908c5 sp 00007fff4f190950 error 4 in libc-2.12.so[7f4cba2ed000+18a000
Aug 17 00:01:44 mtc-ossec-01p kernel: ossec-monitord[11545]: segfault at 18 ip 00007f258b2798c5 sp 00007ffcce43b4a0 error 4 in libc-2.12.so[7f258b1d6000+18a000]
Aug 17 00:01:44 mtc-ossec-01p kernel: ossec-monitord[11615]: segfault at 18 ip 00007f258b2798c5 sp 00007ffcce43b4a0 error 4 in libc-2.12.so[7f258b1d6000+18a000]
Aug 17 00:01:44 mtc-ossec-01p kernel: ossec-monitord[11614]: segfault at 18 ip 00007f258b2798c5 sp 00007ffcce43b4a0 error 4 in libc-2.12.so[7f258b1d6000+18a000]
Any clue how to fix this?
The text was updated successfully, but these errors were encountered: