* Re: [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc
[not found] <0000000000002373f005ff843b58@google.com>
@ 2023-07-02 23:58 ` David Rientjes
2023-07-03 7:17 ` Dmitry Vyukov
0 siblings, 1 reply; 6+ messages in thread
From: David Rientjes @ 2023-07-02 23:58 UTC (permalink / raw)
To: syzbot
Cc: 42.hyeyoo, Andrew Morton, cl, iamjoonsoo.kim, keescook,
linux-fsdevel, linux-hardening, linux-kernel, linux-mm, penberg,
reiserfs-devel, roman.gushchin, syzkaller-bugs, Vlastimil Babka,
Jan Kara
On Sun, 2 Jul 2023, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: e8f75c0270d9 Merge tag 'x86_sgx_for_v6.5' of git://git.ker..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=168b84fb280000
> kernel config: https://syzkaller.appspot.com/x/.config?x=a98ec7f738e43bd4
> dashboard link: https://syzkaller.appspot.com/bug?extid=cf0693aee9ea61dda749
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10310670a80000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1220c777280000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/f27c1d41217a/disk-e8f75c02.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/843ae5d5c810/vmlinux-e8f75c02.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/da48bc4c0ec1/bzImage-e8f75c02.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/658601e354e4/mount_0.gz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+cf0693aee9ea61dda749@syzkaller.appspotmail.com
>
> Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ___slab_alloc+0x12c3/0x1400 mm/slub.c:3270
> CPU: 0 PID: 5009 Comm: syz-executor248 Not tainted 6.4.0-syzkaller-01406-ge8f75c0270d9 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
> Call Trace:
> <TASK>
> __dump_stack lib/dump_stack.c:88 [inline]
> dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
> panic+0x686/0x730 kernel/panic.c:340
> __stack_chk_fail+0x19/0x20 kernel/panic.c:759
> ___slab_alloc+0x12c3/0x1400 mm/slub.c:3270
>
This is happening during while mounting reiserfs, so I'm inclined to think
it's more of a reisterfs issue than a slab allocator issue :/
>
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
>
> If the bug is already fixed, let syzbot know by replying with:
> #syz fix: exact-commit-title
>
> If you want syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.
>
> If you want to change bug's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
>
> If the bug is a duplicate of another bug, reply with:
> #syz dup: exact-subject-of-another-report
>
> If you want to undo deduplication, reply with:
> #syz undup
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc
2023-07-02 23:58 ` [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc David Rientjes
@ 2023-07-03 7:17 ` Dmitry Vyukov
2023-07-06 18:33 ` Lameter, Christopher
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Vyukov @ 2023-07-03 7:17 UTC (permalink / raw)
To: David Rientjes
Cc: syzbot, 42.hyeyoo, Andrew Morton, cl, iamjoonsoo.kim, keescook,
linux-fsdevel, linux-hardening, linux-kernel, linux-mm, penberg,
reiserfs-devel, roman.gushchin, syzkaller-bugs, Vlastimil Babka,
Jan Kara
On Mon, 3 Jul 2023 at 09:14, 'David Rientjes' via syzkaller-bugs
<syzkaller-bugs@googlegroups.com> wrote:
>
> On Sun, 2 Jul 2023, syzbot wrote:
>
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: e8f75c0270d9 Merge tag 'x86_sgx_for_v6.5' of git://git.ker..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=168b84fb280000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=a98ec7f738e43bd4
> > dashboard link: https://syzkaller.appspot.com/bug?extid=cf0693aee9ea61dda749
> > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10310670a80000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1220c777280000
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/f27c1d41217a/disk-e8f75c02.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/843ae5d5c810/vmlinux-e8f75c02.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/da48bc4c0ec1/bzImage-e8f75c02.xz
> > mounted in repro: https://storage.googleapis.com/syzbot-assets/658601e354e4/mount_0.gz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+cf0693aee9ea61dda749@syzkaller.appspotmail.com
> >
> > Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ___slab_alloc+0x12c3/0x1400 mm/slub.c:3270
> > CPU: 0 PID: 5009 Comm: syz-executor248 Not tainted 6.4.0-syzkaller-01406-ge8f75c0270d9 #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
> > Call Trace:
> > <TASK>
> > __dump_stack lib/dump_stack.c:88 [inline]
> > dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
> > panic+0x686/0x730 kernel/panic.c:340
> > __stack_chk_fail+0x19/0x20 kernel/panic.c:759
> > ___slab_alloc+0x12c3/0x1400 mm/slub.c:3270
> >
>
> This is happening during while mounting reiserfs, so I'm inclined to think
> it's more of a reisterfs issue than a slab allocator issue :/
Now we can make it official :)
#syz set subsystems: reiserfs
To remove from open mm issues:
https://syzkaller.appspot.com/upstream/s/mm
to reiserfs issues:
https://syzkaller.appspot.com/upstream/s/reiserfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc
2023-07-03 7:17 ` Dmitry Vyukov
@ 2023-07-06 18:33 ` Lameter, Christopher
2023-07-10 7:43 ` Dmitry Vyukov
0 siblings, 1 reply; 6+ messages in thread
From: Lameter, Christopher @ 2023-07-06 18:33 UTC (permalink / raw)
To: Dmitry Vyukov
Cc: David Rientjes, syzbot, 42.hyeyoo, Andrew Morton, iamjoonsoo.kim,
keescook, linux-fsdevel, linux-hardening, linux-kernel, linux-mm,
penberg, reiserfs-devel, roman.gushchin, syzkaller-bugs,
Vlastimil Babka, Jan Kara
On Mon, 3 Jul 2023, Dmitry Vyukov wrote:
>> This is happening during while mounting reiserfs, so I'm inclined to think
>> it's more of a reisterfs issue than a slab allocator issue :/
Have you tried to run with the "slub_debug" kernel option to figure out
what got corrupted?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc
2023-07-06 18:33 ` Lameter, Christopher
@ 2023-07-10 7:43 ` Dmitry Vyukov
2023-07-10 7:48 ` Vlastimil Babka
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Vyukov @ 2023-07-10 7:43 UTC (permalink / raw)
To: Lameter, Christopher
Cc: David Rientjes, syzbot, 42.hyeyoo, Andrew Morton, iamjoonsoo.kim,
keescook, linux-fsdevel, linux-hardening, linux-kernel, linux-mm,
penberg, reiserfs-devel, roman.gushchin, syzkaller-bugs,
Vlastimil Babka, Jan Kara
On Thu, 6 Jul 2023 at 20:33, Lameter, Christopher
<cl@os.amperecomputing.com> wrote:
>
> On Mon, 3 Jul 2023, Dmitry Vyukov wrote:
>
> >> This is happening during while mounting reiserfs, so I'm inclined to think
> >> it's more of a reisterfs issue than a slab allocator issue :/
>
> Have you tried to run with the "slub_debug" kernel option to figure out
> what got corrupted?
Can slub_debug detect anything that KASAN can't?
I would assume KASAN can detect more bugs (e.g. stack/globals) and
report way better. And it was already enabled in the config.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc
2023-07-10 7:43 ` Dmitry Vyukov
@ 2023-07-10 7:48 ` Vlastimil Babka
2023-07-10 7:52 ` Dmitry Vyukov
0 siblings, 1 reply; 6+ messages in thread
From: Vlastimil Babka @ 2023-07-10 7:48 UTC (permalink / raw)
To: Dmitry Vyukov, Lameter, Christopher
Cc: David Rientjes, syzbot, 42.hyeyoo, Andrew Morton, iamjoonsoo.kim,
keescook, linux-fsdevel, linux-hardening, linux-kernel, linux-mm,
penberg, reiserfs-devel, roman.gushchin, syzkaller-bugs,
Jan Kara
On 7/10/23 09:43, Dmitry Vyukov wrote:
> On Thu, 6 Jul 2023 at 20:33, Lameter, Christopher
> <cl@os.amperecomputing.com> wrote:
>>
>> On Mon, 3 Jul 2023, Dmitry Vyukov wrote:
>>
>> >> This is happening during while mounting reiserfs, so I'm inclined to think
>> >> it's more of a reisterfs issue than a slab allocator issue :/
>>
>> Have you tried to run with the "slub_debug" kernel option to figure out
>> what got corrupted?
>
> Can slub_debug detect anything that KASAN can't?
Probably not, KASAN will find out a bad write at the moment it happens,
while slub_debug only later from corrupted red zone/poison.
> I would assume KASAN can detect more bugs (e.g. stack/globals) and
> report way better. And it was already enabled in the config.
Anyway this is a stack corruption, not slab layout corruption. It's probably
hard to distinguish a legitimate stack write from an overrun so even KASAN
could not catch it immediately?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc
2023-07-10 7:48 ` Vlastimil Babka
@ 2023-07-10 7:52 ` Dmitry Vyukov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Vyukov @ 2023-07-10 7:52 UTC (permalink / raw)
To: Vlastimil Babka
Cc: Lameter, Christopher, David Rientjes, syzbot, 42.hyeyoo,
Andrew Morton, iamjoonsoo.kim, keescook, linux-fsdevel,
linux-hardening, linux-kernel, linux-mm, penberg, reiserfs-devel,
roman.gushchin, syzkaller-bugs, Jan Kara
On Mon, 10 Jul 2023 at 09:48, Vlastimil Babka <vbabka@suse.cz> wrote:
>
> On 7/10/23 09:43, Dmitry Vyukov wrote:
> > On Thu, 6 Jul 2023 at 20:33, Lameter, Christopher
> > <cl@os.amperecomputing.com> wrote:
> >>
> >> On Mon, 3 Jul 2023, Dmitry Vyukov wrote:
> >>
> >> >> This is happening during while mounting reiserfs, so I'm inclined to think
> >> >> it's more of a reisterfs issue than a slab allocator issue :/
> >>
> >> Have you tried to run with the "slub_debug" kernel option to figure out
> >> what got corrupted?
> >
> > Can slub_debug detect anything that KASAN can't?
>
> Probably not, KASAN will find out a bad write at the moment it happens,
> while slub_debug only later from corrupted red zone/poison.
>
> > I would assume KASAN can detect more bugs (e.g. stack/globals) and
> > report way better. And it was already enabled in the config.
>
> Anyway this is a stack corruption, not slab layout corruption. It's probably
> hard to distinguish a legitimate stack write from an overrun so even KASAN
> could not catch it immediately?
KASAN can detect stack out-of-bounds writes.
However, use-after-return detection support was never implemented in
KASAN (user-space ASAN can detect them as well).
User-space MSAN can also detect use-after-scope, I think it's not
implemented in KMSAN as well.
If we ever get to the root cause of this bug, it may be useful to
analyze why it wasn't detected and if it's possible to make such bugs
detected.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-10 7:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0000000000002373f005ff843b58@google.com>
2023-07-02 23:58 ` [syzbot] [mm?] [reiserfs?] kernel panic: stack is corrupted in ___slab_alloc David Rientjes
2023-07-03 7:17 ` Dmitry Vyukov
2023-07-06 18:33 ` Lameter, Christopher
2023-07-10 7:43 ` Dmitry Vyukov
2023-07-10 7:48 ` Vlastimil Babka
2023-07-10 7:52 ` Dmitry Vyukov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox