{"id":51497,"date":"2026-04-07T18:53:33","date_gmt":"2026-04-07T22:53:33","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=51497"},"modified":"2026-04-10T13:54:26","modified_gmt":"2026-04-10T17:54:26","slug":"tahoe-tcp-overflow-bug","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/04\/07\/tahoe-tcp-overflow-bug\/","title":{"rendered":"Tahoe TCP Overflow Bug"},"content":{"rendered":"<p><a href=\"https:\/\/photon.codes\/blog\/we-found-a-ticking-time-bomb-in-macos-tcp-networking\">Photon<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=47666488\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/photon.codes\/blog\/we-found-a-ticking-time-bomb-in-macos-tcp-networking\">\n<p>After exactly 49 days, 17 hours, 2 minutes, and 47 seconds of continuous uptime, a 32-bit unsigned integer overflow in Apple&rsquo;s XNU kernel freezes the internal TCP timestamp clock. Once frozen, TIME_WAIT connections never expire, ephemeral ports slowly exhaust, and eventually no new TCP connections can be established at all. ICMP (ping) keeps working. Everything else dies. The only fix most people know is a reboot.<\/p>\n<p>[&#8230;]<\/p>\n<p>This is a <strong>32-bit unsigned integer timer wraparound<\/strong> bug in the TCP subsystem, specifically a <strong>TCP timestamp counter overflow<\/strong>. The counter in question, <code>tcp_now<\/code>, is the kernel&rsquo;s internal TCP clock. When it stops ticking, every timer in the TCP stack that depends on it stops working.<\/p>\n<\/blockquote>\n\n<p>They suggest that the bug may have been around since Catalina, but I&rsquo;ve had a Mac server running from the Catalina days all the way through Sequoia, with months of uptime, and haven&rsquo;t seen this problem. I&rsquo;ve not updated the server to Tahoe yet.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/11\/08\/iphones-mysteriously-rebooting-themselves\/\">iPhones Mysteriously Rebooting Themselves<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/10\/08\/networking-issues-in-sequoia\/\">Networking Issues in Sequoia<\/a><\/li>\n<\/ul>\n\n<p id=\"tahoe-tcp-overflow-bug-update-2026-04-08\">Update (<a href=\"#tahoe-tcp-overflow-bug-update-2026-04-08\">2026-04-08<\/a>): <a href=\"https:\/\/sixcolors.com\/link\/2026\/04\/macs-crash-after-49-days-of-uptime\/\">Jason Snell<\/a>:<\/p>\n<blockquote cite=\"https:\/\/sixcolors.com\/link\/2026\/04\/macs-crash-after-49-days-of-uptime\/\">\n<p>As someone who keeps a Mac mini running in my closet, I <em>guarantee<\/em> you that I have been affected by this bug. [&#8230;] Unless I&rsquo;m traveling, I just shrug, reboot the Mac, and go on with my life.<\/p>\n<\/blockquote>\n\n<p id=\"tahoe-tcp-overflow-bug-update-2026-04-10\">Update (<a href=\"#tahoe-tcp-overflow-bug-update-2026-04-10\">2026-04-10<\/a>): <a href=\"https:\/\/daringfireball.net\/linked\/2026\/04\/09\/macos-crash-49-days\">John Gruber<\/a>:<\/p>\n<blockquote cite=\"https:\/\/daringfireball.net\/linked\/2026\/04\/09\/macos-crash-49-days\">\n<p>I think this bug is new to Tahoe. If you look at Apple&rsquo;s open-source XNU kernel code&#x2009;&mdash;&#x2009;<a href=\"https:\/\/github.com\/apple-oss-distributions\/xnu\/blame\/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea\/bsd\/netinet\/tcp_subr.c\">e.g. lines 3,732 to 3,745 in tcp_subr.c<\/a>&#x2009;&mdash;&#x2009;you can see that the lines assigning the time in milliseconds to a <code>uint32_t<\/code> variable were checked in just six months ago, whereas most of the file is five years old. Also, I personally ran my MacBook Pro&#x2009;&mdash;&#x2009;at the time, running MacOS 15.7.2 Sequoia&#x2009;&mdash;&#x2009;up to 91 days of uptime in January.<\/p>\n<\/blockquote>\n\n<p>See also: <a href=\"https:\/\/tidbits.com\/2026\/04\/09\/why-the-macos-49-day-networking-bug-probably-wont-affect-you\/\">Adam Engst<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Photon (Hacker News): After exactly 49 days, 17 hours, 2 minutes, and 47 seconds of continuous uptime, a 32-bit unsigned integer overflow in Apple&rsquo;s XNU kernel freezes the internal TCP timestamp clock. Once frozen, TIME_WAIT connections never expire, ephemeral ports slowly exhaust, and eventually no new TCP connections can be established at all. ICMP (ping) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-04-07T22:53:36Z","apple_news_api_id":"bb5b1918-9b3a-4fde-a75b-dbeaa975a778","apple_news_api_modified_at":"2026-04-10T17:54:30Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAw==","apple_news_api_share_url":"https:\/\/apple.news\/Au1sZGJs6T96nW9vqqXWneA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,45,140,863,30,1666,2742,476,508],"class_list":["post-51497","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-c","tag-imessage","tag-integer-overflow","tag-mac","tag-macos-10-15","tag-macos-tahoe-26","tag-networking","tag-tcp"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/51497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=51497"}],"version-history":[{"count":5,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/51497\/revisions"}],"predecessor-version":[{"id":51536,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/51497\/revisions\/51536"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=51497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=51497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=51497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}