Re: [syzbot] [kernel?] KASAN: stack-out-of-bounds Read in __show_regs (2)
From: Hillf Danton
Date: Fri Aug 02 2024 - 22:44:03 EST
On Thu, 01 Aug 2024 16:39:23 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 931a3b3bccc9 Add linux-next specific files for 20240729
> git tree: linux-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10f437f1980000
Test Tetsuo's idea [1].
[1] https://lore.kernel.org/lkml/5136bcc7-3db7-4fc2-abde-a3aceeaf17c2@xxxxxxxxxxxxxxxxxxx/
#syz test linux-next 931a3b3bccc9
--- x/arch/x86/kernel/dumpstack.c
+++ y/arch/x86/kernel/dumpstack.c
@@ -192,6 +192,7 @@ static void show_trace_log_lvl(struct ta
int graph_idx = 0;
bool partial = false;
+ kasan_disable_current();
printk("%sCall Trace:\n", log_lvl);
unwind_start(&state, task, regs, stack);
@@ -304,6 +305,7 @@ next:
if (stack_name)
printk("%s </%s>\n", log_lvl, stack_name);
}
+ kasan_enable_current();
}
void show_stack(struct task_struct *task, unsigned long *sp,
--