[Android 5.10] kernel BUG in kvfree

0 views
Skip to first unread message

syzbot

unread,
May 6, 2023, 6:23:42 PM5/6/23
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3ad342cf5b2c Revert "net: mdio: fix owner field for mdio b..
git tree: android13-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=15231bd2280000
kernel config: https://syzkaller.appspot.com/x/.config?x=4c2e555eed123787
dashboard link: https://syzkaller.appspot.com/bug?extid=462b5bfa37ec027f4e5b
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=109b9eca280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14f7ba7a280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/68efc541dcd2/disk-3ad342cf.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f1c55bff052a/vmlinux-3ad342cf.xz
kernel image: https://storage.googleapis.com/syzbot-assets/62b39d17209d/bzImage-3ad342cf.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/93b9f05fa347/mount_0.gz

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

EXT4-fs (loop0): mounted filesystem without journal. Opts: inode_readahead_blks=0x0000000000000000,errors=continue,debug_want_extra_isize=0x0000000000000040,dioread_nolock,max_batch_time=0x0000000000000008,nombcache,,errors=continue
------------[ cut here ]------------
kernel BUG at mm/slub.c:4184!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 292 Comm: syz-executor356 Not tainted 5.10.177-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
RIP: 0010:kfree+0x269/0x270 mm/slub.c:4184
Code: 08 4c 89 ee 48 89 da e8 55 63 f2 ff 65 ff 0d ea 7a 5b 7e 0f 85 d2 fd ff ff e8 2f 8c 59 ff e9 c8 fd ff ff e8 a9 c1 02 03 0f 0b <0f> 0b 0f 1f 44 00 00 55 48 89 e5 53 48 83 ec 18 89 f2 65 48 8b 04
RSP: 0018:ffffc9000095f780 EFLAGS: 00010246

RAX: ffffea0004647f48 RBX: ffff88811da165a4 RCX: ffffea0004768580
RDX: 0000000000000000 RSI: 0000000000000012 RDI: ffff88811da165a4
RBP: ffffc9000095f7d8 R08: ffffffff81ed6729 R09: 0000000000000003
R10: fffff5200012be70 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffff81979c15 R14: 0000000000000000 R15: ffffea0004768580
FS: 000055555614b300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020002000 CR3: 000000011b047000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kvfree+0x35/0x40 mm/util.c:647
ext4_xattr_move_to_block fs/ext4/xattr.c:2643 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2706 [inline]
ext4_expand_extra_isize_ea+0x1124/0x1e60 fs/ext4/xattr.c:2798
__ext4_expand_extra_isize+0x303/0x3f0 fs/ext4/inode.c:5928
ext4_try_to_expand_extra_isize fs/ext4/inode.c:5971 [inline]
__ext4_mark_inode_dirty+0x4a7/0x7b0 fs/ext4/inode.c:6048
__ext4_unlink+0x8b5/0xac0 fs/ext4/namei.c:3389
ext4_unlink+0x142/0x3f0 fs/ext4/namei.c:3432
vfs_unlink+0x23b/0x510 fs/namei.c:3977
do_unlinkat+0x430/0x8b0 fs/namei.c:4042
__do_sys_unlinkat fs/namei.c:4083 [inline]
__se_sys_unlinkat fs/namei.c:4076 [inline]
__x64_sys_unlinkat+0xcd/0xf0 fs/namei.c:4076
do_syscall_64+0x34/0x70
entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7ff917c5cc19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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:00007ffd31787278 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007ff917c5cc19
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00007ff917c1c250 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff917c1c2e0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 124e3bede6c226d4 ]---
RIP: 0010:kfree+0x269/0x270 mm/slub.c:4184
Code: 08 4c 89 ee 48 89 da e8 55 63 f2 ff 65 ff 0d ea 7a 5b 7e 0f 85 d2 fd ff ff e8 2f 8c 59 ff e9 c8 fd ff ff e8 a9 c1 02 03 0f 0b <0f> 0b 0f 1f 44 00 00 55 48 89 e5 53 48 83 ec 18 89 f2 65 48 8b 04
RSP: 0018:ffffc9000095f780 EFLAGS: 00010246
RAX: ffffea0004647f48 RBX: ffff88811da165a4 RCX: ffffea0004768580
RDX: 0000000000000000 RSI: 0000000000000012 RDI: ffff88811da165a4
RBP: ffffc9000095f7d8 R08: ffffffff81ed6729 R09: 0000000000000003
R10: fffff5200012be70 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffff81979c15 R14: 0000000000000000 R15: ffffea0004768580
FS: 000055555614b300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020002000 CR3: 000000011b047000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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,
May 7, 2023, 9:41:43 AM5/7/23
to syzkaller-a...@googlegroups.com
syzbot has bisected this issue to:

commit d738789ae9ec47d3458a008788f3cdc862ebf0cb
Author: Jun Nie <jun...@linaro.org>
Date: Tue Jan 3 01:45:16 2023 +0000

ext4: optimize ea_inode block expansion

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14c38b5a280000
start commit: 3ad342cf5b2c Revert "net: mdio: fix owner field for mdio b..
git tree: android13-5.10-lts
final oops: https://syzkaller.appspot.com/x/report.txt?x=16c38b5a280000
console output: https://syzkaller.appspot.com/x/log.txt?x=12c38b5a280000
Reported-by: syzbot+462b5b...@syzkaller.appspotmail.com
Fixes: d738789ae9ec ("ext4: optimize ea_inode block expansion")

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