2022-02-07 11:59:30

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] general protection fault in ext4_fill_super

syzbot has bisected this issue to:

commit cebe85d570cf84804e848332d6721bc9e5300e07
Author: Lukas Czerner <[email protected]>
Date: Wed Oct 27 14:18:56 2021 +0000

ext4: switch to the new mount api

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14902978700000
start commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
final oops: https://syzkaller.appspot.com/x/report.txt?x=16902978700000
console output: https://syzkaller.appspot.com/x/log.txt?x=12902978700000
kernel config: https://syzkaller.appspot.com/x/.config?x=cd57c0f940a9a1ec
dashboard link: https://syzkaller.appspot.com/bug?extid=138c9e58e3cb22eae3b4
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17f7004fb00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=178cf108700000

Reported-by: [email protected]
Fixes: cebe85d570cf ("ext4: switch to the new mount api")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection


2022-02-09 04:06:25

by Lukas Czerner

[permalink] [raw]
Subject: Re: [syzbot] general protection fault in ext4_fill_super

On Sat, Feb 05, 2022 at 02:39:06PM -0800, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit cebe85d570cf84804e848332d6721bc9e5300e07
> Author: Lukas Czerner <[email protected]>
> Date: Wed Oct 27 14:18:56 2021 +0000
>
> ext4: switch to the new mount api
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14902978700000
> start commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
> git tree: upstream
> final oops: https://syzkaller.appspot.com/x/report.txt?x=16902978700000
> console output: https://syzkaller.appspot.com/x/log.txt?x=12902978700000
> kernel config: https://syzkaller.appspot.com/x/.config?x=cd57c0f940a9a1ec
> dashboard link: https://syzkaller.appspot.com/bug?extid=138c9e58e3cb22eae3b4
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17f7004fb00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=178cf108700000
>
> Reported-by: [email protected]
> Fixes: cebe85d570cf ("ext4: switch to the new mount api")
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>

I believe that this has been fixed with upstream commit

commit 7c268d4ce2d3761f666a9950b029c8902bfab710
Author: Lukas Czerner <[email protected]>
Date: Wed Jan 19 14:02:09 2022 +0100

ext4: fix potential NULL pointer dereference in ext4_fill_super()

By mistake we fail to return an error from ext4_fill_super() in case
that ext4_alloc_sbi() fails to allocate a new sbi. Instead we just set
the ret variable and allow the function to continue which will later
lead to a NULL pointer dereference. Fix it by returning -ENOMEM in the
case ext4_alloc_sbi() fails.

Fixes: cebe85d570cf ("ext4: switch to the new mount api")
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Lukas Czerner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Cc: [email protected]

Thanks!
-Lukas


2022-02-09 10:16:05

by Dmitry Vyukov

[permalink] [raw]
Subject: Re: [syzbot] general protection fault in ext4_fill_super

On Mon, 7 Feb 2022 at 11:30, Lukas Czerner <[email protected]> wrote:
>
> On Sat, Feb 05, 2022 at 02:39:06PM -0800, syzbot wrote:
> > syzbot has bisected this issue to:
> >
> > commit cebe85d570cf84804e848332d6721bc9e5300e07
> > Author: Lukas Czerner <[email protected]>
> > Date: Wed Oct 27 14:18:56 2021 +0000
> >
> > ext4: switch to the new mount api
> >
> > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14902978700000
> > start commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
> > git tree: upstream
> > final oops: https://syzkaller.appspot.com/x/report.txt?x=16902978700000
> > console output: https://syzkaller.appspot.com/x/log.txt?x=12902978700000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=cd57c0f940a9a1ec
> > dashboard link: https://syzkaller.appspot.com/bug?extid=138c9e58e3cb22eae3b4
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17f7004fb00000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=178cf108700000
> >
> > Reported-by: [email protected]
> > Fixes: cebe85d570cf ("ext4: switch to the new mount api")
> >
> > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> >
>
> I believe that this has been fixed with upstream commit
>
> commit 7c268d4ce2d3761f666a9950b029c8902bfab710
> Author: Lukas Czerner <[email protected]>
> Date: Wed Jan 19 14:02:09 2022 +0100
>
> ext4: fix potential NULL pointer dereference in ext4_fill_super()
>
> By mistake we fail to return an error from ext4_fill_super() in case
> that ext4_alloc_sbi() fails to allocate a new sbi. Instead we just set
> the ret variable and allow the function to continue which will later
> lead to a NULL pointer dereference. Fix it by returning -ENOMEM in the
> case ext4_alloc_sbi() fails.
>
> Fixes: cebe85d570cf ("ext4: switch to the new mount api")
> Reported-by: kernel test robot <[email protected]>
> Reported-by: Dan Carpenter <[email protected]>
> Signed-off-by: Lukas Czerner <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> Signed-off-by: Theodore Ts'o <[email protected]>
> Cc: [email protected]


Let's tell syzbot then:

#syz fix: ext4: fix potential NULL pointer dereference in ext4_fill_super()

Thanks