In my understanding of the bug, there is feeding of the two consensus-nodes, with the following
scriptCode, where the ECDSA sig and the "noise dummy data must match the length declared in
pushed bytes.
One should note that ECDSA sig length is malleable.
The non-upgraded, pre-0.24.2 btcd peers should remove the whole data push containing
the consensus valid signatures, before it’s verified by the script interpreter. While
bitcoind peers can accept the valid signatures. I’m unsure that you really need public
key recovery to achieve that chain fork as a trick. I believe one has OP_PICK, OP_ROLL and other stack inspection opcodes available, that can be committed in the scriptCode.