Firewall Issues - ssh_dispatch_run_fatal errors during SSH

Just upgraded to Sequoia and noticed a lot of issues with the firewall while using ssh.


After ssh'ing into a local server on my network, after a few minutes I get this error:


Bad packet length 2489765067.

ssh_dispatch_run_fatal: Connection to 192.168.30.2 port 22: Connection corrupted


I can trigger it by ssh'ing into pretty much any server or computer on my network and then executing a command like:


ping google.com


within 10 - 30 seconds, the connection drops.


Happens with IPv4 and IPv6. Happens with Terminal and iTerm apps.


Disabling the firewall fixes the issue. In this case, my Mac is running statically in my local network and safely behind an upstream firewall. So, it's annoying to have to disable the firewall every time I have to ssh in anywhere, but not the end of the world. Obviously, that isn't a long term fix, however.


Anyone else seeing similar?

Mac Studio

Posted on Sep 17, 2024 6:35 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 6, 2024 6:28 PM

Whilst this is true that Apple cannot fix the problem caused by others, however, this issue should not be ignored. MacOS 15.0.x borks TCP connections. See Little Snitch blog about Sequoia on TCP, Firewall issues https://obdev.at/blog/should-i-upgrade-to-macos-sequoia-now/


Disabling all third-party Network Filters will alleviate the issue temporarily (until, hopefully a fix on 15.1). macOS Firewall set to **block** all incoming connections (with the exception of some internal processes) works for me as well (you can set this to allow all and fine-tune the setting per third-party application).


As for VPN, well, I use Firefox connected to VPN via Windscribe and it works, so far so good. I have yet to run a VPN for all network connections, perhaps I will do this soon to test.


MacOS 15.0 is new, let's give Apple time to fix it -- also hoping that beta testers report this bug. As for us, let's continue filing bug reports, the more, the better, so Apple gets to prioritize it.


For the meantime, if you are from corporate IT, it is your responsibility to evaluate and certify new software before your users are allowed to download and install it. And if a user installs Sequoia, knowing that there is this bug AND if it is mission critical, then get them to revert back to macOS 14. :)


78 replies

Sep 20, 2024 7:51 AM in response to mikeloiterman

Seeing the same behavior here on Sequoia with Microsoft Defender and Palo Alto Cortex XDR installed. Cannot turn off either of them, as it's a company-managed device where I literally don't have the needed privileges to disable or reconfigure the software.


Oddly, a coworker with the same set-up isn't able to reproduce the issue. Only obvious difference is he's on m3, I'm on m2.


To reproduce the issue, I'm ssh'ing into several servers at once and running this loop on all of them -- they all stop at the same time when the issue occurs, and it only takes a few minutes:


while [ true ]; do echo "$(hostname) $(date)"; sleep 1; done


Even more strange, I opened an AWS ec2 instance using SSM connection manager, which is a browser-based terminal interface that communicates with an ec2 instance via an open https connection to AWS, so there's no ssh between my workstation and the ec2 instance, and the connection manager session also loses connectivity between my workstation and AWS at the same time that the other connections drop. I can just refresh the web page containing the session, and it's back again, but this indicates that it's not just ssh connections being impacted -- it's potentially any open tcp connection.



Sep 19, 2024 12:58 PM in response to Garrana

I'm not using Microsoft Defender, but I am using Little Snitch. As you suggested, I tried disabling it completely, both from within the app as well as from within Network settings -> Filters. Unfortunately, I still see the problem.


I've also tried adding


/usr/bin/ssh 


to the list of firewall exceptions and tried using socketfilterfw method as well. Neither made a difference.


In console, I see activity when the connection drops like:


Could not find app info, return the original flow without filling in app info


but nothing really sticks out.


I also tried adjusting my ssh client configuration:


Host *
  TCPKeepAlive yes
  ServerAliveInterval 60
  ServerAliveCountMax 3


but this also had no effect.


I strongly suspect that apart from disabling the firewall entirely, there's no much we can do until Apple fixes this bug. I do hope to be proven wrong, because disabling the firewall is just not a practical solution.

Sep 19, 2024 2:41 PM in response to etresoft

The default firewall configuration allows any built-in app, and any 3rd party signed app, to accept incoming connections. It doesn't block anything. In some versions, if you manually change settings to block software, it will just change it back to allow. But assuming you have a version that works, then it is only going to block local connections, like from your printer or other computers in your house.

No argument that the default config allows signed apps (built-in or otherwise) to accept incoming connections. This configuration allows general users the ability to install and use tools w/o having to know much about the network; and IMHO even if there was an alert .. that same level of user would click right through it same as their user agreement :)


Could Apple do better, sure no argument there either. However for users that want more security can use third-party tools that do better ( snitch,etc ) .. tho I would agree that it would be nice if the inherent tool was more applicable.

For the vast majority of users, no outside connection is going to make it past their modem in the first place.

This comment assumes only a home or behind-a-physical firewall use-case; I am considering this and all the places one takes one's lappy: coffee, airplane, school, conference, etc. To your point those same services are open if installed and my be an exploitable vector; however.. it's a layer that may need to be worked around for those being malicious .. and again doesn't hurt (except in this case where it's borked).


This is one area where I think Microsoft had a better approach by having profiles based on network location that apply different levels of security profile; and other tools could benefit from the approach.

This is a user-to-user support forum for consumer users. Companies typically have all kinds of specialized configurations and software that we don't have and can't support.

Per Community etiquette guidelines - Apple Support This is a general support site; not limited by use-case.

Oct 7, 2024 11:36 AM in response to mikeloiterman

15.0.1 caused the issue to skyrocket in severity. Since 15.0 SSH connections aborted but Remote Desktop was fine (connecting to an RD farm, not just open RDP .. dont freak out).


Installed 15.0.1 today and now my RDP connections drop every 30 seconds or so. After disabling the firewall (wow, really?) the disconnects are gone entirely. I also had trouble with page loads in the browser.


These have to get fixed, I can't consider macOS a viable platform anymore if these basic issues are not resolved.

Oct 20, 2024 8:54 AM in response to tbirdvet

tbirdvet wrote:

Did not last long with firewall off. For me the solution was to turn off WiFI and only use ethernet.

Please understand that this issue happens with everything, wireless or ethernet, as it doesn't depend on the network interface. I have a docking station with ethernet and I get it every now and then. You're just lucky you didn't get it in this short period of time. Give it long enough time and it will happen again.


The most painful part of this issue is that people keep tinkering with things, and then one thing fixes the issue temporarily, and everyone yells "eureka"... like I said before, the internet is literally flooded with "MacOS network timeout issues", and everyone thinks they got a fix, but eventually it comes back, and people don't have time to track this and most of the time they prefer to just restart MacOS. The core issue is still there though. I do really hope Apple will fix it (and part of me is happy that Sequoia made the issue quite pronounced, so that it gets fixed once and for all). I did report the issue through feedback assistant, and have proven that it's an issue in MacOS. Let's wait and see.

Oct 29, 2024 12:02 PM in response to mikeloiterman

Updated to 15.1 and this has mitigated the issues quite a bit (i havent noticed it yet today).


On 15.0.x I would get SSH errors every few minutes in chrome (very obvious with the ERR_SSL_PROTOCOL_ERROR) - and have not experienced it in my 6 hours of computing today.


Unsure if the issue is completely mitigated, but so far 15.1 has been a significant improvement for me.

Oct 29, 2024 11:05 PM in response to mikeloiterman

mikeloiterman wrote:

15.1 fixes the issue that started this thread. Firewall is now enabled and I have no ssh disconnection issues.

This depends on whether the issue got completely fixed or just improved. It seems that many people here are reluctant to do the ping tests multiple times per day to see these spikes I talk about. Note that disabling the firewall *improves* these spikes, it doesn't remove them completely. Meaning: The issue you're claiming was fixed in 15.1 is just a symptom of a bigger problem. Congratulations to you, since you seem to have a setup, for which this is working for you. But I do implore those who have things working for them to be more understanding and not dismiss the bigger issue for those who have a more complex setup. I have all kinds of friends and colleagues that are facing networking problems in different severities, ranging from once per month blocked networking to every day.


In summary: If you want to check whether the issue is fixed, ping your router every few hours, and if you have zero spikes in response time (whether small or big), then the issue is fixed for you. If the spikes become so large that they lead to timeouts, then you'll face all the problems everyone talked about in this post, including ssh disconnections, internet lags and connectivity problems, etc.

Sep 17, 2024 8:07 PM in response to mikeloiterman

mikeloiterman wrote:

Why is disabling the firewall every time I have to SSH into a server not a long term fix?

Because I have to ssh into a lot of servers and computers frequently and often stay logged into them for long periods of time. So, that essentially means disabling the firewall on my Mac entirely.

Sorry. I meant that disabling the firewall entirely was the long-term fix. It’s a do-nothing app - a placebo. I don’t know for sure that it is causing the problem you describe. But I do know for sure that it’s a waste of time.

Sep 19, 2024 11:17 AM in response to etresoft

Thank you for making this post! I spent 12 hours today troubleshooting my network trying to isolate this issue. I cannot confirm that this is the solution just yet, although the symptoms and timing is spot on. But I'm working with IT at work to disable firewall for testing.


For anybody else searching for a solution on this, here is a full writeup on the issues I am seeing https://community.ui.com/questions/Entire-network-halts-crashes-every-minute/0c0625b0-5658-4cb2-b95c-ddb17c6920a2 . The weird thing is that I am not seeing these issues when I am connected directly to my router, only when I add a switch between myself and whatever I am trying to communicate with.


Tagging this post with: Sequoia, ERR_SSL_PROTOCOL_ERROR, Bad packet length, ssh_dispatch_run_fatal

Sep 23, 2024 7:31 AM in response to mikeloiterman

We're experiencing a similar issue with Sentinel One and Microsoft Defender here:



This leads to multiple SSL errors. In chrome for instance we see ERR_SSL_PROTOCOL_ERROR very often.


Uninstalling Sentinel One or Defender (Or disabling Network Filters for those) fixes the issue but it's definitely not a solution, especially on corporate networks and computers.


We're trying to investigate if there is a link between those apps Network Filters and the fact that we also have Firewall enabled in MacOS (which is disabled usually by default).


[Edited by Moderator]

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Firewall Issues - ssh_dispatch_run_fatal errors during SSH

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.