syzbot


KASAN: out-of-bounds Write in udf_write_fi

Status: auto-obsoleted due to no activity on 2025/01/28 04:11
Reported-by: syzbot+f9de9ee6cb8adb5b14c5@syzkaller.appspotmail.com
First crash: 692d, last: 126d
Fix commit to backport (bisect log) :
tree: upstream
commit e9109a92d2a95889498bed3719cd2318892171a2
Author: Jan Kara <jack@suse.cz>
Date: Thu Oct 6 14:41:23 2022 +0000

  udf: Convert udf_rename() to new directory iteration code

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: KASAN: null-ptr-deref Write in udf_write_fi (log)
Repro: C syz .config
  
Bug presence (1)
Date Name Commit Repro Result
2024/12/22 upstream (ToT) 48f506ad0b68 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: null-ptr-deref Write in udf_write_fi origin:lts-only C inconclusive 34 171d 636d 0/3 upstream: reported C repro on 2023/05/29 04:55
linux-4.19 KASAN: out-of-bounds Write in udf_write_fi udf C error 9 732d 1113d 0/1 upstream: reported C repro on 2022/02/06 00:22
linux-4.14 KASAN: out-of-bounds Write in udf_write_fi C 1 731d 731d 0/1 upstream: reported C repro on 2023/02/23 05:38
upstream KASAN: null-ptr-deref Write in udf_write_fi udf C inconclusive done 51 757d 880d 22/28 fixed on 2023/06/08 14:41
Last patch testing requests (8)
Created Duration User Patch Repo Result
2024/12/21 08:31 21m retest repro linux-5.15.y OK log
2024/12/21 08:31 15m retest repro linux-5.15.y OK log
2024/12/21 08:31 23m retest repro linux-5.15.y OK log
2024/12/20 11:21 1h07m retest repro linux-5.15.y log
2024/11/03 10:42 15m retest repro linux-5.15.y OK log
2024/10/09 06:54 14m retest repro linux-5.15.y report log
2024/10/09 06:54 19m retest repro linux-5.15.y report log
2024/10/09 06:54 32m retest repro linux-5.15.y report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/10/23 14:14 5h08m fix candidate upstream OK (1) job log
2023/10/20 05:32 58m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: out-of-bounds in udf_write_fi+0x569/0xb70
Write of size 18446744073709551572 at addr ffff88805b2cf02c by task syz-executor.1/31223

CPU: 0 PID: 31223 Comm: syz-executor.1 Not tainted 5.15.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189
 memset+0x1f/0x40 mm/kasan/shadow.c:44
 udf_write_fi+0x569/0xb70
 udf_delete_entry fs/udf/namei.c:577 [inline]
 udf_rename+0x8b3/0x14d0 fs/udf/namei.c:1173
 vfs_rename+0xd8f/0x1190 fs/namei.c:4736
 do_renameat2+0xb97/0x13b0 fs/namei.c:4887
 __do_sys_rename fs/namei.c:4933 [inline]
 __se_sys_rename fs/namei.c:4931 [inline]
 __x64_sys_rename+0x82/0x90 fs/namei.c:4931
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f40628dc169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4058b2d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f40629fc050 RCX: 00007f40628dc169
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000020000240
RBP: 00007f4062937ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcc18f063f R14: 00007f4058b2d300 R15: 0000000000022000
 </TASK>

The buggy address belongs to the page:
page:ffffea00016cb3c0 refcount:2 mapcount:0 mapping:ffff88814084abf0 index:0xb0 pfn:0x5b2cf
memcg:ffff888042d24000
aops:def_blk_aops ino:700001
flags: 0xfff0000000203e(referenced|uptodate|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff0000000203e ffffea0001589308 ffff88801cc27030 ffff88814084abf0
raw: 00000000000000b0 ffff888043a93bc8 00000002ffffffff ffff888042d24000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 31223, ts 2495337439328, free_ts 2493858820608
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421
 __page_cache_alloc+0xd4/0x4a0 mm/filemap.c:1022
 pagecache_get_page+0xa91/0x1010 mm/filemap.c:1940
 find_or_create_page include/linux/pagemap.h:420 [inline]
 grow_dev_page fs/buffer.c:949 [inline]
 grow_buffers fs/buffer.c:1014 [inline]
 __getblk_slow fs/buffer.c:1041 [inline]
 __getblk_gfp+0x22a/0xaf0 fs/buffer.c:1336
 __bread_gfp+0x2a/0x390 fs/buffer.c:1381
 udf_find_entry+0x118b/0x14d0 fs/udf/namei.c:206
 udf_lookup+0x11b/0x370 fs/udf/namei.c:309
 __lookup_hash+0x117/0x240 fs/namei.c:1560
 do_renameat2+0x570/0x13b0 fs/namei.c:4830
 __do_sys_rename fs/namei.c:4933 [inline]
 __se_sys_rename fs/namei.c:4931 [inline]
 __x64_sys_rename+0x82/0x90 fs/namei.c:4931
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433
 release_pages+0x1bb9/0x1f40 mm/swap.c:963
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu mm/mmu_gather.c:247 [inline]
 tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:338
 exit_mmap+0x3cd/0x670 mm/mmap.c:3188
 __mmput+0x112/0x3b0 kernel/fork.c:1118
 exit_mm+0x688/0x7f0 kernel/exit.c:548
 do_exit+0x626/0x2480 kernel/exit.c:859
 do_group_exit+0x144/0x310 kernel/exit.c:994
 get_signal+0xc66/0x14e0 kernel/signal.c:2889
 arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:865
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff88805b2cef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88805b2cef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88805b2cf000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                  ^
 ffff88805b2cf080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88805b2cf100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (45):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/04 18:16 linux-5.15.y 8a7f2a5c5aa1 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Write in udf_write_fi
2023/05/03 18:26 linux-5.15.y 8a7f2a5c5aa1 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Write in udf_write_fi
2023/04/03 11:46 linux-5.15.y c957cbb87315 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Write in udf_write_fi
2023/07/28 03:50 linux-5.15.y 09996673e313 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: out-of-bounds Write in udf_write_fi
2023/06/25 21:33 linux-5.15.y f67653019430 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: out-of-bounds Write in udf_write_fi
2023/06/25 05:52 linux-5.15.y f67653019430 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: out-of-bounds Write in udf_write_fi
2024/10/20 04:10 linux-5.15.y 584a40a22cb9 cd6fc0a3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/10/20 03:39 linux-5.15.y 584a40a22cb9 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/09/14 02:00 linux-5.15.y 3a5928702e71 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/09/05 07:00 linux-5.15.y 14e468424d3e dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/09/05 07:00 linux-5.15.y 14e468424d3e dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/07/09 09:04 linux-5.15.y f45bea23c39c bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/07/09 09:04 linux-5.15.y f45bea23c39c bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/07/09 09:04 linux-5.15.y f45bea23c39c bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/07/09 09:04 linux-5.15.y f45bea23c39c bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/22 19:32 linux-5.15.y 83655231580b 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/22 19:31 linux-5.15.y 83655231580b 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/12 07:51 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/12 07:28 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/06 20:25 linux-5.15.y 284087d4f7d5 d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/04 21:59 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/04 21:47 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/04 21:44 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/04 21:33 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/04 13:00 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/05/01 06:17 linux-5.15.y b925f60c6ee7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/04/28 19:24 linux-5.15.y b925f60c6ee7 07b455f9 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/04/28 18:32 linux-5.15.y b925f60c6ee7 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2024/04/28 18:24 linux-5.15.y b925f60c6ee7 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2023/12/07 01:11 linux-5.15.y 9b91d36ba301 e3299f55 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2023/12/06 23:01 linux-5.15.y 9b91d36ba301 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2023/09/19 22:02 linux-5.15.y 35ecaa3632bf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: null-ptr-deref Write in udf_write_fi
2023/06/23 09:39 linux-5.15.y f67653019430 79782afc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: null-ptr-deref Write in udf_write_fi
2024/05/12 07:59 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in udf_write_fi
2024/05/12 07:37 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in udf_write_fi
2024/05/06 20:25 linux-5.15.y 284087d4f7d5 d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in udf_write_fi
2023/05/29 11:43 linux-5.15.y 1fe619a7d252 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: null-ptr-deref Write in udf_write_fi
2023/07/12 19:28 linux-5.15.y d54cfc420586 979d5fe2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2023/07/07 03:47 linux-5.15.y d54cfc420586 22ae5830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2023/06/18 15:04 linux-5.15.y 471e639e59d1 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2023/06/18 14:56 linux-5.15.y 471e639e59d1 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in udf_write_fi
2023/04/23 03:58 linux-5.15.y 3299fb36854f 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: null-ptr-deref Write in udf_write_fi
2023/06/09 03:28 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: null-ptr-deref Write in udf_write_fi
* Struck through repros no longer work on HEAD.