Fix: memcpy of string is larger than source
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 9 Oct 2012 16:47:31 +0000 (12:47 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 9 Oct 2012 16:47:31 +0000 (12:47 -0400)
commit1c7b4a9b7cc83f750a7d58d5e2f4894a2559f583
tree6547f991fa9aa612840899dfcd4b19650e2b0525
parent38936cf4da9aaf752fdc9c2c56e00b9ddcad8530
Fix: memcpy of string is larger than source

Hollis Blanchard <hollis_blanchard@mentor.com> wrote:
> I seem to have hit a little problem with a "hello world" test app and
> lttng-ust 2.0.3. lttng-ust.git seems to be affected as well. Basically,
> I created a single UST tracepoint, but as soon as I run "lttng
> enable-event -u -a", my app segfaults. The problem seems to be that when
> creating the event to pass to ltt_event_create(), we try to memcpy the
> full 256 bytes of name. However, the name might be shorter, and if we
> get unlucky it falls within 256 bytes of the segment boundary...

Fixing the 3 sites where this issue arise. Manually inspecting all
memcpy in the UST code returned by grep did the job.

Reported-by: Hollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/compat.h
liblttng-ust/ltt-events.c
liblttng-ust/ltt-probes.c
This page took 0.024718 seconds and 4 git commands to generate.