summaryrefslogtreecommitdiffstats
path: root/drivers/ptp/ptp_clockmatrix.c
diff options
context:
space:
mode:
authorLin Ma <linma@zju.edu.cn>2021-11-11 15:14:02 +0100
committerJakub Kicinski <kuba@kernel.org>2021-11-13 04:56:47 +0100
commit81b1d548d00bcd028303c4f3150fa753b9b8aa71 (patch)
tree3fa494df2325fcbdf209faa46ced6bcb33853dba /drivers/ptp/ptp_clockmatrix.c
parentMerge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert... (diff)
downloadlinux-81b1d548d00bcd028303c4f3150fa753b9b8aa71.tar.xz
linux-81b1d548d00bcd028303c4f3150fa753b9b8aa71.zip
hamradio: remove needs_free_netdev to avoid UAF
The former patch "defer 6pack kfree after unregister_netdev" reorders the kfree of two buffer after the unregister_netdev to prevent the race condition. It also adds free_netdev() function in sixpack_close(), which is a direct copy from the similar code in mkiss_close(). However, in sixpack driver, the flag needs_free_netdev is set to true in sp_setup(), hence the unregister_netdev() will free the netdev automatically. Therefore, as the sp is netdev_priv, use-after-free occurs. This patch removes the needs_free_netdev = true and just let the free_netdev to finish this deallocation task. Fixes: 0b9111922b1f ("hamradio: defer 6pack kfree after unregister_netdev") Signed-off-by: Lin Ma <linma@zju.edu.cn> Link: https://lore.kernel.org/r/20211111141402.7551-1-linma@zju.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/ptp/ptp_clockmatrix.c')
0 files changed, 0 insertions, 0 deletions