]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/uprobe_event: Fix strncpy corner case
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 10 Apr 2018 12:20:08 +0000 (21:20 +0900)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Apr 2018 18:14:11 +0000 (20:14 +0200)
commit30ab20ed7a9632e683f2bbc3fede972f601d1f5f
tree8bb731fed7122c417891afeb5381290b10bd37d0
parent1cb95e3957230ec7ed0316a0e7e8caea85bd94ec
tracing/uprobe_event: Fix strncpy corner case

Fix string fetch function to terminate with NUL.
It is OK to drop the rest of string.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: security@kernel.org
Cc: 范龙飞 <long7573@126.com>
Fixes: 4d604f010e43 ("tracing/probes: Implement 'memory' fetch method for uprobes")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/trace/trace_uprobe.c