Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1350108

[PATCH 3.12 006/116] af_unix: fix struct pid memory leak

From Jiri Slaby <jslaby@suse.cz>
Newsgroups linux.kernel
Subject [PATCH 3.12 006/116] af_unix: fix struct pid memory leak
Date 2016-03-04 11:00 +0100
Message-ID <r8UGD-4LF-11@gated-at.bofh.it> (permalink)
References <r8TUd-4rg-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Eric Dumazet <edumazet@google.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

[ 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 <dvyukov@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 net/unix/af_unix.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 31b88dcb0f01..5fb2d2af3e52 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2131,6 +2131,7 @@ again:
 
 			if (signal_pending(current)) {
 				err = sock_intr_errno(timeo);
+				scm_destroy(siocb->scm);
 				goto out;
 			}
 
-- 
2.7.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.12 000/116] 3.12.56-stable review Jiri Slaby <jslaby@suse.cz> - 2016-03-04 10:10 +0100
  [PATCH 3.12 001/116] proc: Fix ptrace-based permission checks for accessing task maps Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 016/116] bonding: Fix ARP monitor validation Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 007/116] pptp: fix illegal memory access caused by multiple bind()s Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 012/116] net:Add sysctl_max_skb_frags Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 006/116] af_unix: fix struct pid memory leak Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 008/116] sctp: allow setting SCTP_SACK_IMMEDIATELY by the application Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 009/116] ipv6/udp: use sticky pktinfo egress ifindex on connect() Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 011/116] ipv6: fix a lockdep splat Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
    [PATCH 3.12 015/116] bonding: fix bond_arp_rcv() race of curr_active_slave Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
  Re: [PATCH 3.12 000/116] 3.12.56-stable review Guenter Roeck <linux@roeck-us.net> - 2016-03-04 15:10 +0100
    Re: [PATCH 3.12 000/116] 3.12.56-stable review Jiri Slaby <jslaby@suse.cz> - 2016-03-08 16:50 +0100
  Re: [PATCH 3.12 000/116] 3.12.56-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-03-04 15:50 +0100

csiph-web