Re: BUG: kernel panic: corrupted stack end in worker_thread
From: Jann Horn
Date: Thu Aug 29 2024 - 16:23:37 EST
On Wed, Aug 28, 2024 at 1:49 AM Juefei Pu <juefei.pu@xxxxxxxxxxxxx> wrote:
> Hello,
> We found the following issue using syzkaller on Linux v6.10.
> The PoC generated by Syzkaller can have the kernel panic.
> The full report including the Syzkaller reproducer:
> https://gist.github.com/TomAPU/a96f6ccff8be688eb2870a71ef4d035d
>
> The brief report is below:
>
> Syzkaller hit 'kernel panic: corrupted stack end in worker_thread' bug.
>
> Kernel panic - not syncing: corrupted stack end detected inside scheduler
I assume you're fuzzing without CONFIG_VMAP_STACK? Please make sure to
set CONFIG_VMAP_STACK=y in your kernel config, that will give much
better diagnostics when you hit a stack overrun like this, instead of
causing random corruption and running into the corrupted stack end
detection.
(Note that if you're using KASAN, you have to enable
CONFIG_KASAN_VMALLOC in order for CONFIG_VMAP_STACK to work.)