[syslog-ng] [Bug 259] New: udp destination causes seg fault when BUILD_WITH_SSL is not defined

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Mon Nov 4 19:17:18 CET 2013


https://bugzilla.balabit.com/show_bug.cgi?id=259

           Summary: udp destination causes seg fault when BUILD_WITH_SSL is
                    not defined
           Product: syslog-ng
           Version: 3.5.x
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: unspecified
         Component: syslog-ng
        AssignedTo: bazsi at balabit.hu
        ReportedBy: htsai at skytap.com
Type of the Report: bug
   Estimated Hours: 0.0


We ran into this bug when compiling 3.5.0rc1 on top of customized OpenWrt.  BUILD_WITH_SSL is not defined on our platform.

When a udp destination is defined, the start of syslog-ng failed with seg fault.

After debugging, we found the bug is that, in afinet_dd_new_instance (afinet-dest.c:509),
AFSocketDestDriver->construct_transport is initialized with afinet_dd_construct_transport,
which is defined as afsocket_dd_construct_transport (line 158).
When afsocket_dd_construct_transport is called to construct the transport (afsocket-dest.c:166),
it calls AFSocketDestDriver->construct_transport (afsocket-dest.h:66),
which is again afsocket_dd_construct_transport.  The two functions call each other endlessly
until the stack is exhausted, hence the seg fault.

The bug still exists in 3.5.1 and may potentially affect other destinations using afinet.  We didn't check other syslog-ng versions.

The bug can be fixed by the following patch.  Please review and apply the patch.

--- a/modules/afsocket/afinet-dest.c
+++ b/modules/afsocket/afinet-dest.c
@@ -155,7 +155,7 @@ afinet_dd_construct_transport(AFSocketDe

 #else

-#define afinet_dd_construct_transport afsocket_dd_construct_transport
+#define afinet_dd_construct_transport afsocket_dd_construct_transport_method

 #endif


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list