-
yuripvwith "stack smashing detected" crash, is there a way to get a bit more information than this? pastebin.com/tDHsW2va (i.e. any hints on what exactly happened and where?)
-
andyfI'd suggest trying `::whatis` on the address in the stack trace that looks plausible, and main+0x74::dis to at least work out where it went from there. It's always an issue if the stack has been corrupted.
-
andyfThe ssp protection is usually checking for overflows in fixed arrays on the stack, so code inspection around those is another approach, but it depends on how complicated the code is. You can usually tell if SSP is used on a particular function from the disassembly.
-
andyfAlso try a few bytes less than that address fffffc7feea0cd90::whatis
-
yuripvok, thanks
-
yuripvyeah, i found the issue, but was wondering if it could say something like "you got that array size wrong" :)
-
andyfGreat. Heh.. that is what is usually means.
-
andyfYou corrupted the stack canary, but that could be a few different ways. However, SSP doesn't get applied to all functions, just ones where the compiler thinks there's something that could be overflowed.
-
andyfand our ssp implementation in libc deliberately just terminates the process as quickly as possible, hence upanic().
-
jbkthere are some other places we could probably utilize upanic()
-
andyfDefinitely. It has started to appear in some places like bhyve, pcieadm and prtconf already.
-
nbjoergandyf: there are options so that it gets applied to every function
-
sjorgeback on mainline omnios bloody :D with my change