summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorBeau Belgrave <beaub@linux.microsoft.com>2023-04-26 01:51:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-11 17:03:32 +0300
commit0489c2b2c3104b89f078dbcec8c744dfc157d3e9 (patch)
tree1ea6ff33590f5022f19bba3fda1cce1eddc0f933 /drivers/clk
parent6472a6d0c79826256bfa3a6b45710dd499a984bf (diff)
downloadlinux-0489c2b2c3104b89f078dbcec8c744dfc157d3e9.tar.xz
tracing/user_events: Ensure write index cannot be negative
[ Upstream commit cd98c93286a30cc4588dfd02453bec63c2f4acf4 ] The write index indicates which event the data is for and accesses a per-file array. The index is passed by user processes during write() calls as the first 4 bytes. Ensure that it cannot be negative by returning -EINVAL to prevent out of bounds accesses. Update ftrace self-test to ensure this occurs properly. Link: https://lkml.kernel.org/r/20230425225107.8525-2-beaub@linux.microsoft.com Fixes: 7f5a08c79df3 ("user_events: Add minimal support for trace_event into ftrace") Reported-by: Doug Cook <dcook@linux.microsoft.com> Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clk')
0 files changed, 0 insertions, 0 deletions