It's not that simple. Mal-AI will probably operate orders of magnitude faster than Bene-AI. Patching affected software/hardware is a bureaucratic or formalized process that can take time.
Time dilates for AI relative to humans because it can accomplish so much work in our time horizons. A month to us might be like years to an AI.
So good AI would always be orders of magnitude behind while cleaning up after bad AI.
This perspective doesn't even account for online devices that are un-patchable that constitute the majority of today's bot armies.