-
Notifications
You must be signed in to change notification settings - Fork 64
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
Segmentation fault using 2.0.2 (rsyslog 8.23) #235
Comments
After some more testing, this is what I have observed so far
With this in mind, I though it would've been correct to define types as follows:
But seems "type of type of type" kind of doesn't like to liblognorm. Updated to clarify: This works:
But this doesn't:
Could anyone give me some answers? Thanks |
Another segfault reproducer:
|
@rgerhards Did you notice this issue? Running:
This works (header is defined with multiple date formats):
This doesn't (syslog_date type is defined and referenced in header) and causes segfault
|
not really, currently busy with other things. Will come to this here when I have time, except if someone else fixed it already ;-) In general, you do not need to ping me on those cases, I usually ;-) do not overlook things. When I am done with the current todo list, I'll simply go through the issue trackers and pick the next thing(s) to do. |
Failing minimal test case for issue rsyslog#235 due to use after free (realloc)
The problem occurs when a user type references another user type : a pointer to the first type is stored in the second, but the array is realloc-ed when you add a third user type, and the pointer becomes invalid. valgrind says it all (line numbers from master today):
Reduced reproducer:
Pull request: #289 |
does this problem still happen with the current version?
|
Yes, I've found it in 2.0.3-1~bpo9+1 (debian backports), but the problem is still present with a fresh checkout |
Use an index instead of a pointer
Use an index instead of a pointer
Minimal test case for issue rsyslog#235 due to use after free (realloc)
Use an index instead of a pointer
Minimal test case for issue rsyslog#235 due to use after free (realloc)
Fix for use after free (issue #235)
@20ton did 2.0.5 fix the issue? |
Nope, it was merged less than one hour after the release: commit e94a801 (HEAD -> master, origin/master, origin/HEAD)
commit 28b7c1f
commit 2179061 (tag: v2.0.5, origin/stable)
|
I see :) |
Hi
echo "a" | /usr/lib/lognorm/lognormalizer -r a.rb
Segmentation fault (core dumped)
File a.rb:
The text was updated successfully, but these errors were encountered: