Re: [PATCH v1] kasan: Fix false-positive wild-memory-access on x86 under 5-level paging

From: Dave Hansen

Date: Thu Jun 18 2026 - 14:12:49 EST


On 6/18/26 10:09, Borislav Petkov wrote:
> On Wed, Jun 17, 2026 at 03:13:33PM -0700, Ihor Solodrai wrote:
>> So my question to maintainers is what approach seems best?
> The CPUID stuff is being rewritten currently and it should address your issue
> too. If not, then we need to rewrite it better.
>
> Can you reproduce with this set applied ontop:
>
> https://lore.kernel.org/r/20260528153923.403473-1-darwi@xxxxxxxxxxxxx

Thinking about this a bit more... If Ahmed's series does fix this, I
think it will be accidental. It still uses identify_cpu() and also does
a memset() of the new c->cpuid structure in addition to the old
c->x86_capability structure.

I'm not knocking Ahmed's series by any means. It just probably won't fix
this issue.

In a perfect world early_identify_cpu() and identify_cpu() would either
get consolidated into one thing. Or at least become two discrete things
that initialize two completely disjoint sets of data. That way,
identify_cpu() wouldn't memset() anything.

Isn't that the _real_ fix? Instead of trying to hide the inconsistency
when good data is blown away, we stop blowing it away in the first place?