ELSEIF
Your brief EB
409 stories from 200 feeds 1259 clusters Refreshed 38 seconds ago next pull 21:39

DEV TOOLS Signal 126

40-year-old kernel bug makes fstat return different inodes on same UNIX domain socket end

Illustration only Photo by Kier in Sight Archives on Unsplash

A bug in the iOS kernel's UNIX domain socket implementation causes fstat() to return different inode numbers on successive calls to the same socket end, breaking any code that relies on inode stability to identify socket endpoints.

WHY IT MATTERS

Any system code that caches inode numbers from fstat() on UNIX domain sockets to distinguish socket ends will hit assertion failures or incorrect behavior on first boot. The bug is deterministic and reproducible, making it particularly dangerous for production systems that rely on inode-based socket identification patterns.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

fstat() on a UNIX domain socket can return a different inode number on the second call to the same socket end

02

The bug is in uipc_sense in /bsd/kern/uipc_usrreq.c, where inode numbers are lazily assigned via unp_ino++

03

The bug is deterministic, occurring only after a fresh iOS boot and never on subsequent runs

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
yuvalino.com via Lobsters How can you not be romantic about UNIX domain sockets? Open ↗