summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorDongliang Mu <mudongliangabcd@gmail.com>2021-06-16 10:48:33 +0800
committerSasha Levin <sashal@kernel.org>2021-06-30 08:49:33 -0400
commit7cc8b2e05fcea6edd022d26e82091d781af8fd9b (patch)
treecee89a44d2fcd1208e41b86144a2b240262a8f5a /net/unix/af_unix.c
parentd9daf2000f6c84ff96ba14d2e5383b92c0d9c514 (diff)
net: usb: fix possible use-after-free in smsc75xx_bind
[ Upstream commit 56b786d86694e079d8aad9b314e015cd4ac02a3d ] The commit 46a8b29c6306 ("net: usb: fix memory leak in smsc75xx_bind") fails to clean up the work scheduled in smsc75xx_reset-> smsc75xx_set_multicast, which leads to use-after-free if the work is scheduled to start after the deallocation. In addition, this patch also removes a dangling pointer - dev->data[0]. This patch calls cancel_work_sync to cancel the scheduled work and set the dangling pointer to NULL. Fixes: 46a8b29c6306 ("net: usb: fix memory leak in smsc75xx_bind") Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions