syzbot


UBSAN: shift-out-of-bounds in xprt_calc_majortimeo

Status: fixed on 2021/11/10 00:50
Subsystems: net nfs
[Documentation on labels]
Reported-by: syzbot+ba2e91df8f74809417fa@syzkaller.appspotmail.com
Fix commit: c09f11ef3595 NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds
First crash: 1444d, last: 1308d
Cause bisection: introduced by (bisect log) [merge commit]:
commit 1609d7604b847a9820e63393d1a3b6cac7286d40
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sat Sep 14 23:07:40 2019 +0000

  Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Crash: general protection fault in batadv_iv_ogm_queue_add (log)
Repro: C syz .config
  
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
UBSAN: shift-out-of-bounds in xprt_do_reserve net nfs C 42 1308d 1380d 28/28 closed as dup on 2021/02/11 00:52
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 5.10 000/299] 5.10.36-rc1 review 323 (323) 2021/05/28 16:59
[PATCH 5.11 000/342] 5.11.20-rc1 review 354 (354) 2021/05/12 06:38
[PATCH 5.12 000/384] 5.12.3-rc1 review 395 (395) 2021/05/11 21:07
[PATCH] net: sunrpc: xprt.c: fix shift-out-of-bounds in xprt_calc_majortimeo 2 (2) 2021/04/19 16:58
[PATCH] NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds 3 (3) 2021/03/16 23:19
[PATCH] SUNRPC: xprt: prevent shift-out-of-bounds 1 (1) 2020/12/22 01:29
UBSAN: shift-out-of-bounds in xprt_calc_majortimeo 0 (1) 2020/12/15 15:03
Last patch testing requests (6)
Created Duration User Patch Repo Result
2021/04/17 14:19 17m fuzzybritches0@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d434405aaab7 report log
2021/04/16 22:28 0m fuzzybritches@protonmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d434405aaab7 error
2021/04/16 19:49 0m fuzzybritches@protonmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 20f1b5f9c07c error
2021/04/16 19:33 0m fuzzybritches@protonmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d434405aaab7 error
2021/04/16 19:20 0m fuzzybritches@protonmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d434405aaab7 error
2021/01/08 14:11 9m anant.thazhemadam@gmail.com upstream report log

Sample crash report:
================================================================================
UBSAN: shift-out-of-bounds in net/sunrpc/xprt.c:658:14
shift exponent 536871232 is too large for 64-bit type 'long unsigned int'
CPU: 1 PID: 8494 Comm: syz-executor211 Not tainted 5.10.0-rc7-next-20201210-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+0x107/0x163 lib/dump_stack.c:120
 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395
 xprt_calc_majortimeo.isra.0.cold+0x17/0x46 net/sunrpc/xprt.c:658
 xprt_init_majortimeo net/sunrpc/xprt.c:686 [inline]
 xprt_request_init+0x486/0x9e0 net/sunrpc/xprt.c:1805
 xprt_do_reserve net/sunrpc/xprt.c:1815 [inline]
 xprt_reserve+0x18f/0x280 net/sunrpc/xprt.c:1836
 __rpc_execute+0x21d/0x1360 net/sunrpc/sched.c:891
 rpc_execute+0x230/0x350 net/sunrpc/sched.c:967
 rpc_run_task+0x5d0/0x8f0 net/sunrpc/clnt.c:1140
 rpc_call_sync+0xc6/0x1a0 net/sunrpc/clnt.c:1169
 rpc_ping net/sunrpc/clnt.c:2682 [inline]
 rpc_create_xprt+0x3f1/0x4a0 net/sunrpc/clnt.c:477
 rpc_create+0x354/0x670 net/sunrpc/clnt.c:593
 nfs_create_rpc_client+0x4eb/0x680 fs/nfs/client.c:536
 nfs_init_client fs/nfs/client.c:653 [inline]
 nfs_init_client+0x6d/0x100 fs/nfs/client.c:640
 nfs_get_client+0xcd7/0x1020 fs/nfs/client.c:430
 nfs_init_server.isra.0+0x2c0/0xed0 fs/nfs/client.c:692
 nfs_create_server+0x18f/0x650 fs/nfs/client.c:996
 nfs_try_get_tree+0x181/0x9f0 fs/nfs/super.c:939
 nfs_get_tree+0xaa1/0x1520 fs/nfs/fs_context.c:1350
 vfs_get_tree+0x89/0x2f0 fs/super.c:1496
 do_new_mount fs/namespace.c:2896 [inline]
 path_mount+0x12ae/0x1e70 fs/namespace.c:3227
 do_mount fs/namespace.c:3240 [inline]
 __do_sys_mount fs/namespace.c:3448 [inline]
 __se_sys_mount fs/namespace.c:3425 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3425
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x440419
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:00007ffe282dde28 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000440419
RDX: 0000000020fb5ffc RSI: 0000000020343ff8 RDI: 0000000020000100
RBP: 00000000006ca018 R08: 000000002000a000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401c20
R13: 0000000000401cb0 R14: 0000000000000000 R15: 0000000000000000
================================================================================

Crashes (149):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/11 22:10 linux-next 14240d4c5b25 ba24ffcd .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2021/04/23 06:05 upstream 90c911ad7445 590921a5 .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/22 18:44 upstream 16fc44d6387e 33c28d03 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/22 17:18 upstream 16fc44d6387e 33c28d03 .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/22 14:56 upstream 16fc44d6387e 33c28d03 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/22 06:26 upstream 16fc44d6387e 2bc8999a .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/21 05:54 upstream 1fe5501ba1ab c0ced557 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/18 17:37 upstream c98ff1d013d2 7e2b734b .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/17 12:15 upstream 9cdbf6467424 7e2b734b .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/17 12:15 upstream 9cdbf6467424 7e2b734b .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/16 09:03 upstream 7e25f40eab52 c59079a6 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/14 20:17 upstream 50987beca096 3134b37f .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/12 22:19 upstream d434405aaab7 bfeda1b1 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/12 06:44 upstream 7d900724913c bfeda1b1 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/11 17:20 upstream 52e44129fba5 bfeda1b1 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/10 16:39 upstream d4961772226d bfeda1b1 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/06 02:18 upstream 0a50438c8436 6a81331a .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/05 23:52 upstream 0a50438c8436 6a81331a .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/03 22:14 upstream 57fbdb15ec42 6a81331a .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/03 20:54 upstream 57fbdb15ec42 6a81331a .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/28 08:38 upstream 0f4498cef9f5 a8529b82 .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/27 06:46 upstream db24726bfefa a8529b82 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/27 02:42 upstream db24726bfefa a8529b82 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/27 01:39 upstream db24726bfefa a8529b82 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/23 22:32 upstream 7acac4b3196c e613994b .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/21 14:34 upstream 812da4d39463 17810eae .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/12 19:35 upstream f78d76e72a46 429d8a6b .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/12 19:25 upstream f78d76e72a46 429d8a6b .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/12 13:30 upstream 28806e4d9b97 429d8a6b .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/11 13:34 upstream a74e6a014c9d c2ca1f2a .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/09 14:51 upstream 280d542f6ffa 09fbf400 .config console log report info ci-qemu-upstream UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/09 00:40 upstream 280d542f6ffa 09fbf400 .config console log report info ci-qemu-upstream UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/03 12:51 upstream f69d02e37a85 e5b64d68 .config console log report info ci-qemu-upstream UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/03 11:11 upstream f69d02e37a85 e5b64d68 .config console log report info ci-qemu-upstream UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/01 03:54 upstream cd278456d4ca 4c37c133 .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/02/27 12:15 upstream 3fb6d0e00efc 4c37c133 .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/02/27 09:42 upstream 3fb6d0e00efc 4c37c133 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/02/26 04:39 upstream 29c395c77a9a 76f7fc95 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/02/26 00:40 upstream 29c395c77a9a 76f7fc95 .config console log report info ci-qemu-upstream UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/09 11:45 upstream 280d542f6ffa 09fbf400 .config console log report info ci-qemu-upstream-386 UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/02/26 00:39 upstream 29c395c77a9a 76f7fc95 .config console log report info ci-qemu-upstream-386 UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/17 08:25 linux-next 1216f02e46a4 7e2b734b .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/10 16:39 linux-next e99d8a849517 bfeda1b1 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/05 03:18 linux-next 454c576c3f5e 6a81331a .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/04 12:24 linux-next 454c576c3f5e 6a81331a .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/04 05:03 linux-next 454c576c3f5e 6a81331a .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/04/02 13:14 linux-next 454c576c3f5e 6a81331a .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/31 21:54 linux-next 931294922e65 6a81331a .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/28 16:21 linux-next 931294922e65 a8529b82 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/28 08:33 linux-next 931294922e65 a8529b82 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/24 00:38 linux-next d949689e7383 e613994b .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/03/08 18:37 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/02/28 08:47 linux-next d01f2f7e3557 4c37c133 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/02/27 06:21 linux-next d01f2f7e3557 4c37c133 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xprt_calc_majortimeo
2021/01/16 23:44 upstream 1d94330a437a 65a7a854 .config console log report info ci-upstream-kasan-gce-selinux-root
2020/12/07 13:18 linux-next 15ac8fdb7440 1190297f .config console log report info ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.