This bug seems to be exploitable due to a memory corruption triggered by the race condition, it's the memory corruption that rust would protect from.
While this is a common misconception, I'm already tired of enthusiastic "safu language fans" trying to explain what bound checks mean to me so apologizes for being mean.
But no, in 2024 you should focus on temporal memory safety which is much harder to eliminate compared to "just add boundz CHK everYwHErE!!!@".