syzbot
general protection fault in __smc_diag_dump (2)
Status: fixed on 2024/10/22 11:57
Subsystems:
smc
[Documentation on labels]
Fix commit:
98d4435efcbf
net/smc: prevent NULL pointer dereference in txopt_get
First crash: 698d, last: 644d
Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000002c03: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: probably user-memory-access in range [0x0000000000016018-0x000000000001601f]
CPU: 0 UID: 0 PID: 6229 Comm: syz.3.175 Not tainted 6.12.0-rc4-syzkaller-00047-gc2ee9f594da8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:smc_diag_msg_common_fill net/smc/smc_diag.c:44 [inline]
RIP: 0010:__smc_diag_dump.constprop.0+0x3e2/0x2500 net/smc/smc_diag.c:89
Code: 4c 8b b3 58 05 00 00 4d 85 f6 0f 84 f6 02 00 00 e8 63 55 d2 f6 49 8d 7e 18 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 86 1c 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffffc9000352f160 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff888062385c00 RCX: ffffffff88fe4534
RDX: 0000000000002c03 RSI: ffffffff8aba62ed RDI: 0000000000016018
RBP: ffff8880799975e0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: 00000000000a2001 R12: 0000000000000000
R13: ffff88802f6a8000 R14: 0000000000016000 R15: 0000000000000002
FS: 00007fe5f634b6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1d8a2ec000 CR3: 000000005357e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
smc_diag_dump_proto+0x26d/0x420 net/smc/smc_diag.c:217
smc_diag_dump+0x27/0x90 net/smc/smc_diag.c:234
netlink_dump+0x552/0xcc0 net/netlink/af_netlink.c:2326
__netlink_dump_start+0x6d9/0x980 net/netlink/af_netlink.c:2441
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+0x437/0x790 net/core/sock_diag.c:287
netlink_rcv_skb+0x165/0x410 net/netlink/af_netlink.c:2551
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:729 [inline]
__sock_sendmsg net/socket.c:744 [inline]
____sys_sendmsg+0x9ae/0xb40 net/socket.c:2607
___sys_sendmsg+0x135/0x1e0 net/socket.c:2661
__sys_sendmsg+0x117/0x1f0 net/socket.c:2690
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:0x7fe5f557dff9
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:00007fe5f634b038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fe5f5735f80 RCX: 00007fe5f557dff9
RDX: 000000000400c000 RSI: 0000000020000140 RDI: 0000000000000048
RBP: 00007fe5f55f0296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe5f5735f80 R15: 00007ffda7682888
</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+0x3e2/0x2500 net/smc/smc_diag.c:89
Code: 4c 8b b3 58 05 00 00 4d 85 f6 0f 84 f6 02 00 00 e8 63 55 d2 f6 49 8d 7e 18 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 86 1c 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffffc9000352f160 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff888062385c00 RCX: ffffffff88fe4534
RDX: 0000000000002c03 RSI: ffffffff8aba62ed RDI: 0000000000016018
RBP: ffff8880799975e0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: 00000000000a2001 R12: 0000000000000000
R13: ffff88802f6a8000 R14: 0000000000016000 R15: 0000000000000002
FS: 00007fe5f634b6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1d8a2ec000 CR3: 000000005357e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 4c 8b b3 58 05 00 00 mov 0x558(%rbx),%r14
7: 4d 85 f6 test %r14,%r14
a: 0f 84 f6 02 00 00 je 0x306
10: e8 63 55 d2 f6 call 0xf6d25578
15: 49 8d 7e 18 lea 0x18(%r14),%rdi
19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
20: fc ff df
23: 48 89 fa mov %rdi,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 0f 85 86 1c 00 00 jne 0x1cba
34: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
3b: fc ff df
3e: 4d rex.WRB
3f: 8b .byte 0x8b
* Struck through repros no longer work on HEAD.