- Sources: primary, discussion
- Summary: XNU's uipc_sense uses unp_ino++ where it needs ++unp_ino, so the first socket stat'd on a booted system gets inode 0. The same code reads 0 as uninitialized and reassigns a new inode on the next call. The author traces the line back through XNU 123.5 and 4.3BSD-Tahoe to a 1985 change, and states it is not interesting from a security standpoint.
- Why it matters: Code that keys on socket inode numbers can see the identifier for one socket change between two stat calls.
send feedback on this story