syzbot


general protection fault in selinux_socket_sendmsg

Status: fixed on 2021/04/25 07:03
Reported-by: syzbot+f728811dddf8a78ac760@syzkaller.appspotmail.com
Fix commit: 534d2cf487b9 usbip: synchronize event handler with sysfs code paths
First crash: 1509d, last: 1337d
Fix bisection: fixed by (bisect log) :
commit 534d2cf487b972b2c039bfc55898a7edc2b0ea45
Author: Shuah Khan <skhan@linuxfoundation.org>
Date: Tue Mar 30 01:36:51 2021 +0000

  usbip: synchronize event handler with sysfs code paths

  
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in selinux_socket_sendmsg selinux 5 1881d 1918d 0/28 closed as dup on 2019/08/22 13:35
linux-4.19 general protection fault in selinux_socket_sendmsg C done 36 1730d 1911d 1/1 fixed on 2020/03/27 08:38
upstream general protection fault in selinux_socket_sendmsg (2) selinux C 183 1351d 1822d 0/28 closed as dup on 2019/11/25 22:04
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2021/04/24 04:34 4h12m bisect fix linux-4.14.y OK (1) job log
2021/03/25 04:05 29m bisect fix linux-4.14.y OK (0) job log log
2021/02/23 02:48 30m bisect fix linux-4.14.y OK (0) job log log
2021/02/19 01:22 18m bisect fix linux-4.14.y error job log
2021/02/16 16:39 0m bisect fix linux-4.14.y error job log
2021/01/17 16:07 31m bisect fix linux-4.14.y OK (0) job log log
2020/12/18 15:34 32m bisect fix linux-4.14.y OK (0) job log log
2020/11/18 15:02 31m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
vhci_hcd: vhci_device speed not set
vhci_hcd: stop threads
vhci_hcd vhci_hcd.0: pdev(3) rhport(1) sockfd(3)
general protection fault: 0000 [#1] PREEMPT SMP KASAN
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
Modules linked in:
usb 15-1: new full-speed USB device number 2 using vhci_hcd
CPU: 0 PID: 7780 Comm: vhci_tx Not tainted 4.14.198-syzkaller #0
vhci_hcd: sendmsg failed!, ret=-32 for 48
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a4e48440 task.stack: ffff888088df8000
RIP: 0010:selinux_socket_sendmsg+0x70/0x260 security/selinux/hooks.c:4628
RSP: 0018:ffff888088dffae8 EFLAGS: 00010202
vhci_hcd vhci_hcd.0: pdev(5) rhport(0) sockfd(3)
RAX: 0000000000000004 RBX: 1ffff110111bff5d RCX: 0000000000000001
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
RDX: 0000000000000000 RSI: ffff888088dffd80 RDI: 0000000000000020
vhci_hcd vhci_hcd.0: port 1 already used
RBP: 0000000000000000 R08: 0000000000000030 R09: ffffed10111bffab
R10: ffff888088dffd5f R11: 0000000000058071 R12: dffffc0000000000
R13: 0000000000000000 R14: ffff888088dffd80 R15: 0000000000000030
FS:  0000000000000000(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004d4310 CR3: 000000008ea88000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
vhci_hcd: cannot find a urb of seqnum 0 max seqnum 1
 security_socket_sendmsg+0x76/0xb0 security/security.c:1378
 sock_sendmsg+0x3f/0x100 net/socket.c:653
vhci_hcd vhci_hcd.0: port 0 already used
 vhci_send_cmd_submit+0x510/0xdd0 drivers/usb/usbip/vhci_tx.c:153
vhci_hcd vhci_hcd.0: pdev(5) rhport(1) sockfd(3)
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
usb 13-1: new full-speed USB device number 2 using vhci_hcd
vhci_hcd: sendmsg failed!, ret=-32 for 48
 vhci_tx_loop+0x9d/0x260 drivers/usb/usbip/vhci_tx.c:257
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Code: c7 00 f1 f1 f1 f1 c7 40 08 f2 f2 f2 f2 c7 40 10 00 00 00 f3 c7 40 14 f3 f3 f3 f3 e8 fb 1e 91 fe 48 8d 7d 20 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 b9 01 00 00 48 
vhci_hcd: connection closed
b8 00 00 00 00 00 fc ff df 
RIP: selinux_socket_sendmsg+0x70/0x260 security/selinux/hooks.c:4628 RSP: ffff888088dffae8
ieee80211 phy13: Selected rate control algorithm 'minstrel_ht'
vhci_hcd vhci_hcd.0: port 0 already used
wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd: release socket
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy13: hwaddr 02:00:00:00:0d:00 registered
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd: disconnect device
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd: cannot find a urb of seqnum 0 max seqnum 1
vhci_hcd: cannot find a urb of seqnum 0 max seqnum 1
ieee80211 phy13: mac80211_hwsim_start
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy12: mac80211_hwsim_config (freq=2412(2412 - 0)/noht idle=0 ps=0 smps=static)
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd: stop threads
vhci_hcd: release socket
vhci_hcd: disconnect device
vhci_hcd: stop threads
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3)
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy13: mac80211_hwsim_add_interface (type=1 mac_addr=02:00:00:00:0d:00)
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd: release socket
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy12: mac80211_hwsim_config (freq=2412(2412 - 0)/noht idle=0 ps=0 smps=static)
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy13: mac80211_hwsim_bss_info_changed(changed=0xe vif->addr=02:00:00:00:0d:00)
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd: disconnect device
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy13:   ERP_CTS_PROT: 0
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy13:   ERP_PREAMBLE: 0
vhci_hcd: stop threads
vhci_hcd: release socket
ieee80211 phy12: mac80211_hwsim_bss_info_changed(changed=0x40000 vif->addr=02:00:00:00:0c:00)
vhci_hcd: disconnect device
ieee80211 phy13:   ERP_SLOT: 0
ieee80211 phy13: mac80211_hwsim_conf_tx (queue=0 txop=47 cw_min=3 cw_max=7 aifs=2)
ieee80211 phy12:   TX Power: 20 dBm
ieee80211 phy13: mac80211_hwsim_conf_tx (queue=1 txop=94 cw_min=7 cw_max=15 aifs=2)
vhci_hcd: connection closed
vhci_hcd vhci_hcd.0: pdev(0) rhport(1) sockfd(3)
vhci_hcd vhci_hcd.0: pdev(3) rhport(0) sockfd(3)
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
vhci_hcd: stop threads
ieee80211 phy12: mac80211_hwsim_bss_info_changed(changed=0x4000 vif->addr=02:00:00:00:0c:00)
vhci_hcd vhci_hcd.0: pdev(2) rhport(0) sockfd(3)
vhci_hcd: release socket
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy13: mac80211_hwsim_conf_tx (queue=2 txop=0 cw_min=15 cw_max=1023 aifs=3)
ieee80211 phy12: mac80211_hwsim_conf_tx (queue=0 txop=0 cw_min=15 cw_max=1023 aifs=2)
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd: cannot find a urb of seqnum 0 max seqnum 1
vhci_hcd: disconnect device
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy12: mac80211_hwsim_conf_tx (queue=1 txop=0 cw_min=15 cw_max=1023 aifs=2)
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd: stop threads
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy13: mac80211_hwsim_conf_tx (queue=3 txop=0 cw_min=15 cw_max=1023 aifs=7)
vhci_hcd: connection closed
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd vhci_hcd.0: pdev(2) rhport(1) sockfd(3)
vhci_hcd: release socket
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
vhci_hcd: connection closed
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy12: mac80211_hwsim_conf_tx (queue=2 txop=0 cw_min=15 cw_max=1023 aifs=2)
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy13: mac80211_hwsim_bss_info_changed(changed=0x2000 vif->addr=02:00:00:00:0d:00)
vhci_hcd: connection closed
vhci_hcd: disconnect device
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy12: mac80211_hwsim_conf_tx (queue=3 txop=0 cw_min=15 cw_max=1023 aifs=2)
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd: stop threads
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy13: mac80211_hwsim_config (freq=2412(2412 - 0)/noht idle=1 ps=0 smps=static)
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd: release socket
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd: disconnect device
ieee80211 phy13: mac80211_hwsim_configure_filter
vhci_hcd vhci_hcd.0: port 1 already used
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy13: mac80211_hwsim_configure_filter
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy12: mac80211_hwsim_bss_info_changed(changed=0x2000 vif->addr=02:00:00:00:0c:00)
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy13: mac80211_hwsim_bss_info_changed(changed=0x10 vif->addr=02:00:00:00:0d:00)
vhci_hcd: stop threads
vhci_hcd vhci_hcd.0: pdev(1) rhport(0) sockfd(3)
vhci_hcd: release socket
vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed)
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy12: mac80211_hwsim_bss_info_changed(changed=0x8bfe vif->addr=02:00:00:00:0c:00)
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy13:   HT: op_mode=0xb
vhci_hcd vhci_hcd.0: port 0 already used
vhci_hcd: disconnect device
ieee80211 phy12: mac80211_hwsim_bss_info_changed: BSSID changed: 50:50:50:50:50:50
vhci_hcd vhci_hcd.0: port 1 already used
ieee80211 phy12:   BCN EN: 1 (BI=100)
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
---[ end trace 688efbbb0732312e ]---
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
vhci_hcd: stop threads
vhci_hcd: connection closed
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd: release socket
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: port 1 already used
vhci_hcd vhci_hcd.0: port 0 already used
ieee80211 phy12:   ERP_CTS_PROT: 0
vhci_hcd: disconnect device
ieee80211 phy13: mac80211_hwsim_config (freq=2412(2412 - 0)/noht idle=0 ps=0 smps=static)

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/03 19:15 linux-4.14.y cbfa1702aaf6 1a3f9408 .config console log report syz C ci2-linux-4-14
2020/10/19 15:02 linux-4.14.y cbfa1702aaf6 ff4a3345 .config console log report info ci2-linux-4-14
2020/10/09 17:16 linux-4.14.y cbfa1702aaf6 fa79ed2a .config console log report info ci2-linux-4-14
* Struck through repros no longer work on HEAD.