WSL2-Linux-Kernel/drivers/atm
Duoming Zhou a5d7ce086f atm: idt77252: fix use-after-free bugs caused by tst_timer
commit 3f4093e2bf upstream.

There are use-after-free bugs caused by tst_timer. The root cause
is that there are no functions to stop tst_timer in idt77252_exit().
One of the possible race conditions is shown below:

    (thread 1)          |        (thread 2)
                        |  idt77252_init_one
                        |    init_card
                        |      fill_tst
                        |        mod_timer(&card->tst_timer, ...)
idt77252_exit           |  (wait a time)
                        |  tst_timer
                        |
                        |    ...
  kfree(card) // FREE   |
                        |    card->soft_tst[e] // USE

The idt77252_dev is deallocated in idt77252_exit() and used in
timer handler.

This patch adds del_timer_sync() in idt77252_exit() in order that
the timer handler could be stopped before the idt77252_dev is
deallocated.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20220805070008.18007-1-duoming@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:40:15 +02:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kconfig docs: networking: move ATM drivers to the hw driver section 2020-06-26 16:08:45 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
adummy.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
ambassador.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
ambassador.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
atmtcp.c atm: atmtcp: Constify atmtcp_v_dev_ops 2020-09-28 16:03:30 -07:00
eni.c atm: eni: Add check for dma_map_single 2022-03-23 09:16:41 +01:00
eni.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
firestream.c atm: firestream: check the return value of ioremap() in fs_init() 2022-03-19 13:47:49 +01:00
firestream.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
fore200e.c atm: fore200e: Fix fall-through warnings for Clang 2021-05-17 18:50:49 -05:00
fore200e.h fore200e: devirtualize dma alloc calls 2018-10-10 22:38:50 -07:00
he.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
he.h
horizon.c atm: horizon: Fix spelling mistakes in TX comment 2021-08-08 12:58:42 +01:00
horizon.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
idt77105.c atm: idt77252: fix null-ptr-dereference 2021-03-08 15:16:30 -08:00
idt77105.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idt77252.c atm: idt77252: fix use-after-free bugs caused by tst_timer 2022-08-25 11:40:15 +02:00
idt77252.h atm: idt77252: fix build broken on amd64 2021-02-15 12:36:27 -08:00
idt77252_tables.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iphase.c atm: iphase: fix possible use-after-free in ia_module_exit() 2021-05-11 16:12:03 -07:00
iphase.h atm: Replace custom isprint() with generic analogue 2021-05-10 14:51:01 -07:00
lanai.c atm: lanai: dont run lanai_dev_close if not open 2021-03-01 13:18:54 -08:00
midway.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nicstar.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-29 15:45:27 -07:00
nicstar.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nicstarmac.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nicstarmac.copyright
solos-attrlist.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
solos-pci.c net/atm: remove the atmdev_ops {get, set}sockopt methods 2020-07-19 18:16:40 -07:00
suni.c atm: delete include/linux/atm_suni.h 2021-03-15 12:43:10 -07:00
suni.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tonga.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uPD98401.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uPD98402.c atm: uPD98402: fix incorrect allocation 2021-03-08 15:16:30 -08:00
uPD98402.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zatm.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
zatm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zeprom.h atm: Fix typo 2021-05-21 13:55:32 -07:00