lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1453099068-39022-1-git-send-email-maninder1.s@samsung.com>
Date:	Mon, 18 Jan 2016 12:07:48 +0530
From:	Maninder Singh <maninder1.s@...sung.com>
To:	davem@...emloft.net, willemb@...gle.com, daniel@...earbox.net,
	edumazet@...gle.com, eyal.birger@...il.com, tklauser@...tanz.ch,
	fruggeri@...stanetworks.com, dwmw2@...radead.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	pankaj.m@...sung.com, gh007.kim@...sung.com,
	hakbong5.lee@...sung.com, Maninder Singh <maninder1.s@...sung.com>,
	Vaneet Narang <v.narang@...sung.com>
Subject: [PATCH] af_packet: Raw socket destruction warning fix

Receieve queue is not purged when socket dectruction is called
results in kernel warning because of non zero sk_rmem_alloc.

WARNING: at net/packet/af_packet.c:1142 packet_sock_destruct

Backtrace:
WARN_ON(atomic_read(&sk->sk_rmem_alloc)
packet_sock_destruct
__sk_free
sock_wfree
skb_release_head_state
skb_release_all
__kfree_skb
net_tx_action
__do_softirq
run_ksoftirqd

Signed-off-by: Vaneet Narang <v.narang@...sung.com>
Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
---
 net/packet/af_packet.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 81b4b81..bcb37ba 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1310,6 +1310,7 @@ static bool packet_rcv_has_room(struct packet_sock *po, struct sk_buff *skb)
 
 static void packet_sock_destruct(struct sock *sk)
 {
+	skb_queue_purge(&sk->sk_receive_queue);
 	skb_queue_purge(&sk->sk_error_queue);
 
 	WARN_ON(atomic_read(&sk->sk_rmem_alloc));
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ