Raphiiko / OyasumiVR

🥽 VR Sleeping Utilities
MIT License
233 stars 18 forks source link

Possible network swamp or security flaw #79

Closed Erimelowo closed 4 months ago

Erimelowo commented 4 months ago

Since installing the app on Steam 4 days ago, everytime I would open SteamVR, our access points would start heating up and our wifi would shutdown intermittently. Since uninstalling the application yesterday, our network is no longer overwhelmed when SteamVR is opened. I suspect that this might be because of something related to the broadcasting that is being done for OSCQuery, but I cannot say. The issue persists even in VRChat.

Raphiiko commented 4 months ago

Some other users have also been having issues with Oyasumi's MDNS broadcasts, so it's quite likely this might be related. Please see the mitigation instructions in here:

Assuming that is indeed the problem:

  1. Could you please check if doing so resolves your issue?
  2. Do you have any log files for me to check? I'd like to compare them to the logs from other users who ran in to mdns issues before. You'll find them in %appdata%/co.raphii.oyasumi/logs.
Erimelowo commented 4 months ago

Something like this is being repeated for megabytes in the logs: [2024-03-17][11:35:19][ERROR] send to SockAddr { ss_family: 23, len: 28 } via interface Interface { name: "{D40348FB-BA50-4D22-BE89-53ABA47DB72C}", addr: V6(Ifv6Addr { ip: fd72:1433:6ea6:b34e :a0ef:8da5:4c01:7a6, netmask: ffff:ffff:ffff:ffff::, broadcast: None }), index: Some(15) } failed: A non-blocking socket operation could not be completed immediately. (os error 10035)

Here's one of the logs OyasumiVR_2024-03-18_03-32-20.log

My biggest log file is 26MB

As for the flag, it does seem to solve my network being overwhelmed (and the logs being spammed), so this would confirm that your mdns broadcast implementation is the issue.

You missed a u in oyasumi for the path btw (%appdata%\co.raphii.oyasumi\logs)

Raphiiko commented 4 months ago

Gotcha, that one looks familiar. In that case I can only recommend keeping the workaround in place until v1.12 releases.

Thanks for the report, I'll be closing this to be tracked in #80.

Raphiiko commented 4 months ago

@Louka3000 I've made a potential fix for this in the latest beta build. I can however not test if it is effective, as I could never reproduce this issue myself. Would you be able to check if this fixes the problem for you?

You can find the latest beta build on Steam, if you switch to the beta branch (you can do so in the game properties). You'll you're on the right build if the build number in the about view (next to the version) is listed as 6f2d107.

Erimelowo commented 4 months ago

This seems to fix it, and OSCQuery/OSC still works as intended!

Raphiiko commented 4 months ago

Fantastic, thanks!