aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/cpu.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <[email protected]>2025-07-04 06:23:52 +0000
committerJakub Kicinski <[email protected]>2025-07-10 00:52:26 +0000
commit62dba28275a9a3104d4e33595c7b3328d4032d8d (patch)
tree95e7b3f7a457c709fa0a5fe5f540a15f6914143a /rust/helpers/cpu.c
parentatm: clip: Fix potential null-ptr-deref in to_atmarpd(). (diff)
downloadkernel-62dba28275a9a3104d4e33595c7b3328d4032d8d.tar.gz
kernel-62dba28275a9a3104d4e33595c7b3328d4032d8d.zip
atm: clip: Fix memory leak of struct clip_vcc.
ioctl(ATMARP_MKIP) allocates struct clip_vcc and set it to vcc->user_back. The code assumes that vcc_destroy_socket() passes NULL skb to vcc->push() when the socket is close()d, and then clip_push() frees clip_vcc. However, ioctl(ATMARPD_CTRL) sets NULL to vcc->push() in atm_init_atmarp(), resulting in memory leak. Let's serialise two ioctl() by lock_sock() and check vcc->push() in atm_init_atmarp() to prevent memleak. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'rust/helpers/cpu.c')
0 files changed, 0 insertions, 0 deletions