cupsd crashed with SIGABRT in __assert_fail_base() #4200

Closed
michaelrsweet opened this Issue Oct 3, 2012 · 4 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Oct 3, 2012

Version: 1.6.1
CUPS.org User: till.kamppeter

Original bug report at Ubuntu:

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1041013

According to the stack trace attached there

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1041013/+attachment/3274557/+files/StacktraceSource.txt

CUPS 1.6.1 on Ubuntu Quantal (12.10), sharing printers via Avahi-based DNS-SD. Using the patches of STR #4155, STR #4156, STR #4157, STR #4158, and STR #4159 and especially the newest crash bug patches for STR #4183, STR #4192, and STR #4180.

Collaborator

michaelrsweet commented Oct 3, 2012

CUPS.org User: till.kamppeter

Seems that in the patch of STR #4183

http://www.cups.org/strfiles/4183/str4183.patch

DNSSDClient needs to get NULL-checked before the

const char *host_name = avahi_client_get_host_name(DNSSDClient);

line.

Collaborator

michaelrsweet commented Oct 3, 2012

CUPS.org User: till.kamppeter

Note that most (perhaps) all functions of Avahi have an assert() making them fail if called with NULL argument(s). So the whole CUPS source code should be checked whether the arguments of Avahi function calls get NULL-checked before the call.

Collaborator

michaelrsweet commented Oct 3, 2012

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Oct 3, 2012

"str4200.patch":

Index: scheduler/dirsvc.c

--- scheduler/dirsvc.c (revision 10639)
+++ scheduler/dirsvc.c (working copy)
@@ -459,6 +459,7 @@
else

endif /* APPLE */

ifdef HAVE_AVAHI

  • if (DNSSDClient)
    {
    const char host_name = avahi_client_get_host_name(DNSSDClient);
    const char *host_fqdn = avahi_client_get_host_name_fqdn(DNSSDClient);
    @@ -472,7 +473,8 @@
    else
    cupsdSetStringf(&DNSSDHostName, "%s.local", ServerName);
    }
    -# else /
    HAVE_DNSSD */
  • else
    +# endif /* HAVE_AVAHI */
    {
    cupsdSetString(&DNSSDComputerName, ServerName);

@@ -481,7 +483,6 @@
else
cupsdSetStringf(&DNSSDHostName, "%s.local", ServerName);
}
-# endif /* HAVE_AVAHI */

/*

  • Then (re)register the web interface if enabled...

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment