Re: use-after-free in sctp_do_sm

2015-12-04 Thread Jason Baron
On 12/04/2015 12:03 PM, Joe Perches wrote: > On Fri, 2015-12-04 at 11:47 -0500, Jason Baron wrote: >> When DYNAMIC_DEBUG is enabled we have this wrapper from >> include/linux/dynamic_debug.h: >> >> if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) >> >> >> So the compiler is not emitti

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Joe Perches
On Fri, 2015-12-04 at 11:47 -0500, Jason Baron wrote: > When DYNAMIC_DEBUG is enabled we have this wrapper from > include/linux/dynamic_debug.h: > > if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) > > > So the compiler is not emitting the side-effects in this > case. Huh?  Do I mis

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Jason Baron
On 12/04/2015 11:12 AM, Dmitry Vyukov wrote: > On Thu, Dec 3, 2015 at 9:51 PM, Joe Perches wrote: >> (adding lkml as this is likely better discussed there) >> >> On Thu, 2015-12-03 at 15:42 -0500, Jason Baron wrote: >>> On 12/03/2015 03:24 PM, Joe Perches wrote: On Thu, 2015-12-03 at 15:10 -0

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Dmitry Vyukov
On Thu, Dec 3, 2015 at 9:51 PM, Joe Perches wrote: > (adding lkml as this is likely better discussed there) > > On Thu, 2015-12-03 at 15:42 -0500, Jason Baron wrote: >> On 12/03/2015 03:24 PM, Joe Perches wrote: >> > On Thu, 2015-12-03 at 15:10 -0500, Jason Baron wrote: >> > > On 12/03/2015 03:03

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Aaron Conole
Vlad Yasevich writes: > On 12/04/2015 07:55 AM, Marcelo Ricardo Leitner wrote: >> On Fri, Dec 04, 2015 at 11:40:02AM +0100, Dmitry Vyukov wrote: >>> On Thu, Dec 3, 2015 at 9:51 PM, Joe Perches wrote: (adding lkml as this is likely better discussed there) On Thu, 2015-12-03 at 15:42

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Vlad Yasevich
On 12/04/2015 07:55 AM, Marcelo Ricardo Leitner wrote: > On Fri, Dec 04, 2015 at 11:40:02AM +0100, Dmitry Vyukov wrote: >> On Thu, Dec 3, 2015 at 9:51 PM, Joe Perches wrote: >>> (adding lkml as this is likely better discussed there) >>> >>> On Thu, 2015-12-03 at 15:42 -0500, Jason Baron wrote: >>>

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Marcelo Ricardo Leitner
On Fri, Dec 04, 2015 at 11:40:02AM +0100, Dmitry Vyukov wrote: > On Thu, Dec 3, 2015 at 9:51 PM, Joe Perches wrote: > > (adding lkml as this is likely better discussed there) > > > > On Thu, 2015-12-03 at 15:42 -0500, Jason Baron wrote: > >> On 12/03/2015 03:24 PM, Joe Perches wrote: > >> > On Thu

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Dmitry Vyukov
On Thu, Dec 3, 2015 at 6:02 PM, Eric Dumazet wrote: > On Thu, Dec 3, 2015 at 7:55 AM, Dmitry Vyukov wrote: >> On Thu, Dec 3, 2015 at 3:48 PM, Eric Dumazet wrote: No, I don't. But pr_debug always computes its arguments. See no_printk in printk.h. So this use-after-free happens for

Re: use-after-free in sctp_do_sm

2015-12-04 Thread Dmitry Vyukov
On Thu, Dec 3, 2015 at 9:51 PM, Joe Perches wrote: > (adding lkml as this is likely better discussed there) > > On Thu, 2015-12-03 at 15:42 -0500, Jason Baron wrote: >> On 12/03/2015 03:24 PM, Joe Perches wrote: >> > On Thu, 2015-12-03 at 15:10 -0500, Jason Baron wrote: >> > > On 12/03/2015 03:03

Re: use-after-free in sctp_do_sm

2015-12-03 Thread Joe Perches
(adding lkml as this is likely better discussed there) On Thu, 2015-12-03 at 15:42 -0500, Jason Baron wrote: > On 12/03/2015 03:24 PM, Joe Perches wrote: > > On Thu, 2015-12-03 at 15:10 -0500, Jason Baron wrote: > > > On 12/03/2015 03:03 PM, Joe Perches wrote: > > > > On Thu, 2015-12-03 at 14:32 -