AFLplusplus / AFLplusplus/LibAFL

pthread_spin_* family of functions are not always available

Ouverte
#2,414 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Rust
Étoiles
2.6k
Forks
481
Merge moyen
2 j 30 min
PR mergées (30 j)
16

Description

malloc.c in libqasan contains a conditional compilation that causes libqasan to use either spin locks or mutex locks. I am unsure on how it is detected which one should be used exactly, but I found that spin function are often not available on some firmware. This firmware can be used to reproduce the issue https://archive.org/details/Linksys_EA6300_1.1.40_e2ec7. The libraries do not contain the spin functions but libqasan does expect them.

I do realize that the issue is most likely with the cross compiler used, causing libqasan to expect these functions; but it is quite difficult to track down the right compiler for ARM binaries with limited information. For my project I forced LibAFL to always used mutex locks.

With this bug report I wanted to bring this to your attention and maybe it is worth considering to always use the mutex functions if the slowdown is not signficant, so that libqasan may be more compiler agnostic and work with more unknown firmware/binaries.

My fix is in this commit https://github.com/Zofyan/LibAFL-bzero-patch/commit/ffab1c5f41cddeda261c65ab5a54d9396959d32e

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.