Algorithmic complexity attacks and libc qsort()
calmerthanyouare.org
Algorithmic complexity attacks and libc qsort()
1–10 of 55 posts
Re: Algorithmic complexity attacks and libc qsort()
#2Re: Algorithmic complexity attacks and libc qsort()
#3Was anyone able to view the linked research paper on Hash Table exploits?
Re: Algorithmic complexity attacks and libc qsort()
#4Was anyone able to view the linked research paper on Hash Table exploits?
https://www.usenix.org/legacy/publications/library/proceedin...
Re: Algorithmic complexity attacks and libc qsort()
#5Was anyone able to view the linked research paper on Hash Table exploits?
Re: Algorithmic complexity attacks and libc qsort()
#6This sort of thing might even work where the target comes to you for data (such as a search engine crawling you).
Re: Algorithmic complexity attacks and libc qsort()
#7Re: Algorithmic complexity attacks and libc qsort()
#8I think it's a good rule of thumb to say "if you need to sort large quantities of untrusted data you should probably use mergesort".
Re: Algorithmic complexity attacks and libc qsort()
#9Now this is very interesting, but could also be prevented with a random number generator (which influences the selection of the pivot element). If this would have been exploited, people would have looked into mitigating this.
Edit: You can detect recursion-tree-degeneration (just check the depth) and react to it (pivot selection)
Re: Algorithmic complexity attacks and libc qsort()
#10I'm surprised the article does not point out more directly that it's usually pretty simple to mitigate this attack vector by switching to mergesort. The worst case is O(n log n) so there's no real "killer input". I think it's a good rule of thumb to say "if you need to sort large quantities of untrusted data you should probably use mergesort".