I'm not a lawyer, but - is that even
legal?
Unfortunately yes!! It shouldn't be but it still is. One of the best examples is that Steve Wozniak worked for HP at the time he designed the Apple I... as such he was required to give them "first rights" to his design! Fortunately for him and Jobs, they thought it was crap!!
Some companies really do stretch the limits of this, and the laws definitely need to change. But what they are trying to do is cover themselves legally in the case that you did do something on company time and release it under your name, but they can't prove that you did it on their time...so by owning everything you do, they've covered that issue.
Personally I wouldn't work for a company that does this...I've got too many side projects that I enjoy working on and would not want to give up. And it's not far from slavery in my mind. I've actually tried to simply cross out those sections on a contract in the past (which is entirely legal and if they sign it that way it is binding) but they would not sign it without those sections intact... so I walked.
Even if you have signed it...go to them and tell them that you have researched it more and have concerns. They may be willing to work out a deal with you, you never know unless you ask.
Edit: One thing to keep in mind...to CYA, never work on anything that is your own while at work or on their computer...even it you are at home with your company laptop. Even if the company doesn't have these rules, like mine, if you release something and they then find out that you did use company resources, whatever you created is theirs...and possibly even anything you created in the past. It can be real mess. Oh, and make your whatever you do is in a very different business segment from your work...anti-compete laws can be a bitch.