It's unclear how much stack-smashing is involved here. The "Control Flow Bending" paper clearly requires overwriting pointers internal to printf.
Is this possible without invoking undefined behavior? FWIW the demos just crash with SIGILL on macOS.
Is this possible without invoking undefined behavior? FWIW the demos just crash with SIGILL on macOS.