syzbot


general protection fault in __smc_diag_dump (2)

Status: internal: reported on 2024/08/29 04:35
Subsystems: net s390
[Documentation on labels]
Fix commit: 98d4435efcbf net/smc: prevent NULL pointer dereference in txopt_get
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu-native-arm64-kvm ci-qemu2-riscv64 ci-upstream-bpf-next-kasan-gce]
First crash: 18d, last: 18d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in __smc_diag_dump syz done 309 2070d 2084d 12/28 fixed on 2019/07/10 21:40
linux-4.14 general protection fault in __smc_diag_dump syz error 39 688d 1910d 0/1 upstream: reported syz repro on 2019/06/25 06:51

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 1 UID: 0 PID: 6234 Comm: syz.4.223 Not tainted 6.11.0-rc5-syzkaller-00079-g928f79a188aa #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:smc_diag_msg_common_fill net/smc/smc_diag.c:44 [inline]
RIP: 0010:__smc_diag_dump.constprop.0+0x401/0x23d0 net/smc/smc_diag.c:89
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f1 1d 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 76 18 49 8d 7e 0e 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 8a
RSP: 0018:ffffc9000487ef28 EFLAGS: 00010213
RAX: dffffc0000000000 RBX: ffff888041750000 RCX: ffffc9000a28e000
RDX: 0000000000000001 RSI: ffffffff8ab8e0e9 RDI: 000000000000000e
RBP: ffff88807d5d8000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: ffffffff93d26280 R12: ffff8880605d5590
R13: 0000000000000000 R14: 0000000000000000 R15: ffff888041750500
FS:  00007f7a39bff6c0(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffef0506f78 CR3: 000000005db74000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 smc_diag_dump_proto+0x26d/0x420 net/smc/smc_diag.c:217
 smc_diag_dump+0x84/0x90 net/smc/smc_diag.c:236
 netlink_dump+0x555/0xcc0 net/netlink/af_netlink.c:2325
 __netlink_dump_start+0x6ca/0x970 net/netlink/af_netlink.c:2440
 netlink_dump_start include/linux/netlink.h:339 [inline]
 smc_diag_handler_dump+0x1fb/0x240 net/smc/smc_diag.c:251
 __sock_diag_cmd net/core/sock_diag.c:249 [inline]
 sock_diag_rcv_msg+0x43a/0x790 net/core/sock_diag.c:287
 netlink_rcv_skb+0x16e/0x440 net/netlink/af_netlink.c:2550
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0x53f/0x7f0 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 sock_sendmsg+0x3ce/0x470 net/socket.c:768
 splice_to_socket+0xab2/0x1040 fs/splice.c:889
 do_splice_from fs/splice.c:941 [inline]
 do_splice+0x148f/0x1f90 fs/splice.c:1354
 __do_splice+0x327/0x360 fs/splice.c:1436
 __do_sys_splice fs/splice.c:1652 [inline]
 __se_sys_splice fs/splice.c:1634 [inline]
 __x64_sys_splice+0x1d2/0x260 fs/splice.c:1634
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7a38d79ef9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7a39bff038 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f7a38f16058 RCX: 00007f7a38d79ef9
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007f7a38de793e R08: 0000000080000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f7a38f16058 R15: 00007fff71e33248
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:smc_diag_msg_common_fill net/smc/smc_diag.c:44 [inline]
RIP: 0010:__smc_diag_dump.constprop.0+0x401/0x23d0 net/smc/smc_diag.c:89
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f1 1d 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 76 18 49 8d 7e 0e 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 8a
RSP: 0018:ffffc9000487ef28 EFLAGS: 00010213
RAX: dffffc0000000000 RBX: ffff888041750000 RCX: ffffc9000a28e000
RDX: 0000000000000001 RSI: ffffffff8ab8e0e9 RDI: 000000000000000e
RBP: ffff88807d5d8000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: ffffffff93d26280 R12: ffff8880605d5590
R13: 0000000000000000 R14: 0000000000000000 R15: ffff888041750500
FS:  00007f7a39bff6c0(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffef0506f78 CR3: 000000005db74000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	48 89 fa             	mov    %rdi,%rdx
   3:	48 c1 ea 03          	shr    $0x3,%rdx
   7:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   b:	0f 85 f1 1d 00 00    	jne    0x1e02
  11:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  18:	fc ff df
  1b:	4d 8b 76 18          	mov    0x18(%r14),%r14
  1f:	49 8d 7e 0e          	lea    0xe(%r14),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx <-- trapping instruction
  2e:	48 89 f8             	mov    %rdi,%rax
  31:	83 e0 07             	and    $0x7,%eax
  34:	83 c0 01             	add    $0x1,%eax
  37:	38 d0                	cmp    %dl,%al
  39:	7c 08                	jl     0x43
  3b:	84 d2                	test   %dl,%dl
  3d:	0f                   	.byte 0xf
  3e:	85                   	.byte 0x85
  3f:	8a                   	.byte 0x8a

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/29 04:34 upstream 928f79a188aa ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in __smc_diag_dump
* Struck through repros no longer work on HEAD.