Can I pull up a 5V logic line to 12V without damaging anything?
For most normal digital inputs, you will forward bias the protection diode to Vdd.  What happens after that depends on how the specific chip was designed and the external circuitry.  Some possibilities are:

The 5 V power supply won't let the the voltage go much above 5 V.  Either the 12 V source will have to drop, or the protection diode burns out.

The 5 V supply rises to 12 V minus the diode drop.  This could blow out everything connected to the 5 V supply.

The protection diode and 5 V supply are beefy enough so that the thing trying to drive 12 V has to source too much current, and it burns out.

If power and ground of the micro are floating, then all the I/O pins will now also float to 12 V or a bit below.  That could be bad for anything connected to the I/O pins.

The micro becomes powered up and starts doing unexpected things, due to its max power voltage spec being violated.

In short, when you violate any parameter in a datasheet, the manufacturer's promise of the remaining specs are null and void.  The chip could catch fire, vanish into a cloud of greasy black smoke, or just sit there appearing to take it, but subtely do erroneous things that aren't immediately obvious.  All around, this is a bad idea.