From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932104AbcCAXzF (ORCPT ); Tue, 1 Mar 2016 18:55:05 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:34623 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755448AbcCAXzA (ORCPT ); Tue, 1 Mar 2016 18:55:00 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=EptSn/bVN1TVJ2P1GBB2K3zSVX9vn0kkwvXe4Nm4oD44Jon3E1oOVpZEUTDLJR3NozRPwNpFMatv V1xg8wq5NPCOJvh92RtYHvl6aapXodclDRh0q2RZwO/DrD63HBMoUvxRbWr0ARqSOZhgSOjrn9c9 VNSqF6FbKPzarB3RxSQ=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 007/342] af_unix: fix struct pid memory leak X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Dmitry Vyukov , Eric Dumazet , Rainer Weikusat , "David S. Miller" Message-Id: <20160301234528.224996264@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.37b2aecc0f57496e82608e26217aa905 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:53:54 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ Upstream commit fa0dc04df259ba2df3ce1920e9690c7842f8fa4b ] 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: b3ca9b02b007 ("net: fix multithreaded signal handling in unix recv routines") Reported-by: Dmitry Vyukov Signed-off-by: Eric Dumazet Cc: Rainer Weikusat Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/unix/af_unix.c | 1 + 1 file changed, 1 insertion(+) --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2332,6 +2332,7 @@ again: if (signal_pending(current)) { err = sock_intr_errno(timeo); + scm_destroy(&scm); goto out; }