Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Apr 2012 21:31:57 GMT
From:      Ryan Stone <rstone@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/166921: Use after free in dtrace(1) error handling
Message-ID:  <201204132131.q3DLVvG5060358@red.freebsd.org>
Resent-Message-ID: <201204132140.q3DLe6m7066324@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166921
>Category:       misc
>Synopsis:       Use after free in dtrace(1) error handling
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 13 21:40:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ryan Stone
>Release:        8-STABLE
>Organization:
>Environment:
>Description:
If I run dtrace(1) under valgrind (memcheck) and hit the "no probes matched" case, I sometimes see dtrace segfault.  It would seem that one thread in dtrace frees memory while the other is still accessing it.  If that memory is subsequently re-allocated dtrace crashes.

Running dtrace with MALLOC_OPTIONS=AJ would probably reproduce this easily.

I think that one sample invocation was something like dtrace -p <pid> -n 'pid$target:libc*:malloc:entry' (see reqst00307862 for the fact that this doesn't match a probe in the first place.

I think that this has the necessary syscalls implemented to run dtrace under valgrind:

https://bitbucket.org/rysto32/valgrind-freebsd
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204132131.q3DLVvG5060358>