Closed mmmds closed 5 years ago
Thanks for this very valuable insight. While this only happens when the admin is running, it is obviously bad a practice. When evaluating the code my initial assumption would be that "has_info" should already cover for this, but that only takes care of the headers.
@mmmds could you validate my pull request?
We've checked it. It's ok.
Thanks it is merged.
It's possible to trigger NULL pointer dereference in case if request uses POST method with empty body.
cherokee/handler_admin.c
If post body is empty then post.buf is NULL and strchr on tmp results in NULL pointer dereference.
Proof of concept:
test15 is the admin handler.
Setup:
mkdir /var/www/test{1..20}; for i in
seq 1 20; do echo test > test$i/test.html; done
found by: Mateusz Kocielski, Michał Dardas from LogicalTrust