All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] general protection fault in ext4_fill_super
@ 2022-01-17  8:23 syzbot
  2022-02-05 19:50 ` syzbot
  2022-02-05 22:39 ` syzbot
  0 siblings, 2 replies; 5+ messages in thread
From: syzbot @ 2022-01-17  8:23 UTC (permalink / raw)
  To: adilger.kernel, linux-ext4, linux-kernel, llvm, nathan,
	ndesaulniers, syzkaller-bugs, tytso

Hello,

syzbot found the following issue on:

HEAD commit:    daadb3bd0e8d Merge tag 'locking_core_for_v5.17_rc1' of git..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=122fc6f7b00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ec2807b2e9360dbb
dashboard link: https://syzkaller.appspot.com/bug?extid=138c9e58e3cb22eae3b4
compiler:       Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+138c9e58e3cb22eae3b4@syzkaller.appspotmail.com

RBP: 00007f283db0b1d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007fffb1b01d5f R14: 00007f283db0b300 R15: 0000000000022000
 </TASK>
general protection fault, probably for non-canonical address 0xdffffc0000000012: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000090-0x0000000000000097]
CPU: 0 PID: 32175 Comm: syz-executor.3 Not tainted 5.16.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_fill_super+0x240/0x770 fs/ext4/super.c:5551
Code: 3b 4c 89 6c 24 20 49 8d bd a8 06 00 00 be 2f 00 00 00 ba 21 00 00 00 e8 5e 6d d8 01 4d 8d af 90 00 00 00 4d 89 ec 49 c1 ec 03 <41> 80 3c 2c 00 74 08 4c 89 ef e8 11 4e 97 ff 49 c7 45 00 01 00 00
RSP: 0018:ffffc9000b5cfbe8 EFLAGS: 00010206
RAX: ffff8880234c46ac RBX: ffff888090bc7cf0 RCX: 0000000000040000
RDX: ffffc9000abd9000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: dffffc0000000000 R08: ffffffff8411122e R09: fffffbfff197f727
R10: fffffbfff197f727 R11: 0000000000000000 R12: 0000000000000012
R13: 0000000000000090 R14: ffff888071347b00 R15: 0000000000000000
FS:  00007f283db0b700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6db90cb558 CR3: 000000008fafc000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 get_tree_bdev+0x406/0x630 fs/super.c:1295
 vfs_get_tree+0x86/0x270 fs/super.c:1500
 do_new_mount fs/namespace.c:2994 [inline]
 path_mount+0x1986/0x2c30 fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount+0x308/0x3c0 fs/namespace.c:3522
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f283f195eb9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f283db0b168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f283f2a8f60 RCX: 00007f283f195eb9
RDX: 0000000020000240 RSI: 0000000020000000 RDI: 0000000020000100
RBP: 00007f283db0b1d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007fffb1b01d5f R14: 00007f283db0b300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 2017ba6e0452af99 ]---
RIP: 0010:ext4_fill_super+0x240/0x770 fs/ext4/super.c:5551
Code: 3b 4c 89 6c 24 20 49 8d bd a8 06 00 00 be 2f 00 00 00 ba 21 00 00 00 e8 5e 6d d8 01 4d 8d af 90 00 00 00 4d 89 ec 49 c1 ec 03 <41> 80 3c 2c 00 74 08 4c 89 ef e8 11 4e 97 ff 49 c7 45 00 01 00 00
RSP: 0018:ffffc9000b5cfbe8 EFLAGS: 00010206
RAX: ffff8880234c46ac RBX: ffff888090bc7cf0 RCX: 0000000000040000
RDX: ffffc9000abd9000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: dffffc0000000000 R08: ffffffff8411122e R09: fffffbfff197f727
R10: fffffbfff197f727 R11: 0000000000000000 R12: 0000000000000012
R13: 0000000000000090 R14: ffff888071347b00 R15: 0000000000000000
FS:  00007f283db0b700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8eb615a718 CR3: 000000008fafc000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	3b 4c 89 6c          	cmp    0x6c(%rcx,%rcx,4),%ecx
   4:	24 20                	and    $0x20,%al
   6:	49 8d bd a8 06 00 00 	lea    0x6a8(%r13),%rdi
   d:	be 2f 00 00 00       	mov    $0x2f,%esi
  12:	ba 21 00 00 00       	mov    $0x21,%edx
  17:	e8 5e 6d d8 01       	callq  0x1d86d7a
  1c:	4d 8d af 90 00 00 00 	lea    0x90(%r15),%r13
  23:	4d 89 ec             	mov    %r13,%r12
  26:	49 c1 ec 03          	shr    $0x3,%r12
* 2a:	41 80 3c 2c 00       	cmpb   $0x0,(%r12,%rbp,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 ef             	mov    %r13,%rdi
  34:	e8 11 4e 97 ff       	callq  0xff974e4a
  39:	49                   	rex.WB
  3a:	c7                   	.byte 0xc7
  3b:	45 00 01             	add    %r8b,(%r9)


---
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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] general protection fault in ext4_fill_super
  2022-01-17  8:23 [syzbot] general protection fault in ext4_fill_super syzbot
@ 2022-02-05 19:50 ` syzbot
  2022-02-05 22:39 ` syzbot
  1 sibling, 0 replies; 5+ messages in thread
From: syzbot @ 2022-02-05 19:50 UTC (permalink / raw)
  To: adilger.kernel, linux-ext4, linux-kernel, llvm, nathan,
	ndesaulniers, syzkaller-bugs, tytso

syzbot has found a reproducer for the following issue on:

HEAD commit:    0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=146d12b4700000
kernel config:  https://syzkaller.appspot.com/x/.config?x=cd57c0f940a9a1ec
dashboard link: https://syzkaller.appspot.com/bug?extid=138c9e58e3cb22eae3b4
compiler:       Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=17f7004fb00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=178cf108700000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+138c9e58e3cb22eae3b4@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc0000000012: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000090-0x0000000000000097]
CPU: 0 PID: 3603 Comm: syz-executor131 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_fill_super+0x247/0x770 fs/ext4/super.c:5550
Code: 3b 4c 89 6c 24 20 49 8d bd a8 06 00 00 be 2f 00 00 00 ba 21 00 00 00 e8 87 5a d9 01 4d 8d af 90 00 00 00 4d 89 ec 49 c1 ec 03 <41> 80 3c 2c 00 74 08 4c 89 ef e8 ca 7d 96 ff 49 c7 45 00 01 00 00
RSP: 0018:ffffc9000284fbe8 EFLAGS: 00010206
RAX: ffff8880217dc6ac RBX: ffff88801c4048f0 RCX: ffff88807d4b9d00
RDX: 0000000000000000 RSI: 000000000000002f RDI: 0000000000000035
RBP: dffffc0000000000 R08: ffffffff84142d6e R09: fffffbfff197f79f
R10: fffffbfff197f79f R11: 0000000000000000 R12: 0000000000000012
R13: 0000000000000090 R14: ffff888014784f00 R15: 0000000000000000
FS:  00005555563943c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000001c361000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 get_tree_bdev+0x406/0x630 fs/super.c:1292
 vfs_get_tree+0x86/0x270 fs/super.c:1497
 do_new_mount fs/namespace.c:2994 [inline]
 path_mount+0x1986/0x2c30 fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount+0x308/0x3c0 fs/namespace.c:3522
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fb3d4cbca49
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc0c4f4df8 EFLAGS: 00000246
 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fb3d4cbca49
RDX: 0000000020000100 RSI: 00000000200000c0 RDI: 0000000020000080
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000003636
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc0c4f4e00
R13: 00007ffc0c4f4ea0 R14: 00007ffc0c4f4e60 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ext4_fill_super+0x247/0x770 fs/ext4/super.c:5550
Code: 3b 4c 89 6c 24 20 49 8d bd a8 06 00 00 be 2f 00 00 00 ba 21 00 00 00 e8 87 5a d9 01 4d 8d af 90 00 00 00 4d 89 ec 49 c1 ec 03 <41> 80 3c 2c 00 74 08 4c 89 ef e8 ca 7d 96 ff 49 c7 45 00 01 00 00
RSP: 0018:ffffc9000284fbe8 EFLAGS: 00010206

RAX: ffff8880217dc6ac RBX: ffff88801c4048f0 RCX: ffff88807d4b9d00
RDX: 0000000000000000 RSI: 000000000000002f RDI: 0000000000000035
----------------
Code disassembly (best guess):
   0:	3b 4c 89 6c          	cmp    0x6c(%rcx,%rcx,4),%ecx
   4:	24 20                	and    $0x20,%al
   6:	49 8d bd a8 06 00 00 	lea    0x6a8(%r13),%rdi
   d:	be 2f 00 00 00       	mov    $0x2f,%esi
  12:	ba 21 00 00 00       	mov    $0x21,%edx
  17:	e8 87 5a d9 01       	callq  0x1d95aa3
  1c:	4d 8d af 90 00 00 00 	lea    0x90(%r15),%r13
  23:	4d 89 ec             	mov    %r13,%r12
  26:	49 c1 ec 03          	shr    $0x3,%r12
* 2a:	41 80 3c 2c 00       	cmpb   $0x0,(%r12,%rbp,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 ef             	mov    %r13,%rdi
  34:	e8 ca 7d 96 ff       	callq  0xff967e03
  39:	49                   	rex.WB
  3a:	c7                   	.byte 0xc7
  3b:	45 00 01             	add    %r8b,(%r9)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] general protection fault in ext4_fill_super
  2022-01-17  8:23 [syzbot] general protection fault in ext4_fill_super syzbot
  2022-02-05 19:50 ` syzbot
@ 2022-02-05 22:39 ` syzbot
  2022-02-07 10:30   ` Lukas Czerner
  1 sibling, 1 reply; 5+ messages in thread
From: syzbot @ 2022-02-05 22:39 UTC (permalink / raw)
  To: adilger.kernel, cmaiolino, lczerner, linux-ext4, linux-kernel,
	llvm, nathan, ndesaulniers, syzkaller-bugs, tytso

syzbot has bisected this issue to:

commit cebe85d570cf84804e848332d6721bc9e5300e07
Author: Lukas Czerner <lczerner@redhat.com>
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: syzbot+138c9e58e3cb22eae3b4@syzkaller.appspotmail.com
Fixes: cebe85d570cf ("ext4: switch to the new mount api")

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] general protection fault in ext4_fill_super
  2022-02-05 22:39 ` syzbot
@ 2022-02-07 10:30   ` Lukas Czerner
  2022-02-07 11:29     ` Dmitry Vyukov
  0 siblings, 1 reply; 5+ messages in thread
From: Lukas Czerner @ 2022-02-07 10:30 UTC (permalink / raw)
  To: syzbot
  Cc: adilger.kernel, cmaiolino, linux-ext4, linux-kernel, llvm,
	nathan, ndesaulniers, syzkaller-bugs, tytso

On Sat, Feb 05, 2022 at 02:39:06PM -0800, syzbot wrote:
> syzbot has bisected this issue to:
> 
> commit cebe85d570cf84804e848332d6721bc9e5300e07
> Author: Lukas Czerner <lczerner@redhat.com>
> 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: syzbot+138c9e58e3cb22eae3b4@syzkaller.appspotmail.com
> 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 <lczerner@redhat.com>
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 <lkp@intel.com>
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Lukas Czerner <lczerner@redhat.com>
    Link: https://lore.kernel.org/r/20220119130209.40112-1-lczerner@redhat.com
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Cc: stable@kernel.org

Thanks!
-Lukas


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] general protection fault in ext4_fill_super
  2022-02-07 10:30   ` Lukas Czerner
@ 2022-02-07 11:29     ` Dmitry Vyukov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Vyukov @ 2022-02-07 11:29 UTC (permalink / raw)
  To: Lukas Czerner
  Cc: syzbot, adilger.kernel, cmaiolino, linux-ext4, linux-kernel,
	llvm, nathan, ndesaulniers, syzkaller-bugs, tytso

On Mon, 7 Feb 2022 at 11:30, Lukas Czerner <lczerner@redhat.com> wrote:
>
> On Sat, Feb 05, 2022 at 02:39:06PM -0800, syzbot wrote:
> > syzbot has bisected this issue to:
> >
> > commit cebe85d570cf84804e848332d6721bc9e5300e07
> > Author: Lukas Czerner <lczerner@redhat.com>
> > 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: syzbot+138c9e58e3cb22eae3b4@syzkaller.appspotmail.com
> > 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 <lczerner@redhat.com>
> 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 <lkp@intel.com>
>     Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>     Signed-off-by: Lukas Czerner <lczerner@redhat.com>
>     Link: https://lore.kernel.org/r/20220119130209.40112-1-lczerner@redhat.com
>     Signed-off-by: Theodore Ts'o <tytso@mit.edu>
>     Cc: stable@kernel.org


Let's tell syzbot then:

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

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-07 11:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17  8:23 [syzbot] general protection fault in ext4_fill_super syzbot
2022-02-05 19:50 ` syzbot
2022-02-05 22:39 ` syzbot
2022-02-07 10:30   ` Lukas Czerner
2022-02-07 11:29     ` Dmitry Vyukov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.