diff options
author | Qiujun Huang <hqjagain@gmail.com> | 2020-10-30 00:19:05 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-10 12:37:28 +0100 |
commit | ec5f524e0293e19d2bf89219d7d589e1fb654e87 (patch) | |
tree | 5e04463111ba0cc3c6fe2205a6471c6e38c50009 /kernel/utsname.c | |
parent | 9f6883fce69454809f6105041be02d2e71dc358a (diff) | |
download | linux-stable-ec5f524e0293e19d2bf89219d7d589e1fb654e87.tar.gz linux-stable-ec5f524e0293e19d2bf89219d7d589e1fb654e87.tar.bz2 linux-stable-ec5f524e0293e19d2bf89219d7d589e1fb654e87.zip |
tracing: Fix out of bounds write in get_trace_buf
commit c1acb4ac1a892cf08d27efcb964ad281728b0545 upstream.
The nesting count of trace_printk allows for 4 levels of nesting. The
nesting counter starts at zero and is incremented before being used to
retrieve the current context's buffer. But the index to the buffer uses the
nesting counter after it was incremented, and not its original number,
which in needs to do.
Link: https://lkml.kernel.org/r/20201029161905.4269-1-hqjagain@gmail.com
Cc: stable@vger.kernel.org
Fixes: 3d9622c12c887 ("tracing: Add barrier to trace_printk() buffer nesting modification")
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/utsname.c')
0 files changed, 0 insertions, 0 deletions