syzbot


KASAN: use-after-free Read in ext4_xattr_set_entry (3)

Status: upstream: reported C repro on 2020/10/28 15:08
Reported-by: syzbot+4b7d3ef81b4049017236@syzkaller.appspotmail.com
First crash: 1247d, last: 762d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (12)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-414 KASAN: use-after-free Read in ext4_xattr_set_entry (2) 6 1610d 1665d 0/1 auto-closed as invalid on 2020/02/28 13:35
linux-4.14 KASAN: use-after-free Read in ext4_xattr_set_entry (2) 1 1466d 1466d 0/1 auto-closed as invalid on 2020/07/21 03:20
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry (2) C done 7 928d 1386d 1/1 fixed on 2021/10/13 07:23
upstream KASAN: use-after-free Read in ext4_xattr_set_entry ext4 1 2071d 2071d 0/26 closed as invalid on 2018/07/29 11:55
android-414 KASAN: use-after-free Read in ext4_xattr_set_entry 4 1917d 1810d 0/1 auto-closed as invalid on 2019/06/26 01:15
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (5) ext4 2 612d 670d 0/26 auto-obsoleted due to no activity on 2022/11/22 17:19
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (3) ext4 4 1362d 1480d 0/26 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 1489d 1738d 1/1 fixed on 2020/03/30 09:03
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (4) ext4 C error done 21 766d 1153d 20/26 fixed on 2022/03/28 10:17
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (2) ext4 C done 19 1564d 1973d 15/26 fixed on 2020/02/14 01:19
android-54 KASAN: use-after-free Read in ext4_xattr_set_entry 6 1329d 1510d 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 1518d 1610d 1/1 fixed on 2020/03/01 21:06
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/02/14 03:32 14m retest repro linux-4.14.y report log
2022/10/02 09:30 9m retest repro linux-4.14.y report log
Fix bisection attempts (17)
Created Duration User Patch Repo Result
2022/03/29 13:51 12m bisect fix linux-4.14.y error job log (0)
2022/02/25 16:09 26m bisect fix linux-4.14.y job log (0) log
2022/01/26 15:40 23m bisect fix linux-4.14.y job log (0) log
2021/12/27 15:14 25m bisect fix linux-4.14.y job log (0) log
2021/11/27 14:05 24m bisect fix linux-4.14.y job log (0) log
2021/10/28 13:33 29m bisect fix linux-4.14.y job log (0) log
2021/09/24 01:23 22m bisect fix linux-4.14.y job log (0) log
2021/08/25 00:27 27m bisect fix linux-4.14.y job log (0) log
2021/07/26 00:02 24m bisect fix linux-4.14.y job log (0) log
2021/06/25 23:41 21m bisect fix linux-4.14.y job log (0) log
2021/05/26 23:16 24m bisect fix linux-4.14.y job log (0) log
2021/04/26 22:30 27m bisect fix linux-4.14.y job log (0) log
2021/03/27 20:59 22m bisect fix linux-4.14.y job log (0) log
2021/02/25 20:23 23m bisect fix linux-4.14.y job log (0) log
2021/01/26 19:51 31m bisect fix linux-4.14.y job log (0) log
2020/12/27 19:25 25m bisect fix linux-4.14.y job log (0) log
2020/11/27 19:02 22m bisect fix linux-4.14.y job log (0) log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x30cb/0x30f0 fs/ext4/xattr.c:1603
Read of size 4 at addr ffff88808ba45004 by task syz-executor268/8668

CPU: 0 PID: 8668 Comm: syz-executor268 Not tainted 4.14.202-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+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429
 ext4_xattr_set_entry+0x30cb/0x30f0 fs/ext4/xattr.c:1603
 ext4_xattr_ibody_set+0x73/0x280 fs/ext4/xattr.c:2242
 ext4_xattr_set_handle+0x4d0/0xd20 fs/ext4/xattr.c:2398
 ext4_xattr_set+0x118/0x230 fs/ext4/xattr.c:2510
 __vfs_setxattr+0xdc/0x130 fs/xattr.c:150
 __vfs_setxattr_noperm+0xfd/0x3d0 fs/xattr.c:181
 __vfs_setxattr_locked+0x14d/0x250 fs/xattr.c:239
 vfs_setxattr+0xcf/0x230 fs/xattr.c:256
 setxattr+0x1a9/0x300 fs/xattr.c:523
 path_setxattr+0x118/0x130 fs/xattr.c:542
 SYSC_setxattr fs/xattr.c:557 [inline]
 SyS_setxattr+0x36/0x50 fs/xattr.c:553
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x445ba9
RSP: 002b:00007ffeb05e9d18 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000445ba9
RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000020000100
RBP: 0000000001a18c30 R08: 0000000000000001 R09: 0000006e0000005b
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffeb05e9d90
R13: 0000000000000044 R14: 0000000000000000 R15: 0000000000000000

The buggy address belongs to the page:
page:ffffea00022e9140 count:0 mapcount:0 mapping:          (null) index:0x1
flags: 0xfff00000000000()
raw: 00fff00000000000 0000000000000000 0000000000000001 00000000ffffffff
raw: ffffea00022ed960 ffffea00022ea8e0 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88808ba44f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88808ba44f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88808ba45000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff88808ba45080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88808ba45100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/28 15:08 linux-4.14.y 5b7a52cd2eef 96e03c1c .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.