It's UB, it is not memory safe, so in theory, and often also in practice with this specific kind of bug, absolutely anything could happen, including code execution.
Greg Kroah-Hartman's comment is both wrong and perplexing.