Hello,
syzbot found the following issue on:
HEAD commit: e8b14e1cefe8 Merge 5.10.250 into android13-5.10-lts
git tree: android13-5.10-lts
console output:
https://syzkaller.appspot.com/x/log.txt?x=117ec006580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=ef167f989dba92e
dashboard link:
https://syzkaller.appspot.com/bug?extid=8033bf14e2a4aa787ba6
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=12a18202580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=119a455a580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/2cb33b640169/disk-e8b14e1c.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/f8359c31fc26/vmlinux-e8b14e1c.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/5bd79d6a6c1e/bzImage-e8b14e1c.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/bbefc864a8db/mount_0.gz
fsck result: failed (log:
https://syzkaller.appspot.com/x/fsck.log?x=12f5b722580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+8033bf...@syzkaller.appspotmail.com
EXT4-fs (loop2): Ignoring removed orlov option
EXT4-fs (loop2): mounted filesystem without journal. Opts: block_validity,bsddf,nombcache,inode_readahead_blks=0x0000000000000000,debug_want_extra_isize=0x0000000000000080,orlov,nogrpid,noauto_da_alloc,grpjquota=,,errors=continue
==================================================================
BUG: KASAN: use-after-free in xattr_find_entry fs/ext4/xattr.c:294 [inline]
BUG: KASAN: use-after-free in ext4_xattr_ibody_get+0x62e/0x690 fs/ext4/xattr.c:601
Read of size 4 at addr ffff88811147a004 by task syz.2.20/386
CPU: 0 PID: 386 Comm: syz.2.20 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:77
dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:435 [inline]
kasan_report+0xe2/0x130 mm/kasan/report.c:452
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
xattr_find_entry fs/ext4/xattr.c:294 [inline]
ext4_xattr_ibody_get+0x62e/0x690 fs/ext4/xattr.c:601
ext4_xattr_get+0x116/0x820 fs/ext4/xattr.c:655
ext4_get_acl+0x6c/0x660 fs/ext4/acl.c:162
get_acl+0x15f/0x270 fs/posix_acl.c:141
posix_acl_chmod+0xe4/0x240 fs/posix_acl.c:565
ext4_setattr+0x9fa/0x1760 fs/ext4/inode.c:5722
notify_change+0xab3/0xe40 fs/attr.c:410
chmod_common+0x1e1/0x390 fs/open.c:584
do_fchmodat+0xd4/0x1a0 fs/open.c:622
__do_sys_fchmodat fs/open.c:635 [inline]
__se_sys_fchmodat fs/open.c:632 [inline]
__x64_sys_fchmodat+0x7b/0x90 fs/open.c:632
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f2233b85629
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff13c70298 EFLAGS: 00000246 ORIG_RAX: 000000000000010c
RAX: ffffffffffffffda RBX: 00007f2233dfefa0 RCX: 00007f2233b85629
RDX: 000000000000017f RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f2233c1bb39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f2233dfefac R14: 00007f2233dfefa0 R15: 00007f2233dfefa0
Allocated by task 288:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:430 [inline]
__kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:463
kasan_slab_alloc include/linux/kasan.h:244 [inline]
slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580
slab_alloc_node mm/slub.c:2952 [inline]
slab_alloc mm/slub.c:2960 [inline]
kmem_cache_alloc+0x162/0x2d0 mm/slub.c:2965
mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513
mempool_alloc+0x11e/0x460 mm/mempool.c:393
bio_alloc_bioset+0x18c/0x570 block/bio.c:486
bio_alloc include/linux/bio.h:412 [inline]
mpage_alloc fs/mpage.c:115 [inline]
do_mpage_readpage+0x1441/0x1a40 fs/mpage.c:342
mpage_readahead+0x272/0x560 fs/mpage.c:425
blkdev_readahead+0x1c/0x20 fs/block_dev.c:653
read_pages+0x17b/0xb60 mm/readahead.c:140
page_cache_ra_unbounded+0x693/0x7e0 mm/readahead.c:248
do_page_cache_ra mm/readahead.c:277 [inline]
force_page_cache_ra+0x3a9/0x400 mm/readahead.c:308
page_cache_sync_ra+0x237/0x2a0 mm/readahead.c:582
page_cache_sync_readahead include/linux/pagemap.h:837 [inline]
generic_file_buffered_read+0x574/0x2770 mm/filemap.c:2250
generic_file_read_iter+0x11e/0x5c0 mm/filemap.c:2568
blkdev_read_iter+0x12f/0x160 fs/block_dev.c:1956
call_read_iter include/linux/fs.h:2060 [inline]
new_sync_read fs/read_write.c:415 [inline]
vfs_read+0x62a/0xa60 fs/read_write.c:496
ksys_read+0x149/0x250 fs/read_write.c:634
__do_sys_read fs/read_write.c:644 [inline]
__se_sys_read fs/read_write.c:642 [inline]
__x64_sys_read+0x7b/0x90 fs/read_write.c:642
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
Freed by task 12:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
kasan_slab_free include/linux/kasan.h:220 [inline]
slab_free_hook mm/slub.c:1600 [inline]
slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626
slab_free mm/slub.c:3208 [inline]
kmem_cache_free+0x100/0x2d0 mm/slub.c:3224
mempool_free_slab+0x1d/0x30 mm/mempool.c:520
mempool_free+0xd8/0x340 mm/mempool.c:502
bio_free+0x24a/0x360 block/bio.c:266
bio_put+0xbf/0x110 block/bio.c:-1
mpage_end_io+0x2ea/0x560 fs/mpage.c:76
bio_endio+0x646/0x860 block/bio.c:1458
req_bio_endio block/blk-core.c:263 [inline]
blk_update_request+0x74a/0x1090 block/blk-core.c:1468
blk_mq_end_request+0x41/0x80 block/blk-mq.c:572
lo_complete_rq+0x147/0x2d0 drivers/block/loop.c:490
blk_done_softirq+0x26f/0x2f0 block/blk-mq.c:596
__do_softirq+0x255/0x563 kernel/softirq.c:309
The buggy address belongs to the object at ffff88811147a000
which belongs to the cache bio-0 of size 216
The buggy address is located 4 bytes inside of
216-byte region [ffff88811147a000, ffff88811147a0d8)
The buggy address belongs to the page:
page:ffffea0004451e80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11147a
flags: 0x4000000000000200(slab)
raw: 4000000000000200 dead000000000100 dead000000000122 ffff888107fbe780
raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x192880(GFP_NOWAIT|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 288, ts 31234995485, free_ts 31174684175
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2456 [inline]
prep_new_page+0x179/0x180 mm/page_alloc.c:2462
get_page_from_freelist+0x223b/0x23d0 mm/page_alloc.c:4254
__alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5370
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1813 [inline]
new_slab+0x84/0x3f0 mm/slub.c:1874
new_slab_objects mm/slub.c:2632 [inline]
___slab_alloc+0x2a6/0x450 mm/slub.c:2796
__slab_alloc+0x63/0xa0 mm/slub.c:2836
slab_alloc_node mm/slub.c:2918 [inline]
slab_alloc mm/slub.c:2960 [inline]
kmem_cache_alloc+0x1ac/0x2d0 mm/slub.c:2965
mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513
mempool_alloc+0x11e/0x460 mm/mempool.c:393
bio_alloc_bioset+0x18c/0x570 block/bio.c:486
bio_alloc include/linux/bio.h:412 [inline]
mpage_alloc fs/mpage.c:115 [inline]
do_mpage_readpage+0x1441/0x1a40 fs/mpage.c:342
mpage_readahead+0x272/0x560 fs/mpage.c:425
blkdev_readahead+0x1c/0x20 fs/block_dev.c:653
read_pages+0x17b/0xb60 mm/readahead.c:140
page_cache_ra_unbounded+0x693/0x7e0 mm/readahead.c:248
do_page_cache_ra mm/readahead.c:277 [inline]
force_page_cache_ra+0x3a9/0x400 mm/readahead.c:308
page last free stack trace:
reset_page_owner include/linux/page_owner.h:28 [inline]
free_pages_prepare mm/page_alloc.c:1349 [inline]
__free_pages_ok+0x80b/0x830 mm/page_alloc.c:1629
free_the_page mm/page_alloc.c:5431 [inline]
__free_pages+0xd8/0x3b0 mm/page_alloc.c:5440
__free_slab+0xcf/0x190 mm/slub.c:1899
free_slab mm/slub.c:1914 [inline]
discard_slab mm/slub.c:1920 [inline]
unfreeze_partials+0x15f/0x190 mm/slub.c:2415
put_cpu_partial+0xc1/0x180 mm/slub.c:2451
__slab_free+0x2c9/0x3a0 mm/slub.c:3100
do_slab_free mm/slub.c:3196 [inline]
___cache_free+0x10e/0x130 mm/slub.c:3215
qlink_free+0x50/0x90 mm/kasan/quarantine.c:157
qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x14a/0x160 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xf0 mm/kasan/common.c:440
kasan_slab_alloc include/linux/kasan.h:244 [inline]
slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580
slab_alloc_node mm/slub.c:2952 [inline]
slab_alloc mm/slub.c:2960 [inline]
kmem_cache_alloc+0x162/0x2d0 mm/slub.c:2965
getname_flags+0xb9/0x500 fs/namei.c:141
getname fs/namei.c:212 [inline]
__do_sys_unlink fs/namei.c:4090 [inline]
__se_sys_unlink fs/namei.c:4088 [inline]
__x64_sys_unlink+0x3c/0x50 fs/namei.c:4088
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
Memory state around the buggy address:
ffff888111479f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888111479f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88811147a000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88811147a080: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
ffff88811147a100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================
EXT4-fs error (device loop2): xattr_find_entry:297: inode #12: comm syz.2.20: corrupted xattr entries
---
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 report is already addressed, 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 overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup