diff options
author | Vladislav Efanov <VEfanov@ispras.ru> | 2023-05-26 19:16:32 +0300 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2023-05-27 00:14:49 +0300 |
commit | abac3ac97fe8734b620e7322a116450d7f90aa43 (patch) | |
tree | 286962a4c0dd2977a5f1594df9cb30de180e6026 /drivers/gpu/drm/pl111/pl111_display.c | |
parent | 44c026a73be8038f03dbdeef028b642880cf1511 (diff) | |
download | linux-abac3ac97fe8734b620e7322a116450d7f90aa43.tar.xz |
batman-adv: Broken sync while rescheduling delayed work
Syzkaller got a lot of crashes like:
KASAN: use-after-free Write in *_timers*
All of these crashes point to the same memory area:
The buggy address belongs to the object at ffff88801f870000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 5320 bytes inside of
8192-byte region [ffff88801f870000, ffff88801f872000)
This area belongs to :
batadv_priv->batadv_priv_dat->delayed_work->timer_list
The reason for these issues is the lack of synchronization. Delayed
work (batadv_dat_purge) schedules new timer/work while the device
is being deleted. As the result new timer/delayed work is set after
cancel_delayed_work_sync() was called. So after the device is freed
the timer list contains pointer to already freed memory.
Found by Linux Verification Center (linuxtesting.org) with syzkaller.
Cc: stable@kernel.org
Fixes: 2f1dfbe18507 ("batman-adv: Distributed ARP Table - implement local storage")
Signed-off-by: Vladislav Efanov <VEfanov@ispras.ru>
Acked-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'drivers/gpu/drm/pl111/pl111_display.c')
0 files changed, 0 insertions, 0 deletions