"ss -p" segfaults

2015-07-15 Thread Marc Dietrich
Hi, ss -p segfaults here with some kind of memory corruption: *** Error in `/work/iproute2/misc/ss': free(): invalid pointer: 0x00623000 *** === Backtrace: = /lib64/libc.so.6(+0x71c6d)[0x77885c6d] /lib64/libc.so.6(+0x771be)[0x7788b1be] /lib64/libc.so.6(+0x

"ss -p" segfaults

2015-07-20 Thread j...@openmailbox.org
Please find attached one simple patch for the code 4.1.0/4.1.1. Essentially all that is needed to get rid of this issue is the addition of: memset(u, 0, sizeof(*u)); after: if (!(u = malloc(sizeof(*u break; During the analysis of this issue I also found some other situ

Re: "ss -p" segfaults

2015-07-15 Thread Vadim Kochan
On Wed, Jul 15, 2015 at 04:09:03PM +0200, Marc Dietrich wrote: > Hi, > > ss -p segfaults here with some kind of memory corruption: > > *** Error in `/work/iproute2/misc/ss': free(): invalid pointer: > 0x00623000 *** > === Backtrace: = &

Re: "ss -p" segfaults

2015-07-15 Thread Vadim Kochan
On Wed, Jul 15, 2015 at 04:09:03PM +0200, Marc Dietrich wrote: > Hi, > > ss -p segfaults here with some kind of memory corruption: > > *** Error in `/work/iproute2/misc/ss': free(): invalid pointer: > 0x00623000 *** > === Backtrace: = &

Re: "ss -p" segfaults

2015-07-15 Thread Rustad, Mark D
> On Jul 15, 2015, at 8:12 AM, Vadim Kochan wrote: > Would you please check this fix ? > > diff --git a/misc/ss.c b/misc/ss.c > index 03f92fa..3a826e4 100644 > --- a/misc/ss.c > +++ b/misc/ss.c > @@ -683,8 +683,8 @@ static inline void sock_addr_set_str(inet_prefix *prefix, > char **ptr) > > sta

Re: "ss -p" segfaults

2015-07-15 Thread Rustad, Mark D
> On Jul 15, 2015, at 9:49 AM, Rustad, Mark D wrote: > >> On Jul 15, 2015, at 8:12 AM, Vadim Kochan wrote: >> Would you please check this fix ? >> >> diff --git a/misc/ss.c b/misc/ss.c >> index 03f92fa..3a826e4 100644 >> --- a/misc/ss.c >> +++ b/misc/ss.c >> @@ -683,8 +683,8 @@ static inline vo

Re: "ss -p" segfaults

2015-07-15 Thread Vadim Kochan
On Wed, Jul 15, 2015 at 06:52:49PM +, Rustad, Mark D wrote: > > On Jul 15, 2015, at 9:49 AM, Rustad, Mark D wrote: > > > >> On Jul 15, 2015, at 8:12 AM, Vadim Kochan wrote: > >> Would you please check this fix ? > >> > >> diff --git a/misc/ss.c b/misc/ss.c > >> index 03f92fa..3a826e4 100644

Re: "ss -p" segfaults

2015-07-15 Thread Vadim Kochan
On Wed, Jul 15, 2015 at 09:57:51PM +0300, Vadim Kochan wrote: > On Wed, Jul 15, 2015 at 06:52:49PM +, Rustad, Mark D wrote: > > > On Jul 15, 2015, at 9:49 AM, Rustad, Mark D > > > wrote: > > > > > >> On Jul 15, 2015, at 8:12 AM, Vadim Kochan wrote: > > >> Would you please check this fix ? >

Re: "ss -p" segfaults

2015-07-15 Thread Marc Dietrich
Am Donnerstag, 16. Juli 2015, 01:22:38 schrieb Vadim Kochan: > On Wed, Jul 15, 2015 at 09:57:51PM +0300, Vadim Kochan wrote: > > On Wed, Jul 15, 2015 at 06:52:49PM +, Rustad, Mark D wrote: > > > > On Jul 15, 2015, at 9:49 AM, Rustad, Mark D wrote: > > > >> On Jul 15, 2015, at 8:12 AM, Vadim K

Re: "ss -p" segfaults

2015-07-20 Thread Andreas Schwab
"j...@openmailbox.org" writes: > - free(p->process); > - free(p->process_ctx); > - free(p->socket_ctx); > + if (p->process) > + free(p->process); > + if (p->process_ctx)

Re: "ss -p" segfaults

2015-07-21 Thread j...@openmailbox.org
Patch for 4.1.1. Essentially all that is needed to get rid of this issue is the addition of: memset(u, 0, sizeof(*u)); after: if (!(u = malloc(sizeof(*u break; Also patched some other situations (strcpy and sprintf uses) that potentially produce the same results. Sign

Re: "ss -p" segfaults (updated to 4.2)

2015-10-06 Thread Willy Tarreau
b5483e6f5392d4 Mon Sep 17 00:00:00 2001 From: "j...@openmailbox.org" Date: Tue, 21 Jul 2015 10:54:05 +0100 Subject: "ss -p" segfaults Patch for 4.2.0 Essentially all that is needed to get rid of this issue is the addition of: memset(u, 0, sizeof(*u)); after: if (!(u

Re: "ss -p" segfaults (updated to 4.2)

2015-10-10 Thread j...@openmailbox.org
Hi Willy, It seems fine to me. You may reword the commit message at will. Thx, Jose On 2015-10-06 11:09, Willy Tarreau wrote: > Hi guys, > > I've updated Jose's patch to make it slightly simpler (eg: calloc instead > of malloc+memset), and ported it to 4.2.0 which requires it as well, and > att

Re: "ss -p" segfaults (updated to 4.2)

2015-10-12 Thread Stephen Hemminger
Applied, and did some editing on commit msg -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: "ss -p" segfaults (updated to 4.2)

2015-10-12 Thread Willy Tarreau
On Mon, Oct 12, 2015 at 09:50:19AM -0700, Stephen Hemminger wrote: > Applied, and did some editing on commit msg Thank you Stephen! Willy -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger