UBSAN: undefined-behaviour in xprt_reset_majortimeo

6 views
Skip to first unread message

syzbot

unread,
Sep 20, 2020, 5:06:16 PM9/20/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16f0a0d3900000
kernel config: https://syzkaller.appspot.com/x/.config?x=243dd74ad58a8a57
dashboard link: https://syzkaller.appspot.com/bug?extid=ca2e0e545f9a1ba6a74c
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

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

================================================================================
UBSAN: Undefined behaviour in net/sunrpc/xprt.c:568:22
shift exponent 536871552 is too large for 64-bit type 'long unsigned int'
CPU: 1 PID: 30480 Comm: syz-executor.4 Not tainted 4.19.146-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
xprt_reset_majortimeo+0x2f8/0x3b0 net/sunrpc/xprt.c:568
xprt_request_init net/sunrpc/xprt.c:1290 [inline]
xprt_do_reserve+0x438/0x530 net/sunrpc/xprt.c:1300
xprt_reserve+0x129/0x1f0 net/sunrpc/xprt.c:1322
__rpc_execute+0x1f7/0xb80 net/sunrpc/sched.c:783
rpc_execute+0x242/0x370 net/sunrpc/sched.c:851
rpc_run_task+0x4e3/0x6a0 net/sunrpc/clnt.c:1064
rpc_call_sync+0xb8/0x190 net/sunrpc/clnt.c:1093
rpc_ping+0xb5/0x110 net/sunrpc/clnt.c:2527
rpc_create_xprt+0x313/0x3c0 net/sunrpc/clnt.c:479
rpc_create+0x31e/0x540 net/sunrpc/clnt.c:587
nfs_create_rpc_client+0x36f/0x440 fs/nfs/client.c:529
nfs_init_client fs/nfs/client.c:640 [inline]
nfs_init_client+0x6d/0x100 fs/nfs/client.c:627
nfs_get_client+0xf9f/0x13e0 fs/nfs/client.c:431
nfs_init_server+0x249/0xe10 fs/nfs/client.c:676
nfs_create_server+0x7a/0x4f0 fs/nfs/client.c:960
nfs3_create_server+0x1a/0x1b0 fs/nfs/nfs3client.c:51
nfs_try_mount+0x172/0x940 fs/nfs/super.c:1884
nfs_fs_mount+0x171f/0x2e8e fs/nfs/super.c:2701
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45d5f9
Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f05f1ca0c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00000000000212c0 RCX: 000000000045d5f9
RDX: 0000000020000200 RSI: 00000000200001c0 RDI: 0000000000000000
RBP: 000000000118cf90 R08: 0000000020000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c
R13: 00007ffe9fa079ff R14: 00007f05f1ca19c0 R15: 000000000118cf4c
================================================================================
tmpfs: Bad value 'bind' for mount option 'mpol'
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
BTRFS error (device loop2): open_ctree failed
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
================================================================================
UBSAN: Undefined behaviour in fs/ext4/super.c:3763:25
shift exponent 65 is too large for 32-bit type 'int'
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
CPU: 0 PID: 30565 Comm: syz-executor.3 Not tainted 4.19.146-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
ext4_fill_super.cold+0x33b/0x4ea fs/ext4/super.c:3763
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x46004a
Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 fd 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 da 89 fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007f0864595a88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0864595b20 RCX: 000000000046004a
RDX: 0000000020000080 RSI: 00000000200000c0 RDI: 00007f0864595ae0
RBP: 00007f0864595ae0 R08: 00007f0864595b20 R09: 0000000020000080
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000080
R13: 00000000200000c0 R14: 0000000020000040 R15: 0000000020000000
================================================================================
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables
EXT4-fs (loop3): error: journal path ./file1 is not a block device
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS info (device loop2): disk space caching is enabled
BTRFS info (device loop2): has skinny extents
EXT4-fs (loop3): error: journal path ./file1 is not a block device
BTRFS warning (device loop2): loop2 checksum verify failed on 30507008 wanted 44605F1E found 2C41A054 level 0
BTRFS error (device loop2): bad tree block start, want 30507008 have 0
BTRFS warning (device loop2): failed to read root (objectid=9): -5
BTRFS error (device loop2): open_ctree failed


---
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.

syzbot

unread,
Sep 20, 2020, 5:23:21 PM9/20/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=164562c3900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1609f8ad900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14c1d2c3900000

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

audit: type=1400 audit(1600636846.449:8): avc: denied { execmem } for pid=6483 comm="syz-executor467" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
================================================================================
UBSAN: Undefined behaviour in net/sunrpc/xprt.c:568:22
shift exponent 536871552 is too large for 64-bit type 'long unsigned int'
CPU: 1 PID: 6483 Comm: syz-executor467 Not tainted 4.19.146-syzkaller #0
RIP: 0033:0x4403d9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffd6574338 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00000000004403d9
RDX: 0000000020000200 RSI: 00000000200001c0 RDI: 0000000000000000
RBP: 00000000006ca018 R08: 0000000020000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401be0
R13: 0000000000401c70 R14: 0000000000000000 R15: 0000000000000000
================================================================================

Reply all
Reply to author
Forward
0 new messages