Duoming Zhou
175302f6b7
mISDN: hfcpci: Fix use-after-free bug in hfcpci_softirq
...
The function hfcpci_softirq() is a timer handler. If it
is running, the timer_pending() will return 0 and the
del_timer_sync() in HFC_cleanup() will not be executed.
As a result, the use-after-free bug will happen. The
process is shown below:
(cleanup routine) | (timer handler)
HFC_cleanup() | hfcpci_softirq()
if (timer_pending(&hfc_tl)) |
del_timer_sync() |
... | ...
pci_unregister_driver(hc) |
driver_unregister | driver_for_each_device
bus_remove_driver | _hfcpci_softirq
driver_detach | ...
put_device(dev) //[1]FREE |
| dev_get_drvdata(dev) //[2]USE
The device is deallocated is position [1] and used in
position [2].
Fix by removing the "timer_pending" check in HFC_cleanup(),
which makes sure that the hfcpci_softirq() have finished
before the resource is deallocated.
Fixes: 009fc857c5 ("mISDN: fix possible use-after-free in HFC_cleanup()")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn >
Signed-off-by: David S. Miller <davem@davemloft.net >
2022-10-09 19:11:54 +01:00
..
2022-08-08 11:31:40 -07:00
2022-10-03 13:19:53 -07:00
2022-08-30 11:12:52 +01:00
2022-09-02 10:50:08 -07:00
2022-10-03 15:33:38 -07:00
2022-08-08 20:51:59 -07:00
2022-10-03 13:26:47 -07:00
2022-09-07 11:00:30 +03:00
2022-10-04 13:38:03 -07:00
2022-09-19 10:33:39 -07:00
2022-09-20 16:07:12 -07:00
2022-08-26 11:19:44 -04:00
2022-10-03 13:19:53 -07:00
2022-08-11 14:41:52 -07:00
2022-08-04 19:30:35 -07:00
2022-09-22 14:26:37 +02:00
2022-10-03 13:26:47 -07:00
2022-09-03 20:14:51 +02:00
2022-09-27 18:30:48 -04:00
2022-08-05 16:11:38 -07:00
2022-09-24 18:05:53 -07:00
2022-09-26 03:59:43 +09:00
2022-09-05 11:54:50 +05:30
2022-08-25 13:10:30 +02:00
2022-10-04 10:00:25 +02:00
2022-07-15 11:37:41 +09:00
2022-07-28 22:21:54 -07:00
2022-10-04 13:38:03 -07:00
2022-09-19 12:58:19 +08:00
2022-09-26 09:20:09 +02:00
2022-09-30 23:10:55 +02:00
2022-08-31 09:54:14 -07:00
2022-09-30 20:05:16 +02:00
2022-10-03 15:33:38 -07:00
2022-07-16 21:47:44 -05:00
2022-08-05 10:07:23 -07:00
2022-10-03 13:19:53 -07:00
2022-09-21 20:33:49 +02:00
2022-10-03 15:33:38 -07:00
2022-09-28 19:20:49 -07:00
2022-10-03 15:33:38 -07:00
2022-07-15 17:56:31 +03:00
2022-09-21 10:22:54 +02:00
2022-09-16 09:25:51 +01:00
2022-10-09 19:11:54 +01:00
2022-08-08 11:36:21 -07:00
2022-07-20 22:06:30 +10:00
2022-08-08 10:19:40 -07:00
2022-07-12 09:04:55 +02:00
2022-10-03 20:11:59 -07:00
2022-10-01 09:27:18 -07:00
2022-08-08 14:29:00 -07:00
2022-08-04 19:41:09 -07:00
2022-09-09 07:54:47 +01:00
2022-10-03 17:24:22 -07:00
2022-09-27 12:38:29 +02:00
2022-08-05 14:13:45 -07:00
2022-10-07 08:50:07 +01:00
2022-08-22 14:51:30 +01:00
2022-08-09 17:54:03 -04:00
2022-09-24 18:14:12 -07:00
2022-09-30 09:33:33 -07:00
2022-08-04 12:12:54 -07:00
2022-09-22 13:02:10 -07:00
2022-08-16 10:48:08 +05:30
2022-09-15 07:33:26 +02:00
2022-08-13 14:00:45 -07:00
2022-08-15 20:31:35 +02:00
2022-10-03 13:19:53 -07:00
2022-09-29 14:30:51 -07:00
2022-09-22 13:02:10 -07:00
2022-09-30 20:05:16 +02:00
2022-09-24 18:07:42 +02:00
2022-08-12 09:37:33 -07:00
2022-09-24 19:32:46 +02:00
2022-09-27 17:33:11 -07:00
2022-08-04 12:12:54 -07:00
2022-08-22 19:30:02 +02:00
2022-10-03 15:33:38 -07:00
2022-08-16 01:40:24 -04:00
2022-09-22 17:48:35 +02:00
2022-07-16 23:08:47 -05:00
2022-08-09 00:56:41 +02:00
2022-09-29 14:30:51 -07:00
2022-09-29 05:40:59 -07:00
2022-07-08 15:43:42 +02:00
2022-09-29 14:30:51 -07:00
2022-09-01 14:26:44 +05:30
2022-10-03 20:09:22 +02:00
2022-10-04 13:38:03 -07:00
2022-08-29 12:47:15 +01:00
2022-08-25 11:40:06 +02:00
2022-10-04 13:38:03 -07:00
2022-10-04 13:38:03 -07:00
2022-09-22 16:38:18 +02:00
2022-08-19 21:34:36 -04:00
2022-10-03 13:19:53 -07:00
2022-10-04 13:38:03 -07:00
2022-09-09 07:44:33 -04:00
2022-10-03 17:44:18 -07:00
2022-09-12 18:33:55 -04:00
2022-09-01 13:00:48 -06:00
2022-08-16 01:40:24 -04:00
2022-08-08 15:04:04 -07:00
2022-09-23 08:31:24 -07:00
2022-08-04 12:01:42 -07:00