How to crash Haiku (KDL via recv() function)
|Reported by:||rogueeve||Owned by:||nobody|
|Component:||Network & Internet/Stack||Version:||R1/alpha1|
|Has a Patch:||no||Platform:||All|
The attached .cpp program will reproducibly cause a KDL under hrev33411. The crash is initiated by passing a bad pointer as the buffer argument to the Berkeley recv() function. The exact error displayed is "Page fault in kernel space".
This is a distilled version of a bug I found in one of my real programs. In that case it was caused by recv()'ing into a variable but forgetting to include the "&".
Of course calling recv() this way is incorrect, but I assume bringing down the whole system is not an "acceptable" response.