syzbot


KASAN: use-after-free Read in ext4_xattr_set_entry (2)
Status: auto-closed as invalid on 2020/07/21 03:20
Reported-by: syzbot+001dd339ee946331c255@syzkaller.appspotmail.com
First crash: 789d, last: 789d
similar bugs (11):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in ext4_xattr_set_entry (3) C error 1 84d 569d 0/1 upstream: reported C repro on 2020/10/28 15:08
android-414 KASAN: use-after-free Read in ext4_xattr_set_entry (2) 6 932d 988d 0/1 auto-closed as invalid on 2020/02/28 13:35
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry (2) C done 7 250d 708d 1/1 fixed on 2021/10/13 07:23
upstream KASAN: use-after-free Read in ext4_xattr_set_entry 1 1393d 1393d 0/22 closed as invalid on 2018/07/29 11:55
android-414 KASAN: use-after-free Read in ext4_xattr_set_entry 4 1240d 1133d 0/1 auto-closed as invalid on 2019/06/26 01:15
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (3) 4 685d 803d 0/22 auto-closed as invalid on 2020/11/02 08:32
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry syz done 10 812d 1060d 1/1 fixed on 2020/03/30 09:03
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (4) C error done 21 88d 475d 22/22 fixed on 2022/03/28 10:17
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (2) C done 19 886d 1295d 16/22 fixed on 2020/02/14 01:19
android-54 KASAN: use-after-free Read in ext4_xattr_set_entry 6 652d 833d 0/2 auto-closed as invalid on 2020/12/04 21:44
linux-4.14 KASAN: use-after-free Read in ext4_xattr_set_entry C done 9 840d 932d 1/1 fixed on 2020/03/01 21:06

Sample crash report:
EXT4-fs error (device sda1): ext4_xattr_set_entry:1605: inode #17230: comm syz-fuzzer: corrupted xattr entries
EXT4-fs error (device sda1): ext4_xattr_set_entry:1605: inode #17230: comm syz-fuzzer: corrupted xattr entries
EXT4-fs error (device sda1): ext4_xattr_ibody_find:2191: inode #17231: comm restorecond: corrupted in-inode xattr
==================================================================
EXT4-fs error (device sda1): ext4_xattr_ibody_get:590: inode #17231: comm syz-fuzzer: corrupted in-inode xattr
BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x2ed2/0x2fc0 fs/ext4/xattr.c:1602
Read of size 4 at addr ffff888079481002 by task syz-fuzzer/7361

CPU: 1 PID: 7361 Comm: syz-fuzzer Not tainted 4.14.174-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x13e/0x194 lib/dump_stack.c:58
 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393
 ext4_xattr_set_entry+0x2ed2/0x2fc0 fs/ext4/xattr.c:1602
 ext4_xattr_ibody_set+0x73/0x280 fs/ext4/xattr.c:2238
 ext4_xattr_set_handle+0x4f5/0xda0 fs/ext4/xattr.c:2394
 ext4_initxattrs+0xb5/0x110 fs/ext4/xattr_security.c:43
 security_inode_init_security security/security.c:492 [inline]
 security_inode_init_security+0x236/0x320 security/security.c:465
 __ext4_new_inode+0x353a/0x4e90 fs/ext4/ialloc.c:1171
 ext4_mkdir+0x2e4/0xb60 fs/ext4/namei.c:2665
 vfs_mkdir+0x3af/0x620 fs/namei.c:3849
 SYSC_mkdirat fs/namei.c:3872 [inline]
 SyS_mkdirat+0x1bc/0x210 fs/namei.c:3856
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x47c530
RSP: 002b:000000c43f397990 EFLAGS: 00000206 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000047c530
RDX: 00000000000001c0 RSI: 000000c4236b81e0 RDI: ffffffffffffff9c
RBP: 000000c43f3979f0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: ffffffffffffffff
R13: 0000000000000010 R14: 000000000000000f R15: 0000000000000100

The buggy address belongs to the page:
page:ffffea0001e52040 count:0 mapcount:-127 mapping:          (null) index:0x1
flags: 0xfffe0000000000()
raw: 00fffe0000000000 0000000000000000 0000000000000001 00000000ffffff80
raw: ffffea00017536e0 ffffea00018711a0 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888079480f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888079480f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888079481000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff888079481080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888079481100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2020/03/23 03:19 linux-4.14.y 01364dad1d45 78267cec .config log report