[PATCH v2 0/2] fix eal: unregister alarm callback before free
Rui Ferreira
rui.ferreira1 at h-partners.com
Fri May 30 10:18:42 CEST 2025
This was flagged by Address sanitizer as a use after free in Linux. A
pointer is freed in the main thread but used by a callback in another thread.
It can be reliably reproduced in Linux with ASAN but I could not trigger the
same issue in FreeBSD.
I've included nearly identical patches for Linux and FreeBSD. I did not
include any changes for Windows since the same issue does not seem to apply
there (thread is actually cancelled, no shared ptr).
Bugzilla ID: 1683
Rui Ferreira (2):
fix eal/linux: unregister alarm callback before free
fix eal/freebsd: unregister alarm callback before free
.mailmap | 1 +
lib/eal/freebsd/eal.c | 3 ++-
lib/eal/freebsd/eal_alarm.c | 8 +++++++-
lib/eal/linux/eal.c | 3 ++-
lib/eal/linux/eal_alarm.c | 9 ++++++++-
5 files changed, 20 insertions(+), 4 deletions(-)
--
2.43.0
More information about the dev
mailing list