Files
wadamesh/scripts
Martin Kremers eac02c2161 lvgl: fix use-after-free on deleted scroll_obj and pending async deletes
Fixes the beta_102 T-Deck LoadProhibited panic and a related async bug.

scroll_obj: LVGL 8.4 resets an indev only for act_obj/last_obj. After
lv_indev_wait_release() (via popupClose()), scroll_obj survives for the
throw. A sheet closed mid-scroll leaves it dangling, and the next press
crashes in _lv_indev_scroll_handler. patch_lvgl_scroll_uaf.py also
resets the indev on scroll_obj delete, as LVGL 9 does. SCROLL/SCROLL_END
handlers must still not delete synchronously (throw handler skips
reset_query).

async del: LVGL 8.4 never cancels queued lv_obj_del_async(), so freed
objects get deleted again. patch_lvgl_async_del.py cancels pending
deletes in obj_del_core() and frees info/timer before the call in
lv_async_timer_cb(). Both halves are required, or a double free occurs.

Patches are idempotent, fail closed on version drift, and are wired
into all PlatformIO, Tanmatsu, P4 and web builds. ASan tests in
test/lvgl_scroll_uaf and test/lvgl_async_del_uaf: stock LVGL fails,
patched LVGL is clean.
2026-11-13 16:07:40 +01:00
..
2026-08-23 20:32:26 -04:00
2026-11-06 18:38:40 +01:00
2026-08-23 20:32:26 -04:00