提交 fa0dc04d 编写于 作者: E Eric Dumazet 提交者: David S. Miller

af_unix: fix struct pid memory leak

Dmitry reported a struct pid leak detected by a syzkaller program.

Bug happens in unix_stream_recvmsg() when we break the loop when a
signal is pending, without properly releasing scm.

Fixes: b3ca9b02 ("net: fix multithreaded signal handling in unix recv routines")
Reported-by: NDmitry Vyukov <dvyukov@google.com>
Signed-off-by: NEric Dumazet <edumazet@google.com>
Cc: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4877be90
......@@ -2339,6 +2339,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state)
if (signal_pending(current)) {
err = sock_intr_errno(timeo);
scm_destroy(&scm);
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册