diff options
author | Duoming Zhou <[email protected]> | 2024-03-24 22:04:44 +0800 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2024-05-04 12:50:40 +0200 |
commit | 573601521277119f2e2ba5f28ae6e87fc594f4d4 (patch) | |
tree | ecf4cdc2a31d15366de1abe74f6fdffd2749835c /scripts/gdb/linux/slab.py | |
parent | 1f6602c8ed1eccac4fa83e338d02aafe3a0e2c0a (diff) |
watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger
When the cpu5wdt module is removing, the origin code uses del_timer() to
de-activate the timer. If the timer handler is running, del_timer() could
not stop it and will return directly. If the port region is released by
release_region() and then the timer handler cpu5wdt_trigger() calls outb()
to write into the region that is released, the use-after-free bug will
happen.
Change del_timer() to timer_shutdown_sync() in order that the timer handler
could be finished before the port region is released.
Fixes: e09d9c3e9f85 ("watchdog: cpu5wdt.c: add missing del_timer call")
Signed-off-by: Duoming Zhou <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/slab.py')
0 files changed, 0 insertions, 0 deletions