syzbot


UBSAN: shift-out-of-bounds in xfrm_set_default

Status: fixed on 2021/11/10 00:50
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+9cd5837a045bbee5b810@syzkaller.appspotmail.com
Fix commit: 5d8dbb7fb82b net: xfrm: fix shift-out-of-bounce
First crash: 1001d, last: 986d
Cause bisection: introduced by (bisect log) [merge commit]:
commit f6eb80edb03ef56218e58cf7baa76b37d73c8747
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu Jul 22 23:51:32 2021 +0000

  Merge remote-tracking branch 'asm-generic/master'

Crash: BUG: sleeping function called from invalid context in lock_sock_nested (log)
Repro: C syz .config
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH 3/3] net: xfrm: fix shift-out-of-bounce 1 (1) 2021/08/27 07:50
[PATCH next] net: xfrm: fix shift-out-of-bounce 2 (2) 2021/08/02 05:51
Re: [PATCH] net: xfrm: fix shift-out-of-bounce 2 (3) 2021/07/28 00:13
[syzbot] UBSAN: shift-out-of-bounds in xfrm_set_default 1 (3) 2021/07/27 23:28
Re: [PATCH] net: xfrm: fix shift-out-of-bounce 1 (1) 2021/07/27 17:46
Last patch testing requests (2)
Created Duration User Patch Repo Result
2021/07/27 17:30 16m paskripkin@gmail.com patch linux-next OK
2021/07/27 14:43 7m paskripkin@gmail.com patch linux-next error OK

Sample crash report:
netlink: 228 bytes leftover after parsing attributes in process `syz-executor669'.
================================================================================
UBSAN: shift-out-of-bounds in net/xfrm/xfrm_user.c:1969:18
shift exponent 255 is too large for 32-bit type 'int'
CPU: 0 PID: 8437 Comm: syz-executor669 Not tainted 5.14.0-rc2-next-20210723-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_set_default.cold+0x21/0x102 net/xfrm/xfrm_user.c:1969
 xfrm_user_rcv_msg+0x430/0xa20 net/xfrm/xfrm_user.c:2864
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504
 xfrm_netlink_rcv+0x6b/0x90 net/xfrm/xfrm_user.c:2886
 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:703 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:723
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2392
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2446
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2475
 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:0x43f0d9
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:00007ffc71f859f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f0d9
RDX: 0000000000000000 RSI: 0000000020000740 RDI: 0000000000000003
RBP: 00000000004030c0 R08: 0000000000000000 R09: 0000000000400488
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000403150
R13: 0000000000000000 R14: 00000000004ad018 R15: 0000000000400488
================================================================================

Crashes (79):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/23 12:49 linux-next 90d856e71443 bc5f1d88 .config console log report syz C ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/06 21:43 linux-next 8d4b477da1a8 f9e341e3 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/06 20:00 linux-next 8d4b477da1a8 f9e341e3 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/06 17:43 linux-next 8d4b477da1a8 f9e341e3 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/06 05:24 linux-next 8d4b477da1a8 d2d6e680 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/05 15:41 linux-next 8d4b477da1a8 7f7bb950 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/05 13:07 linux-next 8d4b477da1a8 7f7bb950 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/05 01:42 linux-next 8d4b477da1a8 b97d64c9 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/04 07:37 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/04 04:12 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/03 14:17 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/03 09:30 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/03 02:58 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/03 00:14 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/02 22:39 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/02 13:43 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/02 05:28 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/02 03:47 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/01 16:45 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/01 15:05 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/01 12:57 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/01 10:03 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/01 05:58 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/08/01 00:25 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 21:57 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 20:34 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 17:13 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 16:52 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 10:35 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 10:30 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 10:12 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/31 04:42 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/30 23:05 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/30 11:46 linux-next 4ccc9e2db7ac c585c7b0 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/30 09:00 linux-next 4ccc9e2db7ac c585c7b0 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/29 21:28 linux-next 4ccc9e2db7ac b44001ce .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/29 21:27 linux-next 4ccc9e2db7ac b44001ce .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/29 21:27 linux-next 4ccc9e2db7ac b44001ce .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/29 00:55 linux-next 42d0b5f52c9b 9a4781d4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/29 00:19 linux-next 42d0b5f52c9b 9a4781d4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/27 16:23 linux-next 2265c5286967 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/27 12:44 linux-next 2265c5286967 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/27 08:21 linux-next 2265c5286967 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/27 02:20 linux-next 2265c5286967 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/27 02:19 linux-next 2265c5286967 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/27 01:55 linux-next 2265c5286967 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/26 19:50 linux-next 90d856e71443 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/26 18:27 linux-next 90d856e71443 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/26 13:33 linux-next 90d856e71443 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/26 10:34 linux-next 90d856e71443 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/26 09:58 linux-next 90d856e71443 fd511809 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/25 05:45 linux-next 90d856e71443 4d1b57d4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/25 05:45 linux-next 90d856e71443 4d1b57d4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/25 05:44 linux-next 90d856e71443 4d1b57d4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/24 20:35 linux-next 90d856e71443 4d1b57d4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/24 20:35 linux-next 90d856e71443 4d1b57d4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/24 07:55 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/24 05:12 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/24 01:13 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/24 01:12 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/24 00:53 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/23 22:07 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/23 19:23 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/23 14:52 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
2021/07/23 12:36 linux-next 90d856e71443 bc5f1d88 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in xfrm_set_default
* Struck through repros no longer work on HEAD.