Re: [syzbot] UBSAN: array-index-out-of-bounds in udf_statfs

16 views
Skip to first unread message

syzbot

unread,
Jul 24, 2021, 5:13:09ā€ÆPM7/24/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
UBSAN: array-index-out-of-bounds in udf_statfs

================================================================================
UBSAN: array-index-out-of-bounds in fs/udf/super.c:2524:12
index 0 is out of range for type '__le32 [0]'
CPU: 0 PID: 10080 Comm: syz-executor.0 Not tainted 5.12.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x202/0x31e lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:148 [inline]
__ubsan_handle_out_of_bounds+0xdb/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2524 [inline]
udf_statfs+0x49f/0xd70 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f592d41d188 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffea1aab70f R14: 00007f592d41d300 R15: 0000000000022000
================================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 10080 Comm: syz-executor.0 Not tainted 5.12.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x202/0x31e lib/dump_stack.c:120
panic+0x2e1/0x850 kernel/panic.c:231
ubsan_epilogue lib/ubsan.c:162 [inline]
__ubsan_handle_out_of_bounds+0x12b/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2524 [inline]
udf_statfs+0x49f/0xd70 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f592d41d188 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffea1aab70f R14: 00007f592d41d300 R15: 0000000000022000
Kernel Offset: disabled
Rebooting in 86400 seconds..


Tested on:

commit: e77a830c Merge branch 'akpm' (patches from Andrew)
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=16ebce96300000
kernel config: https://syzkaller.appspot.com/x/.config?x=accfaa0e2fee7592
dashboard link: https://syzkaller.appspot.com/bug?extid=7fbfe5fed73ebb675748
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1

syzbot

unread,
Aug 3, 2021, 6:22:07ā€ÆAM8/3/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
UBSAN: array-index-out-of-bounds in udf_statfs

loop2: detected capacity change from 0 to 3974
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2020/09/19 18:44 (1000)
================================================================================
UBSAN: array-index-out-of-bounds in fs/udf/super.c:2524:12
index 0 is out of range for type '__le32 [0]'
CPU: 1 PID: 10145 Comm: syz-executor.2 Not tainted 5.14.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1d3/0x29f lib/dump_stack.c:105
ubsan_epilogue lib/ubsan.c:148 [inline]
__ubsan_handle_out_of_bounds+0xdb/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2524 [inline]
udf_statfs+0x49f/0xd70 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
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+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0abd759188 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffd8983270f R14: 00007f0abd759300 R15: 0000000000022000
================================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 10145 Comm: syz-executor.2 Not tainted 5.14.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1ae/0x29f lib/dump_stack.c:105
panic+0x2e1/0x850 kernel/panic.c:232
ubsan_epilogue lib/ubsan.c:162 [inline]
__ubsan_handle_out_of_bounds+0x12b/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2524 [inline]
udf_statfs+0x49f/0xd70 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
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+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0abd759188 EFLAGS: 00000246
ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffd8983270f R14: 00007f0abd759300 R15: 0000000000022000
Kernel Offset: disabled
Rebooting in 86400 seconds..


Tested on:

commit: c500bee1 Linux 5.14-rc4
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=1041fc52300000
kernel config: https://syzkaller.appspot.com/x/.config?x=6195ac39639020a3

syzbot

unread,
Aug 7, 2021, 7:10:15ā€ÆAM8/7/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

fs/udf/ecma_167.h:363:32: error: flexible array member 'freeSpaceTable' with type '__le32 []' is not at the end of struct


Tested on:

commit: c9194f32 Merge tag 'ext4_for_linus_stable' of git://gi..
patch: https://syzkaller.appspot.com/x/patch.diff?x=14de124e300000

syzbot

unread,
Aug 8, 2021, 7:49:07ā€ÆPM8/8/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
UBSAN: array-index-out-of-bounds in udf_statfs

================================================================================
UBSAN: array-index-out-of-bounds in fs/udf/super.c:2524:12
index 0 is out of range for type '__le32 [0]'
CPU: 0 PID: 10121 Comm: syz-executor.2 Not tainted 5.14.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1d3/0x29f lib/dump_stack.c:105
ubsan_epilogue lib/ubsan.c:148 [inline]
__ubsan_handle_out_of_bounds+0xdb/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2524 [inline]
udf_statfs+0x49f/0xd70 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
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+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb3a4dfa188 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008
R13: 00007ffce576b42f R14: 00007fb3a4dfa300 R15: 0000000000022000
================================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 10121 Comm: syz-executor.2 Not tainted 5.14.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1ae/0x29f lib/dump_stack.c:105
panic+0x2e1/0x850 kernel/panic.c:232
ubsan_epilogue lib/ubsan.c:162 [inline]
__ubsan_handle_out_of_bounds+0x12b/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2524 [inline]
udf_statfs+0x49f/0xd70 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
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+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb3a4dfa188 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008
R13: 00007ffce576b42f R14: 00007fb3a4dfa300 R15: 0000000000022000
Kernel Offset: disabled
Rebooting in 86400 seconds..


Tested on:

commit: 36a21d51 Linux 5.14-rc5
console output: https://syzkaller.appspot.com/x/log.txt?x=166c0a81300000
kernel config: https://syzkaller.appspot.com/x/.config?x=8aed59e692b18b6
dashboard link: https://syzkaller.appspot.com/bug?extid=7fbfe5fed73ebb675748

syzbot

unread,
Aug 8, 2021, 7:52:06ā€ÆPM8/8/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/super.c b/super.c
|index 2f83c12..5a21d35 100644
|--- a/super.c
|+++ b/super.c
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored



Tested on:

commit: 36a21d51 Linux 5.14-rc5
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
patch: https://syzkaller.appspot.com/x/patch.diff?x=164ce66e300000

syzbot

unread,
Aug 9, 2021, 5:00:08ā€ÆAM8/9/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
UBSAN: array-index-out-of-bounds in udf_statfs

================================================================================
UBSAN: array-index-out-of-bounds in fs/udf/super.c:2525:12
index 0 is out of range for type '__le32 [0]'
CPU: 1 PID: 10131 Comm: syz-executor.0 Not tainted 5.14.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1d3/0x29f lib/dump_stack.c:105
ubsan_epilogue lib/ubsan.c:148 [inline]
__ubsan_handle_out_of_bounds+0xdb/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2525 [inline]
udf_statfs+0x51f/0xe50 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
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+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fbf22d4b188 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffdce911c1f R14: 00007fbf22d4b300 R15: 0000000000022000
================================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 10131 Comm: syz-executor.0 Not tainted 5.14.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1ae/0x29f lib/dump_stack.c:105
panic+0x2e1/0x850 kernel/panic.c:232
ubsan_epilogue lib/ubsan.c:162 [inline]
__ubsan_handle_out_of_bounds+0x12b/0x130 lib/ubsan.c:288
udf_count_free fs/udf/super.c:2525 [inline]
udf_statfs+0x51f/0xe50 fs/udf/super.c:2408
statfs_by_dentry fs/statfs.c:66 [inline]
vfs_statfs+0x136/0x310 fs/statfs.c:90
user_statfs fs/statfs.c:105 [inline]
__do_sys_statfs fs/statfs.c:195 [inline]
__se_sys_statfs+0xe5/0x210 fs/statfs.c:192
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+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fbf22d4b188 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00000000004bfbb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffdce911c1f R14: 00007fbf22d4b300 R15: 0000000000022000
Kernel Offset: disabled
Rebooting in 86400 seconds..


Tested on:

commit: 36a21d51 Linux 5.14-rc5
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=134b5579300000
kernel config: https://syzkaller.appspot.com/x/.config?x=8aed59e692b18b6
dashboard link: https://syzkaller.appspot.com/bug?extid=7fbfe5fed73ebb675748
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1
patch: https://syzkaller.appspot.com/x/patch.diff?x=120c70d6300000

syzbot

unread,
Aug 10, 2021, 12:11:11ā€ÆPM8/10/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
checking file fs/udf/super.c
patch: **** malformed patch at line 15:




Tested on:

commit: 9a73fa37 Merge branch 'for-5.14-fixes' of git://git.ke..
patch: https://syzkaller.appspot.com/x/patch.diff?x=15dd5ef6300000

syzbot

unread,
Aug 10, 2021, 10:50:10ā€ÆPM8/10/21
to ash...@itfac.mrt.ac.lk, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+7fbfe5...@syzkaller.appspotmail.com

Tested on:

commit: 9e723c53 Merge tag 'platform-drivers-x86-v5.14-3' of g..
kernel config: https://syzkaller.appspot.com/x/.config?x=8aed59e692b18b6
dashboard link: https://syzkaller.appspot.com/bug?extid=7fbfe5fed73ebb675748
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1
patch: https://syzkaller.appspot.com/x/patch.diff?x=10c25dbe300000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages