Summary: | dev-db/mariadb[galera] with sys-apps/iproute2-4.14.1 - ss[19047]: segfault at 0 ip 00005636dda9fe48 sp 00007ffe065c6070 error 4 in ss[5636dda94000+1c000] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tomáš Mózes <hydrapolic> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | mysql-bugs |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Tomáš Mózes
2018-02-15 09:36:20 UTC
Maybe you are able to compile with debug symbols and provide a core dump/backtrace? With this upstream patch it does not segfault (it's in the 4.15.0 release): commit ebbb219c924ccedbc59e209d40b77d5dbeecd7cd Author: Antonio Quartulli <a@unstable.cc> Date: Sun Jan 7 02:31:50 2018 +0800 ss: fix NULL pointer access when parsing unix sockets with oldformat When parsing and printing the unix sockets in unix_show(), if the oldformat is detected, the peer_name member of the sockstat object is left uninitialized (NULL). For this reason, if a filter has been specified on the command line, a strcmp() will crash when trying to access it. Avoid crash by checking that peer_name is not NULL before passing it to strcmp(). Cc: Stefano Brivio <sbrivio@redhat.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Antonio Quartulli <a@unstable.cc> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> diff --git a/misc/ss.c b/misc/ss.c index b35859dc..29a25070 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3711,7 +3711,10 @@ static int unix_show(struct filter *f) }; memcpy(st.local.data, &u->name, sizeof(u->name)); - if (strcmp(u->peer_name, "*")) + /* when parsing the old format rport is set to 0 and + * therefore peer_name remains NULL + */ + if (u->peer_name && strcmp(u->peer_name, "*")) memcpy(st.remote.data, &u->peer_name, sizeof(u->peer_name)); if (run_ssfilter(f->f, &st) == 0) { Closing this one: Patch is in >=iproute2-4.15 and oldest version in repository is 4.19. |