[v5.15] general protection fault in create_empty_buffers

9 views
Skip to first unread message

syzbot

unread,
Jun 17, 2023, 7:50:14 PM6/17/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 471e639e59d1 Linux 5.15.117
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16bae8f3280000
kernel config: https://syzkaller.appspot.com/x/.config?x=6390289bcc1381aa
dashboard link: https://syzkaller.appspot.com/bug?extid=17a39f66823b6e7f5ee0
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13b557f7280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/145b7f137d72/disk-471e639e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b5bd2fcb945c/vmlinux-471e639e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/794584032e0f/bzImage-471e639e.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/362defc2fc84/mount_0.gz

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

general protection fault, probably for non-canonical address 0xdffffc000000003d: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000001e8-0x00000000000001ef]
CPU: 0 PID: 7011 Comm: segctord Not tainted 5.15.117-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:__lock_acquire+0x69/0x1ff0 kernel/locking/lockdep.c:4881
Code: 84 c0 48 89 7c 24 08 0f 85 3f 16 00 00 83 3d 11 84 81 0c 00 0f 84 ec 14 00 00 83 3d 80 42 1c 0b 00 74 2d 48 89 f8 48 c1 e8 03 <80> 3c 10 00 74 14 e8 3c e1 66 00 48 8b 7c 24 08 48 ba 00 00 00 00
RSP: 0018:ffffc9000345f100 EFLAGS: 00010002
RAX: 000000000000003d RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 00000000000001e8
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff88807de55940 R14: 0000000000000000 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020002002 CR3: 000000007b159000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:363 [inline]
create_empty_buffers+0xd4/0x6d0 fs/buffer.c:1571
nilfs_lookup_dirty_data_buffers+0x3b3/0x9b0 fs/nilfs2/segment.c:729
nilfs_segctor_scan_file+0x245/0xad0 fs/nilfs2/segment.c:1073
nilfs_segctor_collect_blocks fs/nilfs2/segment.c:1195 [inline]
nilfs_segctor_collect fs/nilfs2/segment.c:1522 [inline]
nilfs_segctor_do_construct+0x1d48/0x7190 fs/nilfs2/segment.c:2068
nilfs_segctor_construct+0x145/0x8c0 fs/nilfs2/segment.c:2404
nilfs_segctor_thread_construct fs/nilfs2/segment.c:2512 [inline]
nilfs_segctor_thread+0x512/0x1130 fs/nilfs2/segment.c:2595
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</TASK>
Modules linked in:
---[ end trace f260b94612ece010 ]---
RIP: 0010:__lock_acquire+0x69/0x1ff0 kernel/locking/lockdep.c:4881
Code: 84 c0 48 89 7c 24 08 0f 85 3f 16 00 00 83 3d 11 84 81 0c 00 0f 84 ec 14 00 00 83 3d 80 42 1c 0b 00 74 2d 48 89 f8 48 c1 e8 03 <80> 3c 10 00 74 14 e8 3c e1 66 00 48 8b 7c 24 08 48 ba 00 00 00 00
RSP: 0018:ffffc9000345f100 EFLAGS: 00010002
RAX: 000000000000003d RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 00000000000001e8
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff88807de55940 R14: 0000000000000000 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020002002 CR3: 000000007b159000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 84 c0 test %al,%al
2: 48 89 7c 24 08 mov %rdi,0x8(%rsp)
7: 0f 85 3f 16 00 00 jne 0x164c
d: 83 3d 11 84 81 0c 00 cmpl $0x0,0xc818411(%rip) # 0xc818425
14: 0f 84 ec 14 00 00 je 0x1506
1a: 83 3d 80 42 1c 0b 00 cmpl $0x0,0xb1c4280(%rip) # 0xb1c42a1
21: 74 2d je 0x50
23: 48 89 f8 mov %rdi,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) <-- trapping instruction
2e: 74 14 je 0x44
30: e8 3c e1 66 00 callq 0x66e171
35: 48 8b 7c 24 08 mov 0x8(%rsp),%rdi
3a: 48 rex.W
3b: ba 00 00 00 00 mov $0x0,%edx


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

syzbot

unread,
Jun 23, 2023, 8:52:00 AM6/23/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e84a4e368abe Linux 6.1.35
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17492477280000
kernel config: https://syzkaller.appspot.com/x/.config?x=a69b5c9de715622a
dashboard link: https://syzkaller.appspot.com/bug?extid=def4b584ca614df3d52e
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14a4de1f280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=149850cb280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3c7fedd1a86d/disk-e84a4e36.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8b34c6296ed7/vmlinux-e84a4e36.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a88164798cc2/bzImage-e84a4e36.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/1d137cdc56c3/mount_0.gz

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

general protection fault, probably for non-canonical address 0xdffffc000000003d: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000001e8-0x00000000000001ef]
CPU: 0 PID: 3877 Comm: segctord Not tainted 6.1.35-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:__lock_acquire+0x69/0x1f80 kernel/locking/lockdep.c:4926
Code: df 0f b6 04 10 84 c0 0f 85 fb 15 00 00 83 3d f1 85 e9 0c 00 0f 84 a8 14 00 00 83 3d c0 79 75 0b 00 74 2b 4c 89 f0 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 f7 e8 39 46 76 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003e7f0a0 EFLAGS: 00010002
RAX: 000000000000003d RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 00000000000001e8
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888027da5940 R14: 00000000000001e8 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 000000001eaad000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:350 [inline]
create_empty_buffers+0xd1/0x7d0 fs/buffer.c:1552
nilfs_lookup_dirty_data_buffers+0x2fc/0x8d0 fs/nilfs2/segment.c:729
nilfs_segctor_scan_file+0x245/0xad0 fs/nilfs2/segment.c:1073
nilfs_segctor_collect_blocks fs/nilfs2/segment.c:1195 [inline]
nilfs_segctor_collect fs/nilfs2/segment.c:1522 [inline]
nilfs_segctor_do_construct+0x1c1b/0x6cc0 fs/nilfs2/segment.c:2068
nilfs_segctor_construct+0x145/0x8c0 fs/nilfs2/segment.c:2402
nilfs_segctor_thread_construct fs/nilfs2/segment.c:2510 [inline]
nilfs_segctor_thread+0x536/0x1130 fs/nilfs2/segment.c:2593
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__lock_acquire+0x69/0x1f80 kernel/locking/lockdep.c:4926
Code: df 0f b6 04 10 84 c0 0f 85 fb 15 00 00 83 3d f1 85 e9 0c 00 0f 84 a8 14 00 00 83 3d c0 79 75 0b 00 74 2b 4c 89 f0 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 f7 e8 39 46 76 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003e7f0a0 EFLAGS: 00010002
RAX: 000000000000003d RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 00000000000001e8
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888027da5940 R14: 00000000000001e8 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 000000001eaad000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: df 0f fisttps (%rdi)
2: b6 04 mov $0x4,%dh
4: 10 84 c0 0f 85 fb 15 adc %al,0x15fb850f(%rax,%rax,8)
b: 00 00 add %al,(%rax)
d: 83 3d f1 85 e9 0c 00 cmpl $0x0,0xce985f1(%rip) # 0xce98605
14: 0f 84 a8 14 00 00 je 0x14c2
1a: 83 3d c0 79 75 0b 00 cmpl $0x0,0xb7579c0(%rip) # 0xb7579e1
21: 74 2b je 0x4e
23: 4c 89 f0 mov %r14,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) <-- trapping instruction
2e: 74 12 je 0x42
30: 4c 89 f7 mov %r14,%rdi
33: e8 39 46 76 00 callq 0x764671
38: 48 rex.W
39: ba 00 00 00 00 mov $0x0,%edx
3e: 00 fc add %bh,%ah

syzbot

unread,
Dec 28, 2023, 1:41:04 AM12/28/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit f83913f8c5b882a312e72b7669762f8a5c9385e4
git tree: upstream
Author: Ryusuke Konishi <konishi...@gmail.com>
Date: Sat Aug 5 13:20:38 2023 +0000

nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12eb6ca1e80000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13b557f7280000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages