]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tasks/debug: add some extra controls of use-after-free in DEBUG_TASK
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Feb 2021 13:38:49 +0000 (14:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Feb 2021 13:38:49 +0000 (14:38 +0100)
commitca9f60c1ac4c792182b28ca601e9f8897b6eeed1
tree68a559dd3bbe04b12eee6ed3f80dae1a9cd478b0
parentb23f04260bf46caf1f2c76af97d77511291851c6
MINOR: tasks/debug: add some extra controls of use-after-free in DEBUG_TASK

It's pretty easy to pre-initialize the index, change it on free() and check
it during the wakeup, so let's do this to ease detection of any accidental
task_wakeup() after a task_free() or tasklet_wakeup() after a tasklet_free().
If this would ever happen we'd then get a backtrace and a core now. The
index's parity is respected so that the call history remains exploitable.
include/haproxy/task.h