macOS也存在时间炸弹 连续运行49.7天后网络会失效 原因是内核级缺陷
https://www.landiannews.com/archives/112529.html
https://photon.codes/blog/we-found-a-ticking-time-bomb-in-macos-tcp-networking (英文)
这个缺陷的核心在于 XNU 内核中使用 RFC 1323 TCP 时间戳变量 tcp_now,这是一个 uint32_t 32 位无符号整数类型的计数器,以毫秒为单位记录系统自启动以来的时间。
问题在于这个时间的最大值只能是 4,294,967,295 毫秒,约为 49 天 17 小时 2 分 47.296 秒,当系统连续运行超过这个时间周期时,计数器会发生溢出并回绕到接近零。
https://www.landiannews.com/archives/112529.html
https://photon.codes/blog/we-found-a-ticking-time-bomb-in-macos-tcp-networking (英文)
这个缺陷的核心在于 XNU 内核中使用 RFC 1323 TCP 时间戳变量 tcp_now,这是一个 uint32_t 32 位无符号整数类型的计数器,以毫秒为单位记录系统自启动以来的时间。
问题在于这个时间的最大值只能是 4,294,967,295 毫秒,约为 49 天 17 小时 2 分 47.296 秒,当系统连续运行超过这个时间周期时,计数器会发生溢出并回绕到接近零。