You can find router firmware sourcecode online and find pretty egregious vulnerabilities if you're really trying to learn.
Alot of embedded stuff is outsourced and doesn't want to waste the computing power for stuff like stack canaries. I recall the following from making a tool for a dlink? router?
//Reads a file name
foo ReadFilePath()
{
// Get file name
// TICKET 21321: Fixed crash by increasing buffer size
char FilePath[100];
ReadFileName(&FilePath);
}
It sticks out to me, since the crash was clearly from a buffer overflow, and they had this documented in the source code that increasing the buffer size fixes it. What they didn't realize was that the bug would still happen and you could get a buffer overflow from this and do whatever you wanted. This is the level of programmer you're dealing with who's writing embedded software in an overseas sweatshop. And the talent isn't even there domestically since they're severely underpaid compared to someone writing simple javascript.