diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-04-17 10:27:57 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-04-17 10:34:43 -0400 |
commit | 3193899d4dd54056f8c2e0b1e40dd6e2f0009f28 (patch) | |
tree | 8f118c5311094656325fff91c1a036d042ce46dc /mm/mmzone.c | |
parent | 84fce9db4d7eaebd6cb2ee30c15da6d4e4daf846 (diff) | |
download | linux-3193899d4dd54056f8c2e0b1e40dd6e2f0009f28.tar.gz linux-3193899d4dd54056f8c2e0b1e40dd6e2f0009f28.tar.bz2 linux-3193899d4dd54056f8c2e0b1e40dd6e2f0009f28.zip |
tracing: Fix possible out of bounds memory access when parsing enums
The code that replaces the enum names with the enum values in the
tracepoints' format files could possible miss the end of string nul
character. This was caused by processing things like backslashes, quotes
and other tokens. After processing the tokens, a check for the nul
character needed to be done before continuing the loop, because the loop
incremented the pointer before doing the check, which could bypass the nul
character.
Link: http://lkml.kernel.org/r/552E661D.5060502@oracle.com
Reported-by: Sasha Levin <sasha.levin@oracle.com> # via KASan
Tested-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Fixes: 0c564a538aa9 "tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'mm/mmzone.c')
0 files changed, 0 insertions, 0 deletions