This is a note to let you know that I've just added the patch titled netfilter: nf_queue: fix socket leak to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: netfilter-nf_queue-fix-socket-leak.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From avimalin@xxxxxxxxx Tue Oct 11 20:34:34 2022 From: Vimal Agrawal <avimalin@xxxxxxxxx> Date: Tue, 11 Oct 2022 22:52:02 +0530 Subject: netfilter: nf_queue: fix socket leak To: stable@xxxxxxxxxxxxxxx Cc: fw@xxxxxxxxx, avimalin@xxxxxxxxx, Vimal Agrawal <vimal.agrawal@xxxxxxxxxx> Message-ID: <20221011172202.3709-1-vimal.agrawal@xxxxxxxxxx> From: Vimal Agrawal <avimalin@xxxxxxxxx> Removal of the sock_hold got lost when backporting commit 4d05239203fa ("netfilter: nf_queue: fix possible use-after-free") to 4.14 This was causing a socket leak and was caught by kmemleak. Tested by running kmemleak again with this fix. Fixes: ef97921ccdc2 ("netfilter: nf_queue: fix possible use-after-free") in 4.14 Signed-off-by: Vimal Agrawal <vimal.agrawal@xxxxxxxxxx> Reviewed-by: Florian Westphal <fw@xxxxxxxxx> --- net/netfilter/nf_queue.c | 2 -- 1 file changed, 2 deletions(-) --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -91,8 +91,6 @@ bool nf_queue_entry_get_refs(struct nf_q dev_hold(state->in); if (state->out) dev_hold(state->out); - if (state->sk) - sock_hold(state->sk); #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) if (entry->skb->nf_bridge) { struct net_device *physdev; Patches currently in stable-queue which might be from avimalin@xxxxxxxxx are queue-4.14/netfilter-nf_queue-fix-socket-leak.patch