Menu

#185 Segfaults every connection attempts

1.3.1
closed
None
2017-03-04
2016-08-20
No

As reported via email by Matt Domsch:


I have tracked down what I believe is a bug in 1.3.2-Beta0. This was found on my EL6 system using the testing build that Steve Jenkins has prepared.

I was seeing segfaults on every connection attempt. gdb helped track it down to this:

sfsistat
mlfi_connect(SMFICTX ctx, char host, _SOCK_ADDR ip)
{
DMARCF_CONNCTX cc;
struct dmarcf_config
conf;

    dmarcf_config_reload();

    if (dmarcf_checkhost(host, ignore) ||
        (ip != NULL && dmarcf_checkip(ip, ignore)))
    {
            if (**conf->conf_dolog**)
                    syslog(LOG_INFO, "ignoring connection from %s", host);
            return SMFIS_ACCEPT;
    }

specifically, see how conf is defined on the local stack, but is dereferenced before being set here. In 1.3.1, this reads if (curconf->conf_dolog) ...

It was changed in this changeset (thanks git blame):
ec281d40 (Murray S. Kucherawy 2016-07-19 02:48:03 -0700 1689) if (conf->conf_dolog)
ec281d40 (Murray S. Kucherawy 2016-07-19 02:48:03 -0700 1690) syslog(LOG_INFO, "ignoring connection from %s", host);

commit ec281d4039b1b5518fca8d9d1a5b67f1a21c50bb
Author: Murray S. Kucherawy msk@trusteddomain.org
Date: Tue Jul 19 02:48:03 2016 -0700

Fix bug #158: Log ignored connections.  Patch from Andreas Schulze.

Discussion

  • Juri Haberland

    Juri Haberland - 2016-08-20

    The attached patch (untested) should fix that.

     
    • jagerman

      jagerman - 2016-11-05

      I'm getting the same segfault and can confirm that the patch fixes it.

       
  • Adam Williamson

    Adam Williamson - 2016-11-24

    I just reported what I think is the same thing downstream (Fedora) at https://bugzilla.redhat.com/show_bug.cgi?id=1398444 . Will try the patch.

     
  • Adam Williamson

    Adam Williamson - 2016-11-24

    Yup, Juri's patch does seem to fix it for me too. I'm sending out a package update for all Fedora and EPEL releases.

     
  • Murray S. Kucherawy

    Fix applied.

     
  • Murray S. Kucherawy

    • status: open --> closed
     
  • Murray S. Kucherawy

    v1.3.2 released.

     

Log in to post a comment.

MongoDB Logo MongoDB