|
|||||||||||
|
RE: looking for recursion stack overflow exploit
From: Michael Wojcik <Michael.Wojcik(at)microfocus.com>
Date: Mon Nov 25 2002 - 11:03:22 EST
> On the other hand, the Unix libc usually contains the qsort() and ftw()
qsort() is sometimes implemented iteratively rather than recursively. (For that matter, it can be implemented with any sorting algorithm that preserves the semantics in the standard - it needn't be Quicksort.) Hoare, in his Turing Award speech, said that his original Quicksort design (it's not clear he ever implemented it this way) was iterative, not recursive. Since qsort() uses a size_t for the number of elements, and the implementation decides how large a size_t is, the implementation also knows how deep the qsort() stack can get (log-2 of the maximum value of a size_t, if memory serves), so it can use a manual fixed-size stack and iterate. Regardless of qsort() implementation, though, I agree that recursion overflow doesn't look like a very promising area for vulnerability research.
Michael Wojcik
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:37 EDT |
||||||||||
|
|||||||||||