Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1284071
| From | Jason Baron <jbaron@akamai.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: use-after-free in sctp_do_sm |
| Date | 2015-12-04 18:20 +0100 |
| Message-ID | <qC2bx-5CT-43@gated-at.bofh.it> (permalink) |
| References | (12 earlier) <qBJ8S-1Cs-45@gated-at.bofh.it> <qBJ8S-1Cs-19@gated-at.bofh.it> <qC1ft-50Q-27@gated-at.bofh.it> <qC1It-5b5-11@gated-at.bofh.it> <qC21Q-5zk-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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)) >> <do debug stuff> >> >> So the compiler is not emitting the side-effects in this >> case. > > Huh? Do I misunderstand what you are writing? Yes, I wasn't terribly clear - I was trying to say that the 'side-effects', in this case the debug code and use-after-free, are hidden behind the branch. They aren't invoked unless we enable the debug statement. Thanks, -Jason > > You are testing a variable that is not generally set > so the call is not being performed in the general case, > but the compiler can not elide the code. > > If the variable was enabled via the control file, the > __dynamic_pr_debug would be performed with the > use-after-free. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: use-after-free in sctp_do_sm Joe Perches <joe@perches.com> - 2015-12-03 22:00 +0100
Re: use-after-free in sctp_do_sm Dmitry Vyukov <dvyukov@google.com> - 2015-12-04 11:50 +0100
Re: use-after-free in sctp_do_sm Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2015-12-04 14:00 +0100
Re: use-after-free in sctp_do_sm Vlad Yasevich <vyasevich@gmail.com> - 2015-12-04 16:40 +0100
Re: use-after-free in sctp_do_sm Aaron Conole <aconole@redhat.com> - 2015-12-04 17:00 +0100
Re: use-after-free in sctp_do_sm Dmitry Vyukov <dvyukov@google.com> - 2015-12-04 17:20 +0100
Re: use-after-free in sctp_do_sm Jason Baron <jbaron@akamai.com> - 2015-12-04 17:50 +0100
Re: use-after-free in sctp_do_sm Joe Perches <joe@perches.com> - 2015-12-04 18:10 +0100
Re: use-after-free in sctp_do_sm Jason Baron <jbaron@akamai.com> - 2015-12-04 18:20 +0100
csiph-web