Re: BUG: KASAN: slab-out-of-bounds in print_synth_event+0xa68/0xa78

From: Sven Schnelle
Date: Tue Aug 08 2023 - 12:14:59 EST


Steven Rostedt <rostedt@xxxxxxxxxxx> writes:

> On Fri, 04 Aug 2023 08:20:23 +0200
> Sven Schnelle <svens@xxxxxxxxxxxxx> wrote:
>
>> Hi Steven,
>>
>> i noticed the following KASAN splat in CI (on s390):
>
> Could this actually be a bug in KASAN?
>
> The reason I ask, is because of the report.

I don't think so. I looked into the trace file when the problem occurred
yesterday, and it looked like this:

kworker/0:2-83 [000] d..4. 59.260107: wake_lat: pid=2654624 delta=55 stack=STACK:
=> 0x6b6b6b6b6b6b6b6b
=> 0x6b6b6b6b6b6b6b6b
=> 0x6b6b6b6b6b6b6b6b
=> 0x6b6b6b6b6b6b6b6b
=> 0x6b6b6b6b6b6b6b6b
[..]

Somtimes the number is 0xcc, which is POISON_FREE_INITMEM instead of POISON_FREE.

In other entries delta and pid are also wrong:

swapper/0-1 [002] ..... 5.864575: wake_lat: pid=5437496 delta=7880749591624456 stack=STACK:

Of course PID could have gone away, but that delta looks interesting. So
it looks like the whole entry is just random data not owned by tracing,
and not the data that was allocated in the ringbuffer code.