syzbot


UBSAN: shift-out-of-bounds in xfrm_get_default
Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+b2be9dd8ca6f6c73ee2d@syzkaller.appspotmail.com
Fix commit: 3c10ffddc61f net: xfrm: fix shift-out-of-bounds in xfrm_get_default
First crash: 268d, last: 228d

Cause bisection: introduced by (bisect log) :
commit 2d151d39073aff498358543801fca0f670fea981
Author: Steffen Klassert <steffen.klassert@secunet.com>
Date: Sun Jul 18 07:11:06 2021 +0000

  xfrm: Add possibility to set the default to block if we have no policy

Crash: UBSAN: shift-out-of-bounds in xfrm_get_default (log)
Repro: C syz .config
Patch testing requests:
Created Duration User Patch Repo Result
2021/09/01 20:21 16m paskripkin@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master OK
2021/09/01 18:57 8m paskripkin@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master error

Sample crash report:
netlink: 172 bytes leftover after parsing attributes in process `syz-executor354'.
================================================================================
UBSAN: shift-out-of-bounds in net/xfrm/xfrm_user.c:2010:49
shift exponent 224 is too large for 32-bit type 'int'
CPU: 1 PID: 8447 Comm: syz-executor354 Not tainted 5.14.0-rc7-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+0xcd/0x134 lib/dump_stack.c:105
 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:327
 xfrm_get_default.cold+0x1f/0x75 net/xfrm/xfrm_user.c:2010
 xfrm_user_rcv_msg+0x430/0xa20 net/xfrm/xfrm_user.c:2869
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504
 xfrm_netlink_rcv+0x6b/0x90 net/xfrm/xfrm_user.c:2891
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1929
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:724
 sock_no_sendpage+0xf3/0x130 net/core/sock.c:2980
 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3496
 kernel_sendpage net/socket.c:3493 [inline]
 sock_sendpage+0xe5/0x140 net/socket.c:1003
 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364
 splice_from_pipe_feed fs/splice.c:418 [inline]
 __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562
 splice_from_pipe fs/splice.c:597 [inline]
 generic_splice_sendpage+0xd4/0x140 fs/splice.c:746
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x110/0x180 fs/splice.c:936
 splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
 do_splice_direct+0x1b3/0x280 fs/splice.c:979
 do_sendfile+0x9f0/0x1120 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1311
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43f019
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd24165888 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f019
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000005
RBP: 0000000000403000 R08: 0000000000400488 R09: 0000000000400488
R10: 0000000100000002 R11: 0000000000000246 R12: 0000000000403090
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
================================================================================

Crashes (104):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-kasan-gce 2021/08/29 19:02 net-next eaf2aaec0be4 be2c130d .config log report syz C UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-kasan-gce-selinux-root 2021/10/06 18:27 upstream 60a9483534ed 0a63fd36 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-kasan-gce 2021/10/03 18:49 upstream 7b66f4393ad4 db0f5787 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-kasan-gce 2021/09/28 08:23 upstream 0513e464f900 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-kasan-gce 2021/09/27 20:02 upstream 5816b3e6577e 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-kasan-gce-smack-root 2021/09/14 12:47 upstream d0ee23f9d78b 58d09404 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-kasan-gce-root 2021/09/08 15:43 upstream ac08b1c68d1b e2776ee4 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-kasan-gce-386 2021/09/28 11:27 upstream 0513e464f900 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/10/06 18:15 net 7707a4d01a64 0a63fd36 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/10/05 22:52 net a56d447f196f 0a63fd36 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/10/03 10:23 net 7cd8b1542a7b db0f5787 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/10/01 14:43 net ca6e11c337da 1d849ab4 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/27 22:52 net 763716a55cb1 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/27 07:36 net b193e15ac69d 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/26 19:46 net b193e15ac69d 8cac236e .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/26 14:28 net b193e15ac69d 8cac236e .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/26 09:26 net 7fe7f3182a0d 8cac236e .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/26 06:12 net 7fe7f3182a0d 8cac236e .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/19 08:38 net 02319bf15acf 70b76c1d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/18 23:11 net 02319bf15acf 70b76c1d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/16 15:56 net 98dc68f8b0c2 aae492f2 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/16 10:38 net a57d8c217aad 07e953c1 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/16 05:44 net a57d8c217aad 07e953c1 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-this-kasan-gce 2021/09/12 02:13 net 08dad2f4d541 5ae8508a .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/10/08 05:52 net-next 44cc24b04bed efe0f24d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/10/05 00:41 net-next 9ac936276f86 ce697b49 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/10/04 03:20 net-next 0693b27644f0 db0f5787 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/10/03 17:01 net-next 0693b27644f0 db0f5787 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/28 05:13 net-next b69c99463d41 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/27 17:12 net-next b69c99463d41 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/27 04:00 net-next d59bdda85eb7 78494d16 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/26 08:20 net-next 24aa160d5375 8cac236e .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/26 05:01 net-next 24aa160d5375 8cac236e .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/24 08:17 net-next 2fcd14d0f780 8cac236e .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/19 23:08 net-next 9eb7b5e7cb50 70b76c1d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/19 07:37 net-next 983e59a27b92 70b76c1d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/18 17:33 net-next 0efcc3f20145 70b76c1d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/18 07:00 net-next 5ef8a0291513 70b76c1d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/18 02:27 net-next 5ef8a0291513 70b76c1d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/17 00:58 net-next 52583c8d8b12 aae492f2 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/16 22:29 net-next 52583c8d8b12 aae492f2 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/16 18:41 net-next 52583c8d8b12 aae492f2 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/16 12:07 net-next 5706383b30cf 07e953c1 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/16 01:58 net-next 5706383b30cf 07e953c1 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/12 14:40 net-next 626bf91a292e 5ae8508a .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/12 13:09 net-next 626bf91a292e 5ae8508a .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/12 05:17 net-next 626bf91a292e 5ae8508a .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/11 05:51 net-next 626bf91a292e 5ae8508a .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/10 05:46 net-next 626bf91a292e e2776ee4 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/09/09 22:23 net-next 626bf91a292e e2776ee4 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-net-kasan-gce 2021/08/29 18:39 net-next eaf2aaec0be4 be2c130d .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default
ci-upstream-linux-next-kasan-gce-root 2021/09/08 16:16 linux-next 999569d59a0a e2776ee4 .config log report info UBSAN: shift-out-of-bounds in xfrm_get_default