[v6.1] KASAN: null-ptr-deref Read in step_into

0 views
Skip to first unread message

syzbot

unread,
Apr 6, 2024, 7:08:24 AMApr 6
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 347385861c50 Linux 6.1.84
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12f59bc5180000
kernel config: https://syzkaller.appspot.com/x/.config?x=c6572e59ce99583c
dashboard link: https://syzkaller.appspot.com/bug?extid=e7800a34320e23078af9
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1390ac99180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=108b5115180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/101d17869fc3/disk-34738586.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1fd47dc155f3/vmlinux-34738586.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3a82e916ef21/Image-34738586.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/82afcf981211/mount_0.gz

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

loop0: detected capacity change from 0 to 4096
ntfs: volume version 3.1.
ntfs: (device loop0): ntfs_lookup(): ntfs_lookup_ino_by_name() failed with error code -67.
==================================================================
BUG: KASAN: null-ptr-deref in traverse_mounts fs/namei.c:1431 [inline]
BUG: KASAN: null-ptr-deref in handle_mounts fs/namei.c:1543 [inline]
BUG: KASAN: null-ptr-deref in step_into+0x15c/0xd1c fs/namei.c:1836
Read of size 4 at addr 0000000000000043 by task syz-executor884/4220

CPU: 1 PID: 4220 Comm: syz-executor884 Not tainted 6.1.84-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_report+0xe4/0x4c0 mm/kasan/report.c:398
kasan_report+0xd4/0x130 mm/kasan/report.c:495
kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189
__kasan_check_read+0x2c/0x3c mm/kasan/shadow.c:31
traverse_mounts fs/namei.c:1431 [inline]
handle_mounts fs/namei.c:1543 [inline]
step_into+0x15c/0xd1c fs/namei.c:1836
walk_component+0x1d4/0x36c fs/namei.c:2004
lookup_last fs/namei.c:2455 [inline]
path_lookupat+0x13c/0x3d0 fs/namei.c:2479
filename_lookup+0x1d4/0x4e0 fs/namei.c:2508
user_path_at_empty+0x5c/0x84 fs/namei.c:2907
user_path_at include/linux/namei.h:57 [inline]
do_utimes_path fs/utimes.c:94 [inline]
do_utimes+0x118/0x264 fs/utimes.c:144
__do_sys_utimensat fs/utimes.c:163 [inline]
__se_sys_utimensat fs/utimes.c:147 [inline]
__arm64_sys_utimensat+0x144/0x238 fs/utimes.c:147
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
==================================================================
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000043
Mem abort info:
ESR = 0x0000000096000021
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x21: alignment fault
Data abort info:
ISV = 0, ISS = 0x00000021
CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=0000000109d52000
[0000000000000043] pgd=080000011d7cf003, p4d=080000011d7cf003, pud=080000010bb9b003, pmd=0000000000000000
Internal error: Oops: 0000000096000021 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4220 Comm: syz-executor884 Tainted: G B 6.1.84-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : traverse_mounts fs/namei.c:1431 [inline]
pc : handle_mounts fs/namei.c:1543 [inline]
pc : step_into+0x15c/0xd1c fs/namei.c:1836
lr : traverse_mounts fs/namei.c:1431 [inline]
lr : handle_mounts fs/namei.c:1543 [inline]
lr : step_into+0x15c/0xd1c fs/namei.c:1836
sp : ffff80001dca77a0
x29: ffff80001dca78c0 x28: dfff800000000000 x27: 1ffff00003b94f46
x26: 0000000000000043 x25: 0000000000000001 x24: ffff80001dca7860
x23: ffff80001dca7878 x22: ffff80001dca7a58 x21: 1ffff00003b94f0f
x20: 1ffff00003b94f4b x19: ffff80001dca7a20 x18: 1fffe0003686f976
x17: 0000000000000000 x16: ffff8000121561d4 x15: 0000000000000000
x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000ff0100 x10: 0000000000000000 x9 : 0000000000000000
x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff800012220d5c
x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff8000081aebac
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
traverse_mounts fs/namei.c:1431 [inline]
handle_mounts fs/namei.c:1543 [inline]
step_into+0x15c/0xd1c fs/namei.c:1836
walk_component+0x1d4/0x36c fs/namei.c:2004
lookup_last fs/namei.c:2455 [inline]
path_lookupat+0x13c/0x3d0 fs/namei.c:2479
filename_lookup+0x1d4/0x4e0 fs/namei.c:2508
user_path_at_empty+0x5c/0x84 fs/namei.c:2907
user_path_at include/linux/namei.h:57 [inline]
do_utimes_path fs/utimes.c:94 [inline]
do_utimes+0x118/0x264 fs/utimes.c:144
__do_sys_utimensat fs/utimes.c:163 [inline]
__se_sys_utimensat fs/utimes.c:147 [inline]
__arm64_sys_utimensat+0x144/0x238 fs/utimes.c:147
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Code: f9406ffa 52800081 aa1a03e0 97fbde04 (88dfff5a)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: f9406ffa ldr x26, [sp, #216]
4: 52800081 mov w1, #0x4 // #4
8: aa1a03e0 mov x0, x26
c: 97fbde04 bl 0xffffffffffef781c
* 10: 88dfff5a ldar w26, [x26] <-- trapping instruction


---
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
Reply all
Reply to author
Forward
0 new messages