Re: [PATCH] net: sock: tracing: Fix sock_exceed_buf_limit not to dereference stale pointer

From
patchwork-bot+netdevbpf@kernel.org
Date
2022-07-08 11:10:18
Also in
lkml
Reply to
Steven Rostedt, 2022-07-06
Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller [off-list ref]:

On Wed, 6 Jul 2022 10:50:40 -0400 you wrote:
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The trace event sock_exceed_buf_limit saves the prot->sysctl_mem pointer
and then dereferences it in the TP_printk() portion. This is unsafe as the
TP_printk() portion is executed at the time the buffer is read. That is,
it can be seconds, minutes, days, months, even years later. If the proto
is freed, then this dereference will can also lead to a kernel crash.

[...]
Here is the summary with links:
  - net: sock: tracing: Fix sock_exceed_buf_limit not to dereference stale pointer
    https://git.kernel.org/netdev/net/c/820b8963adae

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Thread (3 messages) 3 messages, 3 authors, last reply 2022-07-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help