Static analysis and other tools can find this, but they're expensive; wonder what the kernel team has access to?
Coverity scans several open source projects for free. see https://scan.coverity.com/faq and https://scan.coverity.com/projects
see https://scan.coverity.com/projects/linux for the linux-specific scan results - you need to create an account to view the reported defects.
This past couple of weeks isn't a good look for them with the releases of defects found in Linux and Firefox.
Linus himself wrote a static analyzer. https://en.wikipedia.org/wiki/Sparse
There are other free ones, I don't know if they're run as a matter of course.
If not static analysis what would ai tools be considered? They're operating off the same source code
Also nice the onion reference by op.
Technically, the kernel team is sufficiently competent to design and build bespoke tools for themselves. It‘s probably a question of risk assessment and priorities.
If static analysis could actually find these issues with a reasonable false positive rate, the companies behind them would be running them on Linux to get the publicity of having found the issues like all the AI companies are doing now. Imo the good static analysis heuristics are already built into compilers or in open source linters.